great job. I'll do this inside LinuxICE to make things easier.
will obdgpslogger automatically create the path to the db?
So, finally I have obdgpslogger and gpsd both working with udev hotplug, on ubuntu 9.04
My USB OBDII devices are FTDI.
My USB GPS device is pl2303.
1) Making gpsd work
a) Copy /lib/udev/rules.d/40-gpsd.rules to /etc/udev/rules.d/40-gpsd.rules
b) Edit /etc/udev/rules.d/40-gpsd.rules. Comment out the line for idVendor 0403 and idProduct 6001, and modify the two pl2303 lines so that the permissions will let gpsd access it:
c) Edit /lib/udev/gpsd.hotplug.wrapperCode:# Prolific Technology, Inc. PL2303 Serial Port SYSFS{idVendor}=="067b", SYSFS{idProduct}=="2303", SYMLINK="gps%n", MODE:="0666", RUN+="/lib/udev/gpsd.hotplug.wrapper" # ATEN International Co., Ltd UC-232A Serial Port [pl2303] SYSFS{idVendor}=="0557", SYSFS{idProduct}=="2008", SYMLINK="gps%n", MODE:="0666", RUN+="/lib/udev/gpsd.hotplug.wrapper"
Take out the line
and put this there instead:Code:. /lib/udev/hotplug.functions
d) sudo dpkg-reconfigure gpsdCode:wait_for_file() { [ -e "$1" ] && return 0 local count=0 while sleep 1; do let count=count+1 [ -e "$1" ] && return 0 if [ $count -gt 60 ]; then return 1 fi done }
Launch on boot - yes
Leave the automatic device list empty
Should gpsd handle devices automatically - yes
Options to gpsd: "-F /var/run/gpsd.sock"
2) Make obdgpslogger hotplug work
a) Put this in /etc/udev/rules.d/40-ftdi.rules
b) Configure obdgpslogger to do what you wantCode:SUBSYSTEM!="tty", GOTO="ftdi_rules_end" ACTION=="add", SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6001", RUN+="/usr/local/bin/obdgpslogger -ms /dev/%k" LABEL="ftdi_rules_end"
Edit /etc/obdgpslogger [if it doesn't exist, just create it]. Set it to put the logfile in the right place:
If you have a device that defaults to 38400 instead of 9600 [eg, an OBDLink], then you also need to put that in the config file:Code:log_file=/media/usbthumb/carlog.db
The obdgpslogger half is covered in a bit more detail in doc/auto_launch in your svn checkoutCode:baudrate=38400
Gary (-;
OBDGPSLogger, for logging OBDII and/or GPS data
OBDSim, an OBDII/ELM327 software simulator
mp3car forums: obdgpslogger, obdsim
great job. I'll do this inside LinuxICE to make things easier.
will obdgpslogger automatically create the path to the db?
Former author of LinuxICE, nghost.
Current author of nobdy.
Oops, forgot to add a thing about gpsd permissions. Fixed.
Gary (-;
OBDGPSLogger, for logging OBDII and/or GPS data
OBDSim, an OBDII/ELM327 software simulator
mp3car forums: obdgpslogger, obdsim
OBDGPSLogger doesn't automatically create a path to the db. The default is "./obdgpslogger.db". If you want it set to something else, that's what the config file /etc/obdgpslogger is for.
Gary (-;
OBDGPSLogger, for logging OBDII and/or GPS data
OBDSim, an OBDII/ELM327 software simulator
mp3car forums: obdgpslogger, obdsim
Oh. And if gpsd.hotplug.wrapper doesn't exist on your system at all, try this one:
Gary (-;Code:#! /bin/bash # $Id: gpsd.hotplug.wrapper 4669 2008-01-21 15:07:00Z esr $ #debian addition: [ ! -r /etc/default/gpsd ] || . /etc/default/gpsd [ "$START_DAEMON" = "true" ] || exit 0 [ "$USBAUTO" = "true" ] || exit 0 if [ "$ACTION" == "remove" ] ; then if [ $(echo $DEVLINKS | grep -q /dev/gps) ] ; then exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME" fi exit 0 fi # . /lib/udev/hotplug.functions wait_for_file() { [ -e "$1" ] && return 0 local count=0 while sleep 1; do let count=count+1 [ -e "$1" ] && return 0 if [ $count -gt 60 ]; then return 1 fi done } # wait for /usr & /var to be mounted wait_for_file /usr/bin/python && \ wait_for_file /var/run && \ exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
OBDGPSLogger, for logging OBDII and/or GPS data
OBDSim, an OBDII/ELM327 software simulator
mp3car forums: obdgpslogger, obdsim
Configured everything except for the obdgpslogger part. I don't have /etc/obdgpslogger in my directory (step 2b).
What does that mean? I've never run obdgpslogger before?
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
It doesn't create /etc/obdgpslogger by default, just create one yourself. [Added that to the top post]
Gary (-;
OBDGPSLogger, for logging OBDII and/or GPS data
OBDSim, an OBDII/ELM327 software simulator
mp3car forums: obdgpslogger, obdsim
Bookmarks