Connect obdsim to Torque(android app) Ubuntu
Asked Answered
P

2

7

Am trying to connect odbsim through bluetooth with my Samsung S4. After successfully pairing my devices with ubuntu, my results connecting obdsim with phone is never happened.

Whenever I tried running the command obdsim -b it always throwing error: SimPort name: Not yet connected

I tried connecting it with windows too, with the help of com0com serial port, but couldn't succeded. And in windows, obdsim -b results in invalid options.

Please help me to connect the simulator with android device.

Thanks,
Boopathy.

Psychedelic answered 8/9, 2014 at 8:51 Comment(3)
I have the same problem. But for me, when opening it in Linux(Ubuntu 14.04) "obdsim -b" gives me invalid options problem. You seems to have not getting it. How did you install obdsim in linux?Donniedonnish
Anyway in following site: blog.lemberg.co.uk/how-guide-obdii-reader-app-development "...The one that worked for me is OBDSim: ...Since Bluetooth is not supported on Windows, rebuilding it from scratch in Linux will be necessary. Please note that most likely it will require you to modify the source code and change RFCOMM channel to the first available instead of channel 1...."Donniedonnish
Although he says it is not supported in windows, according to this(#13164650) it may not be true.Donniedonnish
D
9

I had the same problem on Linux and I resolved it installing some libraries and recompiling OBDSim.

I will put here the whole process to make a guide for new users like me.

  1. Download OBDSim:

    wget http://icculus.org/obdgpslogger/downloads/obdgpslogger-0.16.tar.gz 
    

    Or get the most recent version from: http://icculus.org/obdgpslogger/

  2. Install OBDSim:

    tar -zxvf obdgpslogger-0.16.tar.gz
    cd obdgpslogger-0.16
    mkdir build
    cd build
    

    I have to install only these libraries, but in your case keep attention to warning messages of cmake and install all that it ask you to install:

    sudo apt-get install libbluetooth-dev libfltk1.1-dev libfltk1.1 fltk1.1-doc fluid fftw3-dev libgps-dev libftdi-dev
    cmake .. 
    make obdsim
    cd ../bin/
    
  3. Run OBDSim:

    ./obdsim -b -g gui_fltk
    

    Now you have OBDSim running, but you need a channel to communicate it with your app. You need a serial port working as a bluetooth interface.

  4. Creating the serial->bluetooth interface:

    sudo rfcomm bind 0 00:00:00:00:00:00 1 # Change this MAC address, putting the MAC of your device
    sudo sdptool add SP
    

    You can discover the MAC address of your device by using hcitool:

    hcitool scan 
    

    It only works when the bluetooth configuration "Visible to all nearby Bluetooth devices" is on in your device.

Doorstep answered 12/11, 2014 at 3:10 Comment(2)
Just a few notes: 1) use the MAC address of your pc (and not the MAC of your android phone for example) at step 4. 2) I used the suggestions in this video comments youtube.com/watch?v=-dMjo5ySbcc and used channel 14 instead of 1 avoiding conflicts on channel. 3) my sdptool didn't worked until I followed this topic: bbs.archlinux.org/viewtopic.php?id=201672 and changed sdptool configuration to accept deprecated commands (change the line ExecStart=/usr/lib/bluetooth/bluetoothd into ExecStart=/usr/lib/bluetooth/bluetoothd --compat in /etc/systemd/system/dbus-org.bluez.service)Koralle
Thank you. Odbsim is perfectly working in ubuntu 20.04.Sinclair
D
8

I have used almost the same method described here and here and it worked. It worked without using com0com.

  1. Pair the android device with the computer.
  2. In Torque app, go to Settings -> OBD2 Adaptor Settings -> Choose Bluetooth Device. Select your Computer Name.
  3. Set the incoming COM Port of bluetooth as COM#Number . Assume it is COM10 (Use https://www.verizon.com/support/knowledge-base-20605/)
  4. Use obdsimwindows-2011-06-11 build. Can be downloaded from http://icculus.org/obdgpslogger/downloads/obdsimwindows-latest.zip
  5. Run obdsim.exe -w COM10
  6. Run the Torque app and see whether it connects automatically.

-g option is used to give a generator type. By default it is gui_fltk which is the GUI interface.

enter image description here

Donniedonnish answered 10/9, 2014 at 10:56 Comment(1)
In my case, Torque app did not connect automatically (step 6). If that happens to you, you just have to go to Torque App > Settings > OBD2 Adapter Settings > Choose Bluetooth Device > Choose your computerOnagraceous

© 2022 - 2024 — McMap. All rights reserved.