December 2008 Archives
2008-12-29
FSO ogpsd working on the Glofiish M800
A bit late to blog, but anyway. The GPS part of freesmartphone.org, ogpsd, does now work on the gnufiish devices I own. (Only M800, but should be the same on the others).
For now we are using the SiRF III chip in NMEA mode. In opposite to the sirf binary mode we are not able to upload allmanac or other fancy things. Still we get a fast TTFF whcih lets me hope that the chip saves this useful data on its own.
One intereresting bit was that we need to drive the UART with a 57600 baudrate to get it working (For ublox we used 9600 so far). Once you figured this out it also tells you about it in a NMEA banner. A bit late. :)
$PSRFTXT,Version GSWLT3.0.0HT_3.1.01.00-SDKLT001P1.00b *4A $PSRFTXT,ETEN-20070119-NMEA57600_S_EE-LX*2C
2008-12-13
Using HSPA and GPS on my X200s
Since some days I replaced my old Thinkpad T40p mobile workstation with a new Thinkpad X200s. Higher performance, smaller form-factor, lighter, I'm happy with it. :)
One feature that I wanted to have in my new notebook was a built-in 3G data card. What I got was the Ericsson F3507g. It does not only have HSPA, with 7,2 MBit down and 2,0MBit up, but also a GPS reciever on the same MiniPCIe card.
The control of the GPS is done via AT commands. For this the card offer three serial channels. Once you enabled GPS on one it will only act as NMEA channel after this. Given you have three channels the logical way was to have one for the HSPA data transfers, one for the GPS and the last one as control channel.
The basic commands for configuration and enabling the GPS can be found here. Sadly there seem to be no public documentation from Ericson on the proprietary AT commands for the GPS. Ericson, can you please offer a description or even better a datasheet for the chip it?
Anyone else can help out with more informations on this card? I'm interested in all kind of details about configuration options for the GPS.
For now I'm using the following script to handle the gps and hspa enable and disable. Not nice but working. FSO support is on the way and will get finished when I find a spare cycle for it.
#!/bin/sh
# We have /dev/ttyACM{0,1,2}
# 0 is used from wvdial for the HSPA connection
NMEADEVICE=/dev/ttyACM1
CONTROLDEVICE=/dev/ttyACM2
## Check we have appropriate permissions
if [ `whoami` != "root" ]; then
echo Run this script as root
exit 0
fi
init_modem() {
echo -n "Powering up WWAN device .."
echo 1 > /sys/devices/platform/thinkpad_acpi/wwan_enable
while [ ! -c $CONTROLDEVICE ]; do sleep 0.5; echo -n "."; done
echo " OK"
echo -n "Initialising WWAN modem ..."
/usr/sbin/chat -v "" "AT+CFUN=1" "+PACSP0" "AT" "OK" > $CONTROLDEVICE < $CONTROLDEVICE
echo " OK"
}
exit_modem() {
echo -n "Shutting down WWAN modem ..."
/usr/sbin/chat -v "" "AT+CFUN=4" "OK" > $CONTROLDEVICE < $CONTROLDEVICE
echo " OK"
## Disable the WWAN hardware, save power
echo -n "Powering down WWAN device .."
echo 0 > /sys/devices/platform/thinkpad_acpi/wwan_enable
while [ -c $CONTROLDEVICE ]; do sleep 0.5; echo -n "."; done
echo " OK"
}
start_hspa() {
echo "Starting PPP -- hit Ctrl+C when finished"
/usr/bin/wvdial 3G
#/usr/bin/wvdial Vodafone
}
start_gps() {
# Enable NMEA, every 3 seconds, enable DGPS
echo -n "Configure GPS ..."
/usr/sbin/chat -v "" "AT*E2GPSCTL=1,3,1" "OK" > $CONTROLDEVICE < $CONTROLDEVICE
echo " OK"
echo "Starting GPS -- hit Ctrl+C when finished"
# Fire up NMEA stream
#/usr/sbin/chat -v "" "AT*E2GPSNPD" "FOOBAR" > $CONTROLDEVICE < $CONTROLDEVICE
echo -en 'AT*E2GPSNPD\r\n' > $NMEADEVICE
/etc/init.d/gpsd stop
/etc/init.d/gpsd start
}
stop_gps() {
echo -n "Shutting down GPS..."
/usr/sbin/chat -v "" "AT*E2GPSCTL=0,3,1" "OK" > $CONTROLDEVICE < $CONTROLDEVICE
echo " OK"
}
case "$1" in
hspa)
init_modem
start_hspa
exit_modem
;;
gps)
init_modem
start_gps
# A bit hacky to wait for a ^C
sleep 7d
stop_gps
exit_modem
;;
both)
init_modem
start_gps
start_hspa
stop_gps
exit_modem
;;
*)
echo "Use hspa, gps or both as param" >&2
exit 1
;;
esac
exit 0