Did you end up buying a OBD2 Wifi (not bluetooth) interface for your car, noticing android got some problems with ad-hoc connections and can't connect that easy, that you may have thought?
Well, if so, I'm at least not the only one
In my case I wanted to have a look at my engine stats etc. You might also be happy about checking the vin stored in the cars ecu with the one you got on paper, when buying a used car or else. Anyway I did not want those crappy bluetooth thing for some bucks. I wanted it to use wifi and also to be able to connect via usb to a laptop, if neccessary.
I got mine from eBay for about 80$. There is a bunch of these things avaible everywhere. I can't really tell you which one is better in which way. Most of them come out of china and are built pretty cheap, just like mine
BUT at least they work the way the should, once configured right.
IN GENERAL --> without any kind of workaround you shold keep in mind:
BT OBD2 is used for android devices. No Problem
WIFI OBD2 is usually used for iDevices, as they're not allowed to share BT with non-iDevices.
I didn't really make up my head about the second part, as I'm using android on every device I personally own.
Here's a tutorial on how I solved it anyway:
1. Buy yourself some OBD2 interface with wifi and the software you desire. Didn't test anything else but torque pro; no guarantee that other apps support these android-wifi-adhoc-obd-interface-workarounds
2. you need a rooted phone, in every possible case afaik.
3. Plug in your OBD interface and look, if you can see it in your wlan list.
In my case...I couldn't^^
If you see it jump to Number 4.4, if not, just keep on reading.
4. Getting my device, which is a HTC Sensation, with ARHD 6.6.7 - 4.0.3 ICS, connected to it required some effort:
4.1. I used a different wpa_Supplicant, to be able to see adhoc networks
I got this one: http://forum.xda-developers.com/showthread.php?t=1549065&highlight=adhoc also attached in the Thread. Full Credits go to the dev, although I don't know who it was exactly.
4.2. REMEMBER TO BACKUP YOUR ORIGINAL WPA_SUPPLICANT AND SWITCH WIFI OFF BEFORE!
It's stored in system/bin; so you'll need a explorer (mount R/W) for your phone's file system. I always used the root explorer. Worked flawlessly everytime. (mount R/O afterwards).
4.3. Flash the attached file in recovery -> I did at least find the adhoc network after it. Remember that some wifi off, wifi on sometimes solves problemes with this. This was at least the case for me. Reboot.
4.4. Now that you can see the OBD interface in your wlan list, you propably tried to connect, didn't you?
For most of us, this won't work, that easy, as your OBD interface doesn't work as a DHCP router, so you're in the need of taking a static IP.
Therefore it always depends on which IP range your interface is networking. In the most cases this will be 192.168.0.X
Picture #1 is a screen of the config tool, that came with mine so I can modify these values. (What is not really neccessary, cause you're doing this with your phone.)
Picture #2 are my stats. You can edit yours by long pressing on your desired OBD device in your phones wifi list and pressing "edit network". After that, change to advanced configuration and choose static IP.
4.5. Save your preferences and try to connect. Again I think my wifi needed a reboot to work with the values set now. So just swith it off/on again.
5. You're done. More or less. Because this is just what made me able to connect but drop my connection to the OBD after trying to access it via torque. It did connect (as seen on adapter status in torque), but lose connection after some seconds. It just didn't really work for a longer period of time. There also used to be connecting errors with my home wifi.
5. After hours of testing and experimenting with this whole topic I came to the conclusion my home network didn't work anymore or rather my phone couldn't keep up the connection. What you have to do is switch back to your old wpa_supplicant. Don't worry, your OBD interface should be saved and is still accessable afterwards.
5.1. SWITCH WIFI OFF. Navigate to system/bin via root explorer or similiar. (mount R/W) locate the wpa_supplicate and delete/rename/remove it and put the original file back in it. (mount R/O afterwards). Reboot.
(Picture #3 shows how it looked on my device after switching back to the original file.)
5.2. You're finally done.
Remember not to forget that wrong permissions could lead to errors. Refer to my attached screenshot or your original file, if neccessary.
where you found the configuration tool??
This is mostly for the new Joying INTEL units.
*********************************************
OLD STUFF: aka "BlueBalls.apk"
The bluetooth stack on these units appears to be ENTIRELY functional, but for whatever reason (don't ask me to guess at the thought processes that go into developing a head unit in China....) they HIDE the button in the Settings application that links to BLUETOOTH settings.
This is the simplest/dumbest application anyone has ever written.
The code inside it is literally JUST the following THREE LINES;
Code:
Intent intentOpenBluetoothSettings = new Intent();
intentOpenBluetoothSettings.setAction(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);
startActivity(intentOpenBluetoothSettings);
It launches the bluetooth settings activity that Joying has hidden.
**************************************************
NEW STUFF!!!!
Ok, so the thing is, even with blueballs installed, the process of tethering is somewhat... MANUAL. On both sides of the connection -- data source, typically your phone, and head unit. Wouldn't it be nice to AUTOMATE things a little bit?
While there are some guides and hackish programs that suggest that they can get this done, for instance http://forum.xda-developers.com/showthread.php?t=2574310 -- the reality is that NONE of these solutions will actually WORK, nor are they simple to configure, nor are they reliable. They are a BIG UGLY MESS.
So I decided to do it myself, in a nice, clean, self-contained Android application.
The result is the BluetoothTethering.apk attached below.
Here is description of this program;
Start up the program, and you are presented with a screen with some buttons, switches, and spinners.
FOR THE CAR RADIO SIDE:
At the top of the screen is a spinner containing a list of all paired bluetooth devices. If you select one of those devices, and hit the "CONNECT PAN" button, it will try to connect to that device as a bluetooth tethering client. If you enable the switch "Auto Connect PAN", then whenever it connects to that device (the one currently showing in the spinner), it will AUTOMATICALLY try to connect PAN. The application does NOT need to be running for this to occur, since there is a receiver registered in the application's manifest.
The next button down, "Launch Bluetooth Settings", just launches the standard Android Settings --> Bluetooth activity. This is the same as what BlueBalls does, so you don't need to install both.
FOR THE PHONE SIDE:
At the bottom, there is a button "START SERVICE", hit that button on your phone, and it should start up bluetooth tethering service.
And the switch "Auto Bluetooth Tethering", means that every time the bluetooth device turns ON, it will automatically enable bluetooth tethering. Again, it receives an intent and does the work in the background, so the application need not be open.
CAVEATS!!!
Ok, this is where the fun begins! Starting with Android version 3.1, newly installed applications are given a default state of "stopped", in which they are unable to receive any broadcast intents. In order to get the application out of the stopped state such that it can receive broadcast intents, it needs to be manually run first. A second part of this feature, is that if an application is force stopped, it is RETURNED to the "stopped" state. This becomes a problem on at least some Chinese Android car radios. In particular, it is a problem on at LEAST Joying units (possibly also others). In these units, when the car ignition is turned off, after a few minutes they go to SLEEP mode so that they don't drain the car's battery. The problem is that just before going to sleep, everything running is FORCE STOPPED, sending everything, INCLUDING BluetoothTethering.apk, into a "stopped" state, thus disabling the application's ability to receive the broadcast intent necessary in order to activate PAN!
Workaround: NOW TESTED AND VERIFIED FUNCTIONAL... provisioning the application with enhanced privileges, by installing it into /system/priv-app/, will allow it to avoid the "stopped" state, or at least allow it to receive broadcast intents regardless of that state. After all, there are many system receivers that fire as expected, even if you don't manually open the applicable application manually!
If you are going to do this (which you MUST on Joying Intel car radios, and possibly other MTCD Intel car radios), the steps are as follows;
Connect it and a laptop (with adb installed) to a common wifi network. This CAN be a hotspot running on the head unit or laptop, or even your PHONE. Just as long as they are all on the same network! Find the IP address of the head unit. If the head unit is connected to a different AP rather than hosting a hotspot, you can look in wifi --> 3dots menu --> advanced. If the head unit IS the hotspot, then look at your laptop (terminal --> ifconfig) and find ITS IP address (for example, 192.168.30.123) and change the last byte to a "1" to find the head unit's IP address, in this case, it would be 192.168.30.1.
In a terminal on the computer, run following;
Code:
adb connect <ip address of head unit>
adb push BluetoothTethering.apk /sdcard/
adb shell
$ su
# mount -o remount,rw /system
# mkdir /system/priv-app/BluetoothTethering
# cp /sdcard/BluetoothTethering.apk /system/priv-app/BluetoothTethering/
# chmod 755 /system/priv-app/BluetoothTethering
# chmod 644 /system/priv-app/BluetoothTethering/BluetoothTethering.apk
# sync
# reboot
Now the application is installed with extra privileges, so it will respond properly to the broadcasts when the unit powers back on after sleeping.
Note: This application will not currently work with a typical Android TABLET. The reason is that despite being "paired" to your phone for tethering, the two devices do not automatically establish a connection when they are in proximity. A car radio and phone DO automatically establish a connection when in proximity in order that your phone calls will be directed over bluetooth. I will be looking into whether or not there is some battery efficient mechanism for accomplishing this, but I am not hopeful.
I am also aware that the auto-tethering setting is currently limited to a selection of ONE bluetooth device. If two people share a car, this may be inadequate. My intention is to create a LIST of devices that it can try connecting to. CANNOT just try ALL devices, since obviously it would be silly to try to establish a PAN connection with your OBD dongle.
There is also a potential weakness where if the bluetooth connection is established BEFORE the PHONE has bluetooth tethering enabled, the head unit will just try once to connect PAN, fail, and give up. I intend to have it periodically retry if the connection is established to an enabled device, but PAN failed.
Going to test it this afternoon. I think it will work.....
By the way: many other settings are hidden (accounts, sync, ...). They even have a second "settings.apk" (only 1 MB)....wtf.....? A lot of overlays too (we should get rid of them)
Interesting.
I'll have to rip a few of those apart and see what is up with them.
Hopefully, I'll have my 128N2's by next week.
FYI: Brainless "Candy" at Joying is really giving me the runaround when asking her about getting into recovery. Told her even to ask their technical people for the answer.... her solution? Just wait an extra hour before responding to the email with the same nonsense "do not worry, it will not fail to boot into Android, this is our latest very much more stable"
I *really* hate dealing with chinese manufacturers.
Wonder how she's going to respond to my request for kernel source code? Probably give me a link to kernel.org....
The blueballs.apk is working.
lol anyone wanna try this on a RK3188 unit
thanks doitright..
My UL128N2 from joying in in transit. hopefully receiving it in a week. I will try this in my unit and post you the feedback:good::good:.
May be this simple app can make UL128N2 to connect to 'any brand' BT OBD2 adapter.
doitright said:
This is mostly for the new Joying INTEL units.
The bluetooth stack on these units appears to be ENTIRELY functional, but for whatever reason (don't ask me to guess at the thought processes that go into developing a head unit in China....) they HIDE the button in the Settings application that links to BLUETOOTH settings.
This is the simplest/dumbest application anyone has ever written.
The code inside it is literally JUST the following THREE LINES;
Code:
Intent intentOpenBluetoothSettings = new Intent();
intentOpenBluetoothSettings.setAction(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);
startActivity(intentOpenBluetoothSettings);
It launches the bluetooth settings activity that Joying has hidden.
Note: It works perfectly on my Nexus 6, but I don't have a Joying INTEL head unit yet (two UL128N2's on order). It *should* be fine, unless they did something REALLY weird, in which case I have another way to issue the intent that may work.
Click to expand...
Click to collapse
masri1987 said:
lol anyone wanna try this on a RK3188 unit
Click to expand...
Click to collapse
Not even remotely the same thing.
leonkernan said:
Not even remotely the same thing.
Click to expand...
Click to collapse
I know, just don't understand why the CPU makes the native ROM different for
masri1987 said:
I know, just don't understand why the CPU makes the native ROM different for
Click to expand...
Click to collapse
The Bluetooth was a separate module on the RK boards, it's on the processor board on the Sofias.
They have completely different driver software requirements.
leonkernan said:
The Bluetooth was a separate module on the RK boards, it's on the processor board on the Sofias.
They have completely different driver software requirements.
Click to expand...
Click to collapse
Well, you know something... just because the bluetooth module is on a separate board does not mean that it is necessarily "wrong". Consider the fact that you can plug a bluetooth USB dongle into ANY normal laptop/desktop/server and have it work correctly! The thing is, there ARE a bunch of high speed ties between the SoC through to the MCU board, and we know from the fact that things like torque CAN work on the rockchip/arm/mtcX units that BT SPP profile is definitely able to make it through to the bluetooth device itself. Also the fact that WIFI works on those units supports the idea that they aren't completely broken (wifi and bluetooth are on the same physical RF chip, since they use the same spectrum and need to coordinate with each other in order to operate correctly).
What this really boils down to, is that very likely, those older arm boards *actually could* be programmed to have correctly working bluetooth.
However, there IS a difference in the software. While on the RK/arm boards, they have MODIFIED the settings/bluetooth screen to be horribly broken, on the INTEL boards, they have simply deleted the link to the settings/bluetooth activity from the main settings activity, and otherwise left it fully intact. So really, there are TWO possibilities here in just how they butchered it; (1) They added a new settings/bluetooth screen and changed the link to point to it, which could mean that the original one is actually still there UNBROKEN, or (2) They actually butchered the settings/bluetooth activity.
If they used approach (1), then this apk ***COULD ACTUALLY WORK*** on them. However, if they used approach (2), then it would definitely be necessary to build a new settings/bluetooth screen with the appropriate permissions to change bluetooth settings, and installed in the system partition (i.e., root needed).
Hi,
My Joying JY-UL135N2 just arrived. So far so good with the functionalities except Bluetooth OBD2. I have used 'blueballs.apk' and the Bluetooth settings screen appeared which was not visible otherwise. I could find my BT OBD2 device in the device list with the name 'CHX'. I tried to pair to it and unfortunately error popped up " Couldn't pair with CHX because of an incorrect PIN or passkey".
In the BT settings screen, there is no option to specify PIN or passkey. May be the unit sends some JOYING pass key or PIN to the device without giving an option for the user to specify one.
Is there any way to send an user defined PIN or pass key to Bluetooth device?
doitright said:
This is mostly for the new Joying INTEL units.
The bluetooth stack on these units appears to be ENTIRELY functional, but for whatever reason (don't ask me to guess at the thought processes that go into developing a head unit in China....) they HIDE the button in the Settings application that links to BLUETOOTH settings.
This is the simplest/dumbest application anyone has ever written.
The code inside it is literally JUST the following THREE LINES;
Code:
Intent intentOpenBluetoothSettings = new Intent();
intentOpenBluetoothSettings.setAction(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);
startActivity(intentOpenBluetoothSettings);
It launches the bluetooth settings activity that Joying has hidden.
Note: It works perfectly on my Nexus 6, but I don't have a Joying INTEL head unit yet (two UL128N2's on order). It *should* be fine, unless they did something REALLY weird, in which case I have another way to issue the intent that may work.
Click to expand...
Click to collapse
---------- Post added at 02:03 PM ---------- Previous post was at 01:55 PM ----------
hi, doitright,
error screenshot attached.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
aneesp said:
Hi,
My Joying JY-UL135N2 just arrived. So far so good with the functionalities except Bluetooth OBD2. I have used 'blueballs.apk' and the Bluetooth settings screen appeared which was not visible otherwise. I could find my BT OBD2 device in the device list with the name 'CHX'. I tried to pair to it and unfortunately error popped up " Couldn't pair with CHX because of an incorrect PIN or passkey".
In the BT settings screen, there is no option to specify PIN or passkey. May be the unit sends some JOYING pass key or PIN to the device without giving an option for the user to specify one.
Is there any way to send an user defined PIN or pass key to Bluetooth device?
Click to expand...
Click to collapse
@aneesp --> Use the built-in BT app to connected (first time) with your OBD device. Maybe you have to change the PIN to 0000 or 1234 to get a paired connection (use the built-in BT app to change the PIN!!!)
aneesp said:
Hi,
My Joying JY-UL135N2 just arrived. So far so good with the functionalities except Bluetooth OBD2. I have used 'blueballs.apk' and the Bluetooth settings screen appeared which was not visible otherwise. I could find my BT OBD2 device in the device list with the name 'CHX'. I tried to pair to it and unfortunately error popped up " Couldn't pair with CHX because of an incorrect PIN or passkey".
In the BT settings screen, there is no option to specify PIN or passkey. May be the unit sends some JOYING pass key or PIN to the device without giving an option for the user to specify one.
Is there any way to send an user defined PIN or pass key to Bluetooth device?
---------- Post added at 02:03 PM ---------- Previous post was at 01:55 PM ----------
hi, doitright,
error screenshot attached.
Click to expand...
Click to collapse
Ok, so what it is sounding like, is that the pin prompt on the head unit is broken, causing it to default to one specific user-set pin code for pairing. This user-set pin code is controllable via the chinese "bluetooth" application -- go there and set the pin to match your device, then go back into the "real" bluetooth settings menu and try again from there.
ok..
I will do that way and give you feed back..
doitright said:
Ok, so what it is sounding like, is that the pin prompt on the head unit is broken, causing it to default to one specific user-set pin code for pairing. This user-set pin code is controllable via the chinese "bluetooth" application -- go there and set the pin to match your device, then go back into the "real" bluetooth settings menu and try again from there.
Click to expand...
Click to collapse
@doitright and @MMTK84,
you saved my day and night. It worked. I entered my BT OBD2 PIN "6789" in the Chinese "Bluetooth" application (stock) and then used blueballs.apk to pair CHX. it paired smoothly. Torque could successfully establish connection and I am very happy about this unit JY-UL135N2. BT in the unit is fully functional. simultaneous playback of BT music and OBD2 is possible. Bluetooth hardware which is on on the SOC is perfect and only chinese software interface is making the issue. Any way we got the work around for this.
Please note that I didnt go for any firmware update from JOYING to make this happen. Yesterday I received the unit shipped with factory firmware MCU Version 2016-10-31 14:30:43 JY_(NOR)_90_C9_7706_5009_CAN(GX)_Newlap.
:highfive::good::good::good::good:
doitright said:
Ok, so what it is sounding like, is that the pin prompt on the head unit is broken, causing it to default to one specific user-set pin code for pairing. This user-set pin code is controllable via the chinese "bluetooth" application -- go there and set the pin to match your device, then go back into the "real" bluetooth settings menu and try again from there.
Click to expand...
Click to collapse
aneesp said:
@doitright and @MMTK84,
you saved my day and night. It worked. I entered my BT OBD2 PIN "6789" in the Chinese "Bluetooth" application (stock) and then used blueballs.apk to pair CHX. it paired smoothly. Torque could successfully establish connection and I am very happy about this unit JY-UL135N2. BT in the unit is fully functional. simultaneous playback of BT music and OBD2 is possible. Bluetooth hardware which is on on the SOC is perfect and only chinese software interface is making the issue. Any way we got the work around for this.
Please note that I didnt go for any firmware update from JOYING to make this happen. Yesterday I received the unit shipped with factory firmware MCU Version 2016-10-31 14:30:43 JY_(NOR)_90_C9_7706_5009_CAN(GX)_Newlap.
:highfive::good::good::good::good:
Click to expand...
Click to collapse
Glad to hear it!
Once I get my head units delivered (can you believe that I'm writing software to fix problems on these things before even owning one? LOL), I will look into it a bit more deeply. There is probably an intent being fired to prompt for the BT pin, but the receiver (or its registration) has probably been deleted by china.
wow... many thanks for your great support. :highfive::victory::victory:
Do you have an idea how to boot in to stock recovery of this unit. I just wanna to take a nandroid backup of the unit. I t seems I have to root the unit before doing it.
doitright said:
Glad to hear it!
Once I get my head units delivered (can you believe that I'm writing software to fix problems on these things before even owning one? LOL), I will look into it a bit more deeply. There is probably an intent being fired to prompt for the BT pin, but the receiver (or its registration) has probably been deleted by china.
Click to expand...
Click to collapse
aneesp said:
wow... many thanks for your great support. :highfive::victory::victory:
Do you have an idea how to boot in to stock recovery of this unit. I just wanna to take a nandroid backup of the unit. I t seems I have to root the unit before doing it.
Click to expand...
Click to collapse
I actually just started a thread to compile all the known methods of booting into recovery. Nothing firm on that front, however, obviously you CAN "reboot" to recovery.
Good news for you about root though! Joying Intel devices ship WITH ROOT. The only thing you need to know about it, is that it is restricted to access through ADB. So turn on adb over wifi, adb connect to the ip address of the head unit on your LAN, adb root, and adb shell. You can then issue your "reboot recovery" command.
ADB over USB should also work, but you'll need to find the place in their menus where you can control the USB mode switch, and of course, you'll need a USB-A-male to USB-A-male cable.
Hi doitright,
I followed your steps for reboot to recovery using adb over wifi. I could issue the command "reboot recovery" and unit rebooted. After few seconds showing the boot logo, the android logo screen appeared with "No command" after two seconds, No command changed to "Error!". From earlier threads, I got an idea to press power button when we get this error screen. |I did so, but nothing happened. I was little bit afraid if the device is soft bricked. But, upon pressing reset button, unit booted normally.
Any clue?
doitright said:
I actually just started a thread to compile all the known methods of booting into recovery. Nothing firm on that front, however, obviously you CAN "reboot" to recovery.
Good news for you about root though! Joying Intel devices ship WITH ROOT. The only thing you need to know about it, is that it is restricted to access through ADB. So turn on adb over wifi, adb connect to the ip address of the head unit on your LAN, adb root, and adb shell. You can then issue your "reboot recovery" command.
ADB over USB should also work, but you'll need to find the place in their menus where you can control the USB mode switch, and of course, you'll need a USB-A-male to USB-A-male cable.
Click to expand...
Click to collapse
aneesp said:
Hi doitright,
I followed your steps for reboot to recovery using adb over wifi. I could issue the command "reboot recovery" and unit rebooted. After few seconds showing the boot logo, the android logo screen appeared with "No command" after two seconds, No command changed to "Error!". From earlier threads, I got an idea to press power button when we get this error screen. |I did so, but nothing happened. I was little bit afraid if the device is soft bricked. But, upon pressing reset button, unit booted normally.
Any clue?
Click to expand...
Click to collapse
Congrats. You successfully made it into recovery. Not sure what to tell you at this point, since factory recovery is what factory recovery is.
Going from there to the regular recovery menu on MOST devices (remember that I don't have one of these yet, so I haven't been able to play with it yet) involves more than just the power button. Typically it is hold power + something like volume up. You could also try mashing on a USB keyboard and see if anything happens.