Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Linux


Reply
 
Share Thread Tools Display Modes
Old 01-02-2009, 08:50 PM   #1
Low Bitrate
 
yam125's Avatar
 
Join Date: Oct 2008
Location: Tracy, Ca
Posts: 100
yam125 is an unknown quantity at this point
Automating GPS device in linux

before i use any gps app i have to run

Code:
sudo rfcomm release 4 rfcomm connect 4 gpsd -n /dev/rfcomm4

what can i do to automate this?
yam125 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 01-02-2009, 08:59 PM   #2
Low Bitrate
 
Join Date: Mar 2000
Location: Northville, MI, USA
Posts: 65
strandtc
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
strandtc is offline   Reply With Quote
Old 01-02-2009, 10:16 PM   #3
Low Bitrate
 
yam125's Avatar
 
Join Date: Oct 2008
Location: Tracy, Ca
Posts: 100
yam125 is an unknown quantity at this point
is the sudo in the release command going to work?
yam125 is offline   Reply With Quote
Old 01-02-2009, 11:00 PM   #4
Constant Bitrate
 
Join Date: May 2008
Posts: 173
Sicarius is on a distinguished road
Quote: Originally Posted by yam125 View Post
is the sudo in the release command going to work?

If you're putting those in an init script, it will be run as root anyway and you can remove the "sudo" from that line.
Sicarius is offline   Reply With Quote
Old 01-03-2009, 01:11 AM   #5
Low Bitrate
 
yam125's Avatar
 
Join Date: Oct 2008
Location: Tracy, Ca
Posts: 100
yam125 is an unknown quantity at this point
here is my /etc/init.d/gpssamp.sh

Code:
#!/bin/sh rfcomm release 4 rfcomm connect 4 gpsd -n /dev/rfcomm4

to put it there i used

Code:
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

works just fine when manually started but wont do it on start

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 close terminal(bc i dont have a control key)

then i can run roadnav and it picks the reciver up
yam125 is offline   Reply With Quote
Old 01-08-2009, 12:49 AM   #6
Low Bitrate
 
yam125's Avatar
 
Join Date: Oct 2008
Location: Tracy, Ca
Posts: 100
yam125 is an unknown quantity at this point
help?
yam125 is offline   Reply With Quote
Old 01-27-2009, 12:07 PM   #7
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
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.
__________________
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 online now   Reply With Quote
Old 01-29-2009, 11:41 AM   #8
Low Bitrate
 
yam125's Avatar
 
Join Date: Oct 2008
Location: Tracy, Ca
Posts: 100
yam125 is an unknown quantity at this point
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?
yam125 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 01-30-2009, 12:06 AM   #9
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 yam125 View Post
...
Also can I link to the script file from the sessions (System \ Preferences\ Sessions \ Startup Programs) menu?

yep, that's easy enough
__________________
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 online now   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
How to Embed any GPS program into Road Runner jonessc RR FAQ 52 10-28-2009 12:10 PM
How to setup iGuidance GPS for RoadRunner MatrixPC RR FAQ 31 05-22-2009 09:29 AM
Getting Started with GPS grepzen The FAQ Emporium 12 09-26-2006 06:54 AM
GPS device diagnostic lastberserker GPS 12 05-12-2005 02:15 PM
Can a GPS antenea be recognized as a Serial and a USB device? Skipjacks GPS 6 01-21-2005 03:12 PM



All times are GMT -5. The time now is 09:06 PM.


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