GPS on the Neo 1973

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m (comments)
Line 19: Line 19:
 
  echo 0 > /sys/class/leds/gta01\:vibrator/brightness
 
  echo 0 > /sys/class/leds/gta01\:vibrator/brightness
 
  mknod /tmp/nmeaNP p
 
  mknod /tmp/nmeaNP p
  cat /tmp/nmeaNP | tee /media/card/gps.nmea >> /tmp/gps.nmea &
+
  cat /tmp/nmeaNP >> /tmp/gps.nmea &
 
  /home/root/DM2/gps/gllin -low 5
 
  /home/root/DM2/gps/gllin -low 5
  strace /home/root/DM2/gps/gllin >> /tmp/gps.strace 2>&1
+
  /home/root/DM2/gps/gllin -periodic 3
  
 
He also [http://pavelmachek.livejournal.com/39659.html succeeded]
 
He also [http://pavelmachek.livejournal.com/39659.html succeeded]
 
at getting the Neo1973 to act like a bluetooth GPS with the following
 
at getting the Neo1973 to act like a bluetooth GPS with the following
script:
+
script: (Notice that script has bad problems if you run it more than once. You can get "time traveling GPS" effect, with GPS showing you your past position).
  
 
  #!/bin/sh
 
  #!/bin/sh
 +
killall rfcomm tail
 
  mknod /dev/rfcomm0 c 216 0
 
  mknod /dev/rfcomm0 c 216 0
 
  echo 1 > /sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/gta01-pm-bt.0/power_on
 
  echo 1 > /sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/gta01-pm-bt.0/power_on
Line 37: Line 38:
 
  sdptool add SP
 
  sdptool add SP
 
  (
 
  (
while true; do
+
        while true; do
rfcomm listen /dev/rfcomm0 1
+
        rfcomm listen /dev/rfcomm0 1
sleep 1
+
        sleep 1
done
+
        done
 
  ) &
 
  ) &
 
  (
 
  (
while true; do
+
        while true; do
tail -f /tmp/gps.nmea > /dev/rfcomm0
+
            tail -f /tmp/gps.nmea > /dev/rfcomm0
sleep 1
+
            echo 1 > /sys/class/leds/gta01\:vibrator/brightness
done
+
            sleep 1
 +
            echo 0 > /sys/class/leds/gta01\:vibrator/brightness
 +
        done
 
  ) &
 
  ) &
 +
  
 
As people develop more sophisticated GPS applications, please note them here.
 
As people develop more sophisticated GPS applications, please note them here.

Revision as of 10:19, 7 June 2007

The Neo1973 device contains an integrated GPS. The particular device is marketed as an AGPS, and there is some discussion available as to what significance that "A" might have.

As of P1, a binary-only program for talking the the GPS is available in /home/root/DM2/gps, (and presumably, the same binary would function on a P0 device). There is an ongoing effort to write a Free Software program that could be used instead of this binary-only program. See Hammerhead_protocol for details and the latest status.

In the meantime, Pavel Machek provides the following script for recording an NMEA stream from the binary program:

#!/bin/sh
echo 1 > /sys/class/leds/gta01\:vibrator/brightness
killall gllin cat
sleep 1
echo 0 > /sys/class/leds/gta01\:vibrator/brightness
mknod /tmp/nmeaNP p
cat /tmp/nmeaNP >> /tmp/gps.nmea &
/home/root/DM2/gps/gllin -low 5
/home/root/DM2/gps/gllin -periodic 3

He also succeeded at getting the Neo1973 to act like a bluetooth GPS with the following script: (Notice that script has bad problems if you run it more than once. You can get "time traveling GPS" effect, with GPS showing you your past position).

#!/bin/sh
killall rfcomm tail
mknod /dev/rfcomm0 c 216 0
echo 1 > /sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/gta01-pm-bt.0/power_on
sleep 1
hciconfig hci0 up name linuxgps
sleep 1
sdpd
sleep 1
sdptool add SP
(
        while true; do
        rfcomm listen /dev/rfcomm0 1
        sleep 1
        done
) &
(
        while true; do
            tail -f /tmp/gps.nmea > /dev/rfcomm0
            echo 1 > /sys/class/leds/gta01\:vibrator/brightness
            sleep 1
            echo 0 > /sys/class/leds/gta01\:vibrator/brightness
        done
) &


As people develop more sophisticated GPS applications, please note them here.

Here are some ideas for possibilites:

  • Cairo-based mapping
  • Routing
  • Openstreetmap logger, (with voice annotations)

See openstreetmap - this is a page which needs fleshed out to a proper application page.

Personal tools

The Neo1973 device contains an integrated GPS. The particular device is marketed as an AGPS, and there is some discussion available as to what significance that "A" might have.

As of P1, a binary-only program for talking the the GPS is available in /home/root/DM2/gps, (and presumably, the same binary would function on a P0 device). There is an ongoing effort to write a Free Software program that could be used instead of this binary-only program. See Hammerhead_protocol for details and the latest status.

In the meantime, Pavel Machek provides the following script for recording an NMEA stream from the binary program:

#!/bin/sh
echo 1 > /sys/class/leds/gta01\:vibrator/brightness
killall gllin cat
sleep 1
echo 0 > /sys/class/leds/gta01\:vibrator/brightness
mknod /tmp/nmeaNP p
cat /tmp/nmeaNP | tee /media/card/gps.nmea >> /tmp/gps.nmea &
/home/root/DM2/gps/gllin -low 5
strace /home/root/DM2/gps/gllin >> /tmp/gps.strace 2>&1

He also succeeded at getting the Neo1973 to act like a bluetooth GPS with the following script:

#!/bin/sh
mknod /dev/rfcomm0 c 216 0
echo 1 > /sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/gta01-pm-bt.0/power_on
sleep 1
hciconfig hci0 up name linuxgps
sleep 1
sdpd
sleep 1
sdptool add SP
(
	while true; do
	rfcomm listen /dev/rfcomm0 1
	sleep 1
	done
) &
(
	while true; do
	tail -f /tmp/gps.nmea > /dev/rfcomm0
	sleep 1
	done
) &

As people develop more sophisticated GPS applications, please note them here.

Here are some ideas for possibilites:

  • Cairo-based mapping
  • Routing
  • Openstreetmap logger, (with voice annotations)

See openstreetmap - this is a page which needs fleshed out to a proper application page.