[Android General] limited_imagination:
Will, your question inspired me to give it one last try, after months of frustration.

And...

SUCCESS!

A Guide to running Torque Pro on your Asteroid Smart with a USB-OBD-II Cable

I never wanted to use a Bluetooth dongle with Torque Pro, but until now, USB connection reports have been pretty negative, or inconclusive at best.

I now have this running, and wanted to provide a guide for others to follow.

I am running firmware version 2.3.38.06 on my Asteroid Smart. I have no idea which other firmware versions would work, but this one does.

I am running an OBDLink S, that I purchased from Scantool.net. This device is Part Number 408401, hardware revision 1.5, manufacturing date 04 June 2013. It is a 9-pin serial device, which plugs into a USB/serial port converter cable. That cable uses the Prolific drivers that the Asteroid Smart always loads on boot. At time of writing, this device is still for sale at this link: https://www.scantool.net/obdlink-s.html

The first step is that you must root your Asteroid Smart, and install Superuser. There are lots of places to learn how to do this, including http://asteroid.doisara.com/rooting-and-sideloading-apps/rooting-sideloading-and-android-market/

Next you must install Android Terminal Emulator. I used version 1.0.58, but newer versions probably work fine. The APK can either be side-loaded directly, or installed from the Play Store after rooting.

Once the Asteroid Smart is rooted and the Terminal Emulator is installed, you should be fine to plug both ends of the OBD-II cable in, one end to the OBD-II port on the car, one end to the normal USB port on the Asteroid Smart. I did not try using the Ipod USB port on the Asteroid Smart.

You may want to reboot the Asteroid Smart before beginning the next step, just so the Asteroid Smart recognizes the device on the USB port at boot, and you start out clean.

First, start up the Terminal Emulator, and you are presented with a “$” prompt.

Type “su”, then hit the “enter/carriage return” key on the popup keyboard.

You will be presented with a “#” prompt. (This allows you to enter superuser commands into the Terminal Emulator.)

Now type “chmod 666 /dev/ttyUSB0”, then hit the enter key.

You will be presented with another “#” prompt.

You are done with the Terminal Emulator now, but leave it running in the background, and start up Torque Pro.

I am using Torque Pro version 1.8.34, downloaded from the Asteroid Market.

After starting Torque Pro for the first time, touch the menu button, go into “Settings”, then “OBD2 Adapter Settings”, then “Connection Type”, then put the bullet into “TTY (/dev/ttyUSB0)”.

I then scrolled down in this menu, a little below “Connection Type”, and put a check in the box for enabling faster communication. That worked on my car, but maybe not yours. Torque Pro reports between 22 and 30 PIDS per second for my car, configured this way.

When you back out of the config menu, Torque Pro should start pushing protocol tests to the OBD-II port, to see how it can connect. On my American GM car, it found and connected on the J1850 VPW(10.4K) protocol.

Torque Pro will hold the ttyUSB0 and fast connection configuration settings on exit, so if it doesn’t connect in a minute or so of trying, then exit out and re-start the app.

In the worst case scenario, switch the car off & reboot the Asteroid Smart, and start from scratch after the boot. Start Terminal and make the two entries (ie. “su” and “chmod 666 /dev/ttyUSB0”), then restart Torque Pro after that.

General comments:

There is some definite weirdness in the way Torque Pro connects with the OBDLink S. I found that if I started the engine after I already had it connected to the OBD-II port, then Torque Pro would drop the connection and it would not be able to restart it. For the most certain connection results, probably it’s best to start the engine first, even before starting the Terminal program on the Asteroid Smart.

Torque Pro would also lose the connection if the dashboard lights came on. My car has its dash lights run to the trigger wire on the Asteroid Smart that re-draws everything for “darkness mode”. Torque Pro really didn’t like that happening and interrupting its processes. I had the 6-gauge window up at the time, and the gauges all suddenly switched 90* into portrait view, and then back to landscape view, when the dash lights came on, dropping the OBD-II protocol at the same time. It never reconnected until I re-started everything from scratch.

Any of you who use a Bluetooth dongle with Torque Pro on your Asteroid Smart, I would be curious if you experience the same weirdness with the connection dying with the dashboard lights, and the engine starter.

Sometimes Torque Pro takes a lot of time to connect, even when everything is done perfectly. It just keeps trying all the different protocols, and never establishing connection. This just seems random, and I’m not sure whether I just have a flaky ODBLink S, or it’s some other reason. But if you have done everything the way this guide explains, just keep trying, and eventually you should connect. I just started seeing this flaky behaviour with the OBDLink S on my Windows 7 PC, so I don’t think it’s anything specific to the Asteroid Smart now. Just be patient, and don’t give up.

Some people will doubtless prepare a script to avoid having to type all that stuff into Terminal every time they start Torque Pro. I have not experimented with doing that yet, but obviously it would be far more convenient.

From what I have read, I understand that a blanket permission change with the command “chmod 666 /dev/ttyUSB0”, is some kind of software security risk, but there must be people here at XDA who can comment more knowledgably on that. There may be a less-risky command to change the permissions, but I can tell you from personal experience that the “chmod” one actually works, so I will accept the security risk for now, unless someone offers a better way.

Finally, note that I only have the GPS and the OBDLink S plugged into my USB ports on the Asteroid Smart, and by default, the OBDLink S always gets assigned to ttyUSB0 on boot. If you had more, less, or different USB devices plugged into the Asteroid Smart on boot, I don’t know whether the OBDLink S would get assigned to ttyUSB0 or not. Obviously, that would change everything. Check in Terminal using the “dmesg” command to be sure where your Prolific driver gets assigned on boot, either to 0 or 1.