Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Engine Management, OBD-II, Engine Diagnostics, etc. > OBDII GPS Logger


Reply
 
Share Thread Tools Display Modes
Old 09-16-2009, 11:30 AM   #1
Admin. Don't bug or I'll byte.
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,142
Bugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to behold
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.
__________________
Want to:
-Find out about the iBug?
-Stop being a newbie? Take a look at the FAQ Emporium?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
-Help me kill my car PC
-Watch live video streams from my mobile PC? Check it out here.
-Where is the iBug?
Bugbyte is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 09-16-2009, 11:51 AM   #2
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,039
kev000 will become famous soon enough
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....
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development

Last edited by kev000; 09-16-2009 at 11:54 AM.
kev000 is offline   Reply With Quote
Old 09-16-2009, 12:34 PM   #3
Admin. Don't bug or I'll byte.
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,142
Bugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to behold
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?
__________________
Want to:
-Find out about the iBug?
-Stop being a newbie? Take a look at the FAQ Emporium?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
-Help me kill my car PC
-Watch live video streams from my mobile PC? Check it out here.
-Where is the iBug?
Bugbyte is offline   Reply With Quote
Old 09-16-2009, 02:56 PM   #4
Mod - OBDII GPS Logger forum
 
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
chunkyks is on a distinguished road
Quote:
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].

Quote:
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]

Quote:
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 (-;
chunkyks is offline   Reply With Quote
Old 09-16-2009, 08:42 PM   #5
Admin. Don't bug or I'll byte.
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,142
Bugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to behold
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=?]
__________________
Want to:
-Find out about the iBug?
-Stop being a newbie? Take a look at the FAQ Emporium?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
-Help me kill my car PC
-Watch live video streams from my mobile PC? Check it out here.
-Where is the iBug?
Bugbyte is offline   Reply With Quote
Old 09-16-2009, 08:47 PM   #6
Mod - OBDII GPS Logger forum
 
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
chunkyks is on a distinguished road
Quote:
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 :-)

Quote:
[Edit - tried telnet and got: GPSD,0=?]

Yeah. Didn't have a lock.

Gary (-;
chunkyks is offline   Reply With Quote
Old 09-16-2009, 09:55 PM   #7
Admin. Don't bug or I'll byte.
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,142
Bugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to behold
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?
__________________
Want to:
-Find out about the iBug?
-Stop being a newbie? Take a look at the FAQ Emporium?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
-Help me kill my car PC
-Watch live video streams from my mobile PC? Check it out here.
-Where is the iBug?
Bugbyte is offline   Reply With Quote
Old 09-17-2009, 12:15 AM   #8
Mod - OBDII GPS Logger forum
 
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
chunkyks is on a distinguished road
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!
chunkyks is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 09-17-2009, 12:20 AM   #9
Mod - OBDII GPS Logger forum
 
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
chunkyks is on a distinguished road
Also, FWIW, I've used the sheeva in my car with a super cheap 12v->120v inverter, and it worked great.

Gary (-;
chunkyks is offline   Reply With Quote
Old 09-18-2009, 08:38 AM   #10
Admin. Don't bug or I'll byte.
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,142
Bugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to behold
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?
__________________
Want to:
-Find out about the iBug?
-Stop being a newbie? Take a look at the FAQ Emporium?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
-Help me kill my car PC
-Watch live video streams from my mobile PC? Check it out here.
-Where is the iBug?
Bugbyte is offline   Reply With Quote
Old 09-18-2009, 08:41 AM   #11
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,039
kev000 will become famous soon enough
Quote: Originally Posted by Bugbyte View Post
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?

obdsim installs with obdgpslogger. should be in /usr/bin or /usr/local/bin
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
kev000 is offline   Reply With Quote
Old 09-18-2009, 09:00 AM   #12
Admin. Don't bug or I'll byte.
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,142
Bugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to behold
Hmm. I've got:

obd2csv obd2kml obdgpslogger obdgui

in /usr/local/bin but that's all obdgpslogger stuff, right?
__________________
Want to:
-Find out about the iBug?
-Stop being a newbie? Take a look at the FAQ Emporium?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
-Help me kill my car PC
-Watch live video streams from my mobile PC? Check it out here.
-Where is the iBug?
Bugbyte is offline   Reply With Quote
Old 09-18-2009, 09:33 AM   #13
n2k
Low Bitrate
 
n2k's Avatar
 
Join Date: Aug 2005
Posts: 77
n2k is on a distinguished road
How are you planing on using the gpsd ?

I've got gpsd running on my asus router and I've got it updating my webserver with location, and also got it connect to my pc so I can use it for navigation.

One thing I would love to do is get it to work with my ipod touch. that way I'd get like a wireless navigation and like a remote where-is-my-car
GPSSerial looked promising but they don't support gpsd yet. and it doesn't seem to be much demand for it.


this is a bit of topic but have you looked at Seagates new DockStar, it's sheeva based and from the pictures I've seen it looks smaller and have 4 usb ports.
Seagate FreeAgent DockStar

.n
n2k is offline   Reply With Quote
Old 09-18-2009, 09:58 AM   #14
Admin. Don't bug or I'll byte.
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,142
Bugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to beholdBugbyte is a splendid one to behold
The use of the Sheeva is to act as the connection between the outside world and a smart device such as an iPod touch or iPhone or any device that can run a web browser, for that matter. Could be a PC if you wanted.

The Sheeva will run php and be connected to a router either via WiFi or simply plugged into it. It will serve up information to the iPhone using php that will interface with the GPS, the Fusion Brain, OBDII, and perhaps XM. Obviously, anything you can connect to the Sheeva can be served up -a web cam or whatever.

Initially, the web pages will be on the Sheeva and will do real simple things like report the Sheeva's position to your iPhone via a web page. Or your current rpms. Stuff like that. Once that works, I want to move the source of those web pages out onto the internet and have some type of web app that lets users configure the interface the way they want it to be. The changes would be reflected instantly when you access the web page on the iPhone/smart device.

Another thing that I would dearly love to do is connect a touch screen to the Sheeva and figure out how to sync it with an app that is displayed by the iPhone (like a front end app). Screen clicks would be interpreted by the Sheeva and sent to the app, which would then react to the inputs. Alternatively, a Griffin Powermate or a keyboard emulator might be a way to do it.

All of that is pretty far off, though. I'm nowhere near as technically skilled as I need to be in either programming or architecture but I'm hoping that if I can get a proof of concept going that others will join in.
__________________
Want to:
-Find out about the iBug?
-Stop being a newbie? Take a look at the FAQ Emporium?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
-Help me kill my car PC
-Watch live video streams from my mobile PC? Check it out here.
-Where is the iBug?
Bugbyte is offline   Reply With Quote
Old 09-18-2009, 11:27 AM   #15
Mod - OBDII GPS Logger forum
 
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
chunkyks is on a distinguished road
Quote:
I've got:
obd2csv obd2kml obdgpslogger obdgui
in /usr/local/bin but that's all obdgpslogger stuff, right?

That's all obdgpslogger stuff, yes. It sounds like you have an older version downloaded [probably ~0.6, which pre-dates obdsim]. Grab the latest svn, and rebuild:

Code:
svn co svn://svn.icculus.org/obdgpslogger/trunk obdgpslogger cd obdgpslogger; mkdir build; cd build cmake .. make install

When you run cmake, check to see if it says anything about GPS; either that it found it, or it didn't. If it didn't, make sure to install libgps-dev

Gary (-;
chunkyks is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Bugbyte kill his car PC with an iTouch/iPhone install Bugbyte Worklogs 285 Yesterday 01:33 AM
Additional M2-ATX plug soyfish Power Supplies 8 05-26-2009 03:25 PM
SUPER T/S controller plug taKuto LCD/Display 0 11-14-2007 02:29 PM
Plug and play but where AJWatU LCD/Display 4 10-19-2007 05:39 PM
Anyone tried a micro Plug n Run mobo from Cell Computing? gibbo General Hardware Discussion 1 09-02-1999 08:20 PM



All times are GMT -5. The time now is 02:30 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics