GPS Sensors
From Combustory
Revision as of 19:46, 29 January 2011 by Jvaughters (Talk | contribs)
Welcome to Combustory
Any questions or comments:
- Send them to - combustor@combustory.com
|
Pharos GPS-500
Device Set Up on Linux
- Plug in GPS-500 device to a USB port
- Search for device on computer
lsusb
This command should result in finding the Prolific Tech. line as seen below.
example output:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 008: ID 067b:aaa0 Prolific Technology, Inc. Prolific Pharos Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
- Search for a tty device
ls /dev
Look for a tty device: ttyUSB0 or ttyUSB1 or any other ttyUSBx, which depends on how many USB serial devices you have set up. (This was done on Fedora, other OS's may have a different designation)
View Data
- You may need to use sudo to allow permissions to the tty.
- This command will set the device to allow you to log data via tail or cat
stty -F /dev/ttyUSB0 cs8 4800 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts
- View raw data after stty command
cat /dev/ttyUSB0
- Log Data - You will need to manage the log file sizes
cat /dev/ttyUSB0 >> gps_log
- Log Data with Filter - This significantly cuts down on the number of strings and is really the only string you need.
cat /dev/ttyUSB0 | grep GPRMC >> gps_logs