Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: How-To: Ubuntu 9.04: build, configure, and run

  1. #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)
    Attached Files Attached Files

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

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    That's fantastic stuff, thank-you!

    A couple things that might make your life easier:
    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.

    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 (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  3. #3
    Newbie
    Join Date
    Jun 2009
    Posts
    8
    Thanks for the tweaks, I'll add it to my howto

    Quote Originally Posted by chunkyks View Post
    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!

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

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    Thanks! Committed to svn.

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

  5. #5
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    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"

  6. #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.

  7. #7
    Newbie
    Join Date
    Jun 2009
    Posts
    8
    newly updated how-to file with complete udev configuration.

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

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    That's great and very helpful, thank-you!

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

  9. #9
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    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

  10. #10
    Newbie
    Join Date
    Jun 2009
    Posts
    8
    Quote Originally Posted by cgalpin View Post
    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.

Page 1 of 2 12 LastLast

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
  •