|
 |
06-14-2009, 12:55 AM
|
#1
|
|
Newbie
Join Date: Jun 2009
Posts: 8
|
How-To: Ubuntu 9.04: build, configure, and run
Here's what I did starting from a default base Ubuntu 9.04 install on my laptop to make this a functional piece of software.
I started with the obdgpslogger-0.5.tar.gz file that I downloaded on Saturday June 6 2009 at 09:42 am. There have been updates to the source code repository since then, so YMMV.
You will almost certainly want to check out the latest version from the svn repository regardless of which tar.gz file you download - updates are constantly being made.
edit: updated the attached file. (04)
edit: updated the attached file - more clarifications. (05)
edit: added complete udev device setup instructions. (06)
edit: fixed typos and updated udev rules. (07)
Last edited by smokeybreeze; 06-22-2009 at 06:26 PM.
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
06-14-2009, 12:00 PM
|
#2
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
That's fantastic stuff, thank-you!
A couple things that might make your life easier:
Quote:
OBD reported NO DATA for cmd 10: NO DATA
That would have led to you not getting any data logged at all, a problem that has since been resolved in svn.
Quote:
Set the OBDII USB (FTDI) device to the appropriate /dev/ttyUSB* device
Set the GPS device to the appropriate /dev/ttyUSB* or /dev/rfcomm* device
Those can be configured permanantly in one of two ways:
1) At compile-time, by modifying OBD_DEFAULT_SERIALPORT and OBD_DEFAULT_GPSPORT. Instead of running "cmake ..", run "ccmake .." and it'll present you a UI through which you can change options
2) In the svn version, you can configure it after compile-time by editing ~/.obdgpslogger and adding the lines
Code:
obddevice={full path to your obd device}
gpsdevice={full path to your gps device}
Thank-you very much!
Gary (-;
|
|
|
06-14-2009, 01:06 PM
|
#3
|
|
Newbie
Join Date: Jun 2009
Posts: 8
|
Thanks for the tweaks, I'll add it to my howto
Quote: Originally Posted by chunkyks 
That's fantastic stuff, thank-you!
A couple things that might make your life easier:
That would have led to you not getting any data logged at all, a problem that has since been resolved in svn.
Those can be configured permanantly in one of two ways:
1) At compile-time, by modifying OBD_DEFAULT_SERIALPORT and OBD_DEFAULT_GPSPORT. Instead of running "cmake ..", run "ccmake .." and it'll present you a UI through which you can change options
2) In the svn version, you can configure it after compile-time by editing ~/.obdgpslogger and adding the lines
Code:
obddevice={full path to your obd device}
gpsdevice={full path to your gps device}
Thank-you very much!
Gary (-;
When I retrieved the latest subversion source, I was getting seg. faults:
$ ./obdgpslogger -t -s /dev/ttyUSB0
Segmentation fault (core dumped)
$ gdb ./obdgpslogger ./core
(gdb) backtrace
#0 0xb7e87ebd in fclose () from /lib/tls/i686/cmov/libc.so.6
#1 0x080b44b4 in obd_loadConfig ()
#2 0x0804d60a in main ()
(gdb)
I tracked this down to my not having a config file (~/.obdgpslogger).
If I can make a suggestion for a patch in obdconfigfile.c - can't close a file stream that doesn't exist:
change lines 91-95:
Code:
if(NULL != f) {
obd_parseConfig(f,c);
}
fclose(f);
to
Code:
if(NULL != f) {
obd_parseConfig(f,c);
fclose(f);
}
Thanks again for your info!
|
|
|
06-14-2009, 09:28 PM
|
#4
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
Thanks! Committed to svn.
Gary (-;
|
|
|
06-15-2009, 10:54 AM
|
#5
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
smokeybreeze, you can control the usb device name assigned to usb devices using udev - so that you don't have to care what order they are plugged in.
I thought I had wikid this somewhere but can't find it. If you google for udev rules you'll find lots of info on how to add your own udev rule files in /etc/udev/rules.d for each device you want a fixed serial port name for (as well as do things like run scripts on insertion and removal).
For example a made a rule to give memory cards for my gopro hero camera the fixed name of /dev/hero and runs a script to archive the pictures/video when I insert it.
Code:
# rule to match Sandisk memory card used by gopro hero camera
KERNEL=="sd*1", BUS=="usb", SUBSYSTEMS=="scsi", DRIVERS=="sd", ATTRS{model}=="SDDR-113", ATTRS{vendor}=="SanDisk", SYMLINK+="hero" RUN+="/home/cgalpin/bin/hero_copy.sh %k"
|
|
|
06-16-2009, 12:08 AM
|
#6
|
|
Newbie
Join Date: Jun 2009
Posts: 8
|
thanks cgalpin, I'll be adding the udev options to the howto in the near future - didn't include them in the initial rev due to the added complexity. I wanted the shortest path in the initial howto publication.
|
|
|
06-20-2009, 09:32 PM
|
#7
|
|
Newbie
Join Date: Jun 2009
Posts: 8
|
newly updated how-to file with complete udev configuration.
|
|
|
06-21-2009, 12:28 PM
|
#8
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
That's great and very helpful, thank-you!
Gary (-;
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
06-22-2009, 09:45 AM
|
#9
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
Excellent!
First, please consider putting this on http://wiki.openice.org since it would be easier for people to find and take advantage of it, but also allow others to contribute over time. This post will be much harder for people to find.
Second, a couple questions about it
1. Can you explain why your rule must come after the gpsd rules? I was thinking if anything you'd want your rule to run first (although I can't give you a specific reason why  )
2. Is there a specific reason you run /lib/udev/gpsd.hotplug.wrapper in your rule? It shouldn't be needed for either since the gpsd udev rules do it for the gps, and it shouldn't affect the obdpro. You should be able to omit the RUN+= on both imo
hth
charles
|
|
|
06-22-2009, 06:26 PM
|
#10
|
|
Newbie
Join Date: Jun 2009
Posts: 8
|
Quote: Originally Posted by cgalpin 
Excellent!
First, please consider putting this on http://wiki.openice.org since it would be easier for people to find and take advantage of it, but also allow others to contribute over time. This post will be much harder for people to find.
Second, a couple questions about it
1. Can you explain why your rule must come after the gpsd rules? I was thinking if anything you'd want your rule to run first (although I can't give you a specific reason why  )
2. Is there a specific reason you run /lib/udev/gpsd.hotplug.wrapper in your rule? It shouldn't be needed for either since the gpsd udev rules do it for the gps, and it shouldn't affect the obdpro. You should be able to omit the RUN+= on both imo
hth
charles
I thought it should come before the gpsd rules also, but that didn't work for me. If my udev rules came before the gpsd rules, I found something such as the following resulted:
/dev/gps -> usbdev3.5_ep00
/dev/gps0 -> ttyUSB0
/dev/obd -> usbdev3.6_ep00
/dev/gps1 -> ttyUSB1
This meant that /dev/[gps,obd] were invalid serial devices, and gps0 would become gps1 if it were symlinked to ttyUSB1. Placing the udev rules after the gpsd rules solved these issues for me. I haven't researched this further yet.
As for the hotplug wrapper RUN rule, I included it out of benign ignorance. I have since tested the udev rules and found it to have no effect - I have eliminated it from the current how-to.
Thanks for the comments. I've updated the how-to and re-uploaded it.
|
|
|
06-23-2009, 12:23 PM
|
#11
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
smokeybreeze: So is it all working for you now? Post screenshots and/or kml files! :-)
Gary (-;
|
|
|
06-28-2009, 01:32 PM
|
#12
|
|
Newbie
Join Date: Jun 2009
Posts: 8
|
Quote: Originally Posted by chunkyks 
smokeybreeze: So is it all working for you now? Post screenshots and/or kml files! :-)
Gary (-;
Here's an RPM/Position shot from a recent errand. My VAG-Com software also tells me that module 10 isn't available, so I need to figure out a way to calculate mpg without MAF sensor data. My VAG-Com software can, so I need to spend more time looking into this.
|
|
|
06-28-2009, 07:25 PM
|
#13
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 408
|
Cool! Good to see stuff working :-D
Gary (-;
|
|
|
07-20-2009, 10:17 PM
|
#14
|
|
Low Bitrate
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
|
Hi!
This looks promising. I'll be trying it a matter of minutes.
Wish me luck!
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:13 PM.
| |