Page 1 of 4 1234 LastLast
Results 1 to 10 of 33

Thread: Getting OBDGPSlogger to run on the Sheeva Plug

  1. #1
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2

    Getting OBDGPSlogger to run on the Sheeva Plug

    Okay, I'm moving the conversation about this from the Sheeva Plug Wishlist thread because it doesn't belong there anymore. This thread is about how to get OBSGPSlogger to run on the Sheeva plug. Right now, I'm stuck on step one.

    Step 1 - Install GPSD
    Obviously, you should install gpsd on the Sheeva using the apt-get install gpsd command to begin with.

    However, I had an additional problem with the Ubuntu Linux that came on the Sheeva plug. It doesn't contain a particular library to talk to USB devices that use the ftdi driver. In my case, my GPS uses this and other devices like my OBDII device use ftdi. What is ftdi? It is simply a driver that converts USB data into a serial port that applications can read. The problem was solved by upgrading my Ubuntu to a newer version for the Sheeva plug (version 2.6.30.6) which includes the ftdi libraries. Instructions for upgrading your plug are here.

    However, an additional complication arises because while the plug and OS now recognize the device, it cannot be accessed. The solution for this is to write a UDEV rule. On the Sheeva, there are two places for these rules: /etc/udev/rules.d and ALSO /lib/udev/rules.d. To get my gps to work properly, we had to create the following file called '40-gps.rules' in /etc/udev/rules.d

    Code:
    #KERNEL=="ttyUSB*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idProduct}=="2303", ATTRS{idVendor}=="067b", SYMLINK += mygps
    #KERNEL=="ttyUSB0", SYMLINK += mygps
    SYSFS{idVendor}=="067b", SYSFS{idProduct}=="2303", SYMLINK+="mygps"[
    This will construct a rules that will cause your device to show up in /dev as /dev/mygps. This is the device you configure gpsd to work with and you can change the configuration of the package with dpkg reconfigure gpsd to input the /dev/mygps as the device.

    To confirm that gpsd is working with your Sheeva, type 'cgps' in the terminal and the system will report the status of the gps.

    Step 2 - Install obdgpslogger

    Ensure that libgps-dev is installed. (apt-get install libgps-dev)

    Ensure that libgps17 is installed. (apt-get install libgps17)

    Access the repository and download obdgpslogger and build it (this step requires you to install the gcc compiler and also svn)

    Code:
    svn co svn://svn.icculus.org/obdgpslogger/trunk obdgpslogger
    cd obdgpslogger; mkdir build; cd build
    cmake ..
    make install
    Test the install to see if it is working. Try:
    Code:
    obdsim -o
    If that works, dowload down-to-vista.db and (making sure you are in the same directory as down-to-vista.db, try:
    Code:
    obdsim -o -g Logger -s down-to-vista.db
    Step 3 - Get the Sheeva Plug to Identify your OBDII device

    Configure obdgpslogger to allow it to work with hotplug so it recognizes your device when you plug it in. Follow the instructions here and then come back.
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  2. #2
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,560
    gpsd should be running... a `ps ax -f | grep gpsd` will tell you for sure. You should also see what args it was run with. Hopefully you'll see a /dev/mygps arg in there. If not, that means i forgot to configure it to use the new device after we got the rule running :-S.

    Second, I don't think obdgpslogger will run on just the gpsd. I think it needs to be able to open the serial device also. When I tried running the logger, it just pooped out with an error that it couldn't open the serial device. Thinking to what I should have done, I should have tested it with obdsim. But then I think it makes up data for gps as well as for obd (Gary plz confirm...).

    I think I'm going to try to convince the wife to let me get one of these bad boys. Messing a little with Bugbyte's got me thinking about cool stuff I could do with it... If that happens, it'll prompt me to get a repo going that will hopefully make this all easier. hmmm....
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  3. #3
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    I think it is running, alright. Here's what I got:

    Code:
    root@iPlug:/# ps ax -f | grep gpsd
    nobody    8665     1  0 14:54 ?        S<sl   0:00 /usr/sbin/gpsd -n -P /var/run/gpsd.pid /dev/mygps
    root      8855  8294  0 16:32 pts/0    S+     0:00 grep gpsd
    So, that means it is running, right? But it isn't spitting any data out, I don't think. I thought I could test this with cat /dev/mygps but all I get is a blank line. Should I see if there's a console program I can run that pulls data from gpsd and displays it?
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

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

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    But then I think it makes up data for gps as well as for obd (Gary plz confirm...).
    Nope. It only uses gpsd as a source of gps data. If you want to fake gps, then that's what gpsfake [comes in the box with gpsd] is for - no point reinventing the wheel, I figure.

    [while we're on the topic, if you want to do a "real" thing with faking obd using obdsim-logger, and gps, then be sure to create gpsfake data files as you're running at the same time].

    I thought I could test this with cat /dev/mygps but all I get is a blank line. Should I see if there's a console program I can run that pulls data from gpsd and displays it?
    cat /dev/mygps will cause problems with gpsd; you're setting up a race condition. That will confuse at least one of {you,gpsd}, and probably both. [I made this very mistake with minicom while working on obdgpslogger a while ago. Grrrr].

    I believe the tool you seek is "cgps". If that hasn't been built on your sheeva, then perhaps xgps [with X forwarding] will work. Failing all else, on the sheevaplug:
    Code:
    telnet localhost 2947
    and then, once connected, just type "o" and hit enter [Danger, Will Robinson! that protocol is deprecated, but still works for now]

    Second, I don't think obdgpslogger will run on just the gpsd. I think it needs to be able to open the serial device also.
    obdgpslogger will print a warning and then gracefully fall back to only logging one of the two data sources, if it cannot find the other. [of course, obdgpslogger built without gps support won't work with gps :-)]. If it cannot find either, it will exit.


    Erm. Now you mention it... did obdgpslogger build on your sheeva with gpsd support? You would have received a warning about it when you ran cmake. You need the package "libgps-dev" to build with gps supported, IIRC, which [should] depend on libgps17

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

  5. #5
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    Quote Originally Posted by chunkyks View Post
    I believe the tool you seek is "cgps". If that hasn't been built on your sheeva, then perhaps xgps [with X forwarding] will work. Failing all else, on the sheevaplug:
    Code:
    telnet localhost 2947
    and then, once connected, just type "o" and hit enter [Danger, Will Robinson! that protocol is deprecated, but still works for now]
    Okay, now where would I have found out about cgps? This is what drives me nuts about Linux. How am I supposed to know about that?

    Okay, I ran cgps and BAM! It show me that the device is a SiRF binary and is getting no fix, which is probably true. Everything else shows n/a, which it probably ought to. So, that means my gps works, right?

    Tomorrow I'll throw the GPS out on the roof and see if it gets a fix.

    [Edit - tried telnet and got: GPSD,0=?]
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

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

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    Okay, now where would I have found out about cgps? This is what drives me nuts about Linux. How am I supposed to know about that?
    In this particular case, it's in the "SEE ALSO" section of the gpsd manpage.

    I know, manpages can be pretty opaque; as a whole, they're the kind of thing that you should probably know what you're looking for before you go looking for it. But there are moments where they're infinitely useful. This is one of those moments :-)

    [Edit - tried telnet and got: GPSD,0=?]
    Yeah. Didn't have a lock.

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

  7. #7
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    W00T! It's working. cgps shows 6 satellites now that I've positioned the GPS closer to the window. Tomorrow, I'll see about trying to get obdIIgpslogger working with my OBDII device. I have two - one is OBDLINK-CI and the other is a standard ELM OBDII USB device. [EDIT - I put the GPS in view of the sky and am now getting fixes through GPSD via the GPS!]

    Once I get those working, I'll try it out in the car to see how it works, then mod the Sheeva for 12 volt operation.

    Gary - what is the best way to test the device in the house? Can I run 12v into the proper pins on the OBDII connector and then look for it on the plug?
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

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

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    Testing the device itself inside the house, I'm not sure. The best bet is a hardware simulator, but those tend to be expensive. Supposedly, *something* will happen if you just hook up those pins on the dongle, but you won't get data or anything useful like that.

    I'd suggest [of course :-D] using obdsim to test obdgpslogger while you're in your house. For a more "realistic" source of data, use obdsim with the "Logger" generator; that way you can use a log generated by obdgpslogger, and simulate that exact trip. For example, download down-to-vista.db, then run thus:
    Code:
    obdsim -g Logger -s down-to-vista.db
    It will print out what terminal to use [probably something like /dev/pts/4]. Pass that to obdgpslogger with the -s option, eg:
    Code:
    obdgpslogger -s /dev/pts/4 --spam-stdout
    If you have obdgpslogger in your path, obdsim has a pretty bad, hard-coded [and documented as such ] option, "-o", that attempts to launch obdgpslogger automatically, connecting it to the pseudoterminal obdsim created. It ain't ideal, but it will give you a bunch of spam on the console to show it's working.

    Gary (-;

    PS I think the above is my first ever premeditated use of a smiley on these forums. Go me!
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

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

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    Also, FWIW, I've used the sheeva in my car with a super cheap 12v->120v inverter, and it worked great.

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

  10. #10
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    Okay, help me out here again. There's no tarball for obdsim, right? I've accessed the repository through svn at http://svn.icculus.org/obdgpslogger/trunk/src/sim/

    If I just do an SVN copy of all the files in the sim folder, I should have all the files I'll need to build obdsim on the Sheeva, right? By that I mean that I don't need to check out the files, do I?

    I should be able to just follow the CMake process to build the simulator, correct?
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

Page 1 of 4 1234 LastLast

Similar Threads

  1. Replies: 334
    Last Post: 01-19-2011, 03:51 PM
  2. Additional M2-ATX plug
    By soyfish in forum Power Supplies
    Replies: 8
    Last Post: 05-26-2009, 02:25 PM
  3. SUPER T/S controller plug
    By taKuto in forum LCD/Display
    Replies: 0
    Last Post: 11-14-2007, 01:29 PM
  4. Plug and play but where
    By AJWatU in forum LCD/Display
    Replies: 4
    Last Post: 10-19-2007, 04:39 PM
  5. Anyone tried a micro Plug n Run mobo from Cell Computing?
    By gibbo in forum General Hardware Discussion
    Replies: 1
    Last Post: 09-02-1999, 07:20 PM

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
  •