before i use any gps app i have to run
what can i do to automate this?Code:sudo rfcomm release 4
rfcomm connect 4
gpsd -n /dev/rfcomm4
Printable View
before i use any gps app i have to run
what can i do to automate this?Code:sudo rfcomm release 4
rfcomm connect 4
gpsd -n /dev/rfcomm4
Do you have a start script for gpsd? Just add those lines to your start script, and you're done. You can either create a shell script to start gpsd, or better yet, have gpsd start in a boot script.
Look up info on init scripts. You can usually copy one for a different service, and modify it for your own needs.
-Chris
is the sudo in the release command going to work?
here is my /etc/init.d/gpssamp.sh
to put it there i usedCode:#!/bin/sh
rfcomm release 4
rfcomm connect 4
gpsd -n /dev/rfcomm4
works just fine when manually started but wont do it on startCode:cd /etc/init.d/
sudo gedit gpssamp.sh
sudo update-rc.d gpssamp.sh defaults
update-rc.d: warning: /etc/init.d/gpssamp.sh missing LSB style header
System startup links for /etc/init.d/gpssamp.sh already exist.
sudo chmod +x gpssamp.sh
then close terminal(bc i dont have a control key)Code:sudo /etc/init.d/gpssamp.sh
[sudo] password :
Connected /dev/rfcomm4 to 00:12:0E:80:D8:xx on channel 1
Press CTRL-C for hangup
then i can run roadnav and it picks the reciver up
help?
have a look at /etc/init.d/skeleton for a proper init script. That should give you a base to start from when creating your script.
the skeleton file looks really scary, after some searching I found a Start up script generator:
http://rob.pectol.com/content/view/17/33/
Also can I link to the script file from the sessions (System \ Preferences\ Sessions \ Startup Programs) menu?