Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: [Android Development] Can OBDSim help me ?

  1. #21
    Newbie
    Join Date
    Mar 2012
    Posts
    10
    I have another question gary. To be frank Its still a bit blurry for me. Ok the thing is I am developing an application which can suggest a driver when to change a gear in a car. So the android device would be connected to the ELM 327 bluetooth. But the problem is I cant use that to develop since I dont have a car now. What I want to do is use your OBDSIM.
    1. So is this useful to just get data like speed and RPM? Say I jus developed a simple app with bluetooth, so what kind of data would be sent?which format?Can it be displayed in a phone?
    2.Would I be able to send any queries to the simulator.For eg I have to send an AT command to get data from ELM 327,and I want the data to be real time and fast.SO is this possible?

  2. #22
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    Look at it this way; the simulator is meant to be simulating a car + ELM327. Basically, it simulates everything you need to do this work.

    So, yes. You can ask it for RPM and speed, and it will happily deliver. "fast" is an interesting subject, as different cars, and different dongles, have different samplerates. OBDSim has a bunch of stuff built in for making the timing work right, including a few ELM optimisations.

    As for what data in what format... it's an elm327. 90% of what I know about communicating with ELM devices I learned from the ELM327 datasheet. I honestly recommend that you try it. Grab that datasheet. Start up obdsim. Using putty, or hyperterminal, or some COM-port-communicating-thing-of-your-choice [I use PuTTY], and get started. It's a human-interactible protocol. There's an explanation of what you want to do here; but instead of "OBDII tool of your choice", you want "PuTTY".

    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  3. #23
    Newbie
    Join Date
    Mar 2012
    Posts
    10
    Quote Originally Posted by chunkyks View Post


    That gui is simply one of the generators, called gui_fltk. It should be the default on windows if it's compiled in [did you build obdsim yourself? if so, you'll need to have included FLTK support for the GUI to be there. If you downloaded the binary from my site, it comes with gui_fltk statically linked]. You can tell if it's compiled in by using "--list-generators"; if it's available, "gui_fltk" will be listed there.

    Gary (-;
    I have a few questions now.
    1. I dont have this generator gui_fltk in the list. What am I supposed to do.I downloaded and extracted the obdsim,set up the comocom and thats it. The build folder in my obdsim extracted folder is empty but as I mentioned before when I open obdsim.exe i m getting that raw outputs.
    2. I used a bluetooth dongle and then in the settings created a comport,if this is what you mean.Its an incoming one and I changed the second port in comocom to COM3. Is this what you meant?
    a.If so ,can I start to connect from my phone.I wrote an app where I can send a message using bluetooth.So will I be able to send AT commands?
    b.If not, what is supposed to be done.I am not at all familiar with Linux tats the problem. So much that I dont know how to download and extract the OBDSIM.Ofcourse the linux would be on a virtual machine.

    I am almost ready with my application.Only need to connect to the simulator and display the data

  4. #24
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127
    I'm not 100% sure how you do it on windows, but I think that the com port you created in your settings you want to point obdsim at. obdsim.exe -w COM3 or whatever the com port you created for bluetooth. Then you should (in theory, if it works anything like linux) be able to connect via rfcomm over bluetooth from android.
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  5. #25
    Newbie
    Join Date
    Mar 2012
    Posts
    10
    Hey this is what I did, and I am getting the following output. But still not connected to the android device. I am not sure if its a COM port that is opened
    SIMPort name:COM3
    Succesfully initialised obdsim,entering main loop
    10.000447 seconds. 0 samples, 0 queries. 0.00 s/s, 0.00 q/s
    10.000244 seconds. 0 samples, 0 queries. 0.00 s/s, 0.00 q/s
    10.000603 seconds. 0 samples, 0 queries. 0.00 s/s, 0.00 q/s
    10.000394 seconds. 0 samples, 0 queries. 0.00 s/s, 0.00 q/s

    Hey Gary, How do I get the generator fltk . Right now its not in . Could you also help me with the previous question?

  6. #26
    Newbie
    Join Date
    Mar 2012
    Posts
    10
    Quote Originally Posted by chunkyks View Post
    The simport name will always be unknown when you first open the bluetooth simport. I don't remember what it becomes when it's not unknown, but it's not on startup

    The mistake you made is almost certainly the bind; you need to bind to the mac address of your bluetooth chip in the PC that obdsim is running on, not to your phone. I think the way to go is:
    1) First, reboot. Bluetooth seems to carry all kinds of weird state with it, even when you unplug&replug the bluetooth card. Of course, this is linux so it's probably not strictly necessary, but I don't know which modules need to be reloaded for it to do the right thing.
    2) Run those commands to make your PC advertise it can do serial correctly
    3) Pair your phone to your pc
    4) Run obdsim -b.
    5) Stick it in the camel and go.

    Sorry if that's a bit arcane... linux bluetooth sometimes seems that way, although it's definitely less arcane than the windows equivalent :-)

    Gary (-;
    Hey I installed it on Linux. But even then there seems to be a problem .Please help me with it.Check below
    I used the commands
    sudo rfcomm bind 0 7C:61:932:0C:BA 1
    sudo sdptool add SP
    and I got a message serial port registered
    but then when I used the command obdsim -b it said OBDSim :Invalid option --' b' . What am i supposed to do now please help

  7. #27
    Newbie
    Join Date
    Mar 2012
    Posts
    10
    Hey Gary,
    I have few dumb questions again. I have installed linux(Ubuntu 12.04 desktop) on virtual box ,i installed obdgpslogger using package manager. Then I also installed cmake. Now I have created a folder build in OBDGPslogger folder.In that I used the command cmake.. and it says VirtualBox:~/Documents/obdgpslogger$ cmake ..
    CMake Error: The source directory "/home/xyz/Documents" does not appear to contain CMakeLists.txt.
    Specify --help for usage, or press the help button on the CMake GU

    COuld you help me with the setup process in detail please since I am a noob

  8. #28
    Newbie
    Join Date
    Sep 2012
    Posts
    1
    I had this same problem when trying to use "./obdsim -b" from ubuntu and then connecting android device using torgue lite to it. I didnt get any error reports or anything but it just didnt work.. I did little bit code inspection and noticed that it used hard coded bt channel 1 but in my system (ubuntu 11.10 or 12.10) it was already taken by DUN service so it could not work. I'll quickly summarize how i got it working and i can provide code changes if someone needs or if Gary wants to integrate those in. I'm sure this is not the only way to fix this but this is how i did:

    So first I needed to find free bt channel:
    "sdptool browse local"
    and find the biggest channel number which was 13 in my system.then I added new service for next free channel which is 14:
    "sdptool add --channel=14 SP"
    then finding the my bt dev address:
    "hcitool dev"
    then binding channel 14 to rfcomm0:
    "sudo rfcomm bind 0 12:23:34:45:56:67 14"

    then I modified code so that i can give that channel number as argument to obdsim like this:
    "./obdsim -b 14"

Page 3 of 3 FirstFirst 123

Similar Threads

  1. OBDSim help?
    By preet in forum OBDSim
    Replies: 7
    Last Post: 05-18-2011, 12:29 AM
  2. OBDsim with FB
    By nemo1 in forum OBDSim
    Replies: 2
    Last Post: 10-25-2010, 09:33 PM
  3. What is OBDSim?
    By chunkyks in forum OBDSim
    Replies: 0
    Last Post: 09-20-2010, 02:26 PM
  4. CF with my OBDSim
    By chunkyks in forum Centrafuse
    Replies: 0
    Last Post: 09-15-2010, 02:02 PM
  5. New Toy: obdsim
    By chunkyks in forum OBDII GPS Logger
    Replies: 7
    Last Post: 07-02-2009, 11:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •