pavelmachek (pavelmachek) wrote,

OpenMoko time-traveling gps

So I managed to turn openmoko into bluetooth GPS. I used simple 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
) &


And it kind-of worked. Unfortunately, I managed to create time-travelling GPS: it shown possition ten minutes ago, with time sometimes going too slow, sometimes too fast. I guess the strace overloaded poor ARM cpu?

(And yes, gllin was shipped in binary-only form on phase1 openmokos. See hammerhead protocol in wiki.openmoko.org).
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments