GPS stopped working, can't figure it out... what else?

James Hiebert james at hiebert.name
Fri Oct 1 10:49:53 CEST 2010


Dear all:

Was there ever any resolution on this thread regarding the loss of GPS
functionality?  I seem to be having the seemingly identical problem as of
last Saturday.  Last Saturday, my Freerunner's GPS seemed to stop working,
and I have been struggling to debug it since.

I've enabled the device with the dbus interface:
# mdbus -s org.freedesktop.Gypsy /org/freedesktop/Gypsy org.freesmartphone.Resource.Enable

And the a variety of activity flies across the frameworkd.log. 
Interestingly, it looks like ogpsd actually does have a fix... at least this
line:

2010.10.01 01:39:08.43 ogpsd                DEBUG    Got UBX packet of type
NAV-POSLLH: [{'LON': -123xxxxxxx, 'HMSL': 28843, 'HEIGHT': 11546, 'ITOW':
463141000, 'LAT': 48xxxxxxx, 'Vacc': 999998976, 'Hacc': 999998976}]

shows my exact position (obscurred for some level of privacy).  However,
when I query the position with the DBUS interface, I get nothing:

# mdbus -s org.freedesktop.Gypsy /org/freedesktop/Gypsy org.freedesktop.Gypsy.Position.GetPosition
(0, 0, 0.0, 0.0, 0.0)

tangogps and foxtrotgps both fail to find any GPS.  Which is extremely
frustrating, because tangogps was until this point the one useful thing that
I have ever managed to get my Freerunner to do (and I use the GPS
extensively).

Does anyone have any advice?  FWIW I'm running debian:
# cat /proc/version
Linux version 2.6.29-20100313.git973a41fc (root at neo) (gcc version 4.4.5 20100728 (prerelease) (Debian 4.4.4-8) ) #1 Sat Aug 7 17:45:57 GMT-3 2010

~James

On Mon, Jul 12, 2010 at 07:24:49PM +0100, Al Johnson wrote:
> On Monday 12 July 2010, Yaroslav Halchenko wrote:
> > On Mon, 12 Jul 2010, Al Johnson wrote:
> > > fso-gpsd is a level removed from the gps, so isn't much use for
> > > debugging. You need to look at the debug output from ogpsd, or disable
> > > ogpsd entirely and
> > 
> > here is the excerpt from the log... not sure why it says that serial is
> > closed...
> > 
> > and and configuration I had
> > [ogpsd]
> > # possible options are NMEADevice, UBXDevice, GTA02Device, EtenDevice
> > device = GTA02Device
> > #device = UBXDevice # this like I added ...
> > # possible options are SerialChannel, GllinChannel, UDPChannel, FileChannel
> > channel = SerialChannel
> > # For UDPChannel the path defines the port to listen to
> > path = /dev/ttySAC1
> > 
> > 
> > root at om-gta02 /var/volatile/log # grep gpsd frameworkd.log
> > 2010.07.12 13:03:32.957 frameworkd.controller DEBUG    setting logger for
> > ogpsd to 10 2010.07.12 13:03:33.86 frameworkd.controller DEBUG    setting
> > logger for ogpsd.factory to 10 2010.07.12 13:03:34.549
> > frameworkd.controller INFO     launching internal subsystem ogpsd
> > 2010.07.12 13:03:34.555 frameworkd.subsystem DEBUG    subsystem ogpsd
> > created 2010.07.12 13:03:34.624 frameworkd.subsystem INFO     Scanned
> > subsystem via method 'auto', result is ['om.py', 'gpsdevice.py',
> > 'helpers.py', 'eten.pyo', 'helpers.pyo', 'eten.py', 'ubx.pyo',
> > 'gpschannel.pyo', 'gpschannel.py', '__init__.py', 'nmea.py', 'om.pyo',
> > 'factory.pyo', 'nmea.pyo', '__init__.pyo', 'ubx.py', 'factory.py',
> > 'gpsdevice.pyo'] 2010.07.12 13:03:35.140 frameworkd.subsystem DEBUG   
> > ...in subsystem ogpsd: found module <module 'ogpsd.om' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/om.pyo'>
> > 2010.07.12 13:03:35.147 frameworkd.subsystem DEBUG    no plugin: factory
> > function not found in module <module 'ogpsd.om' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/om.pyo'>
> > 2010.07.12 13:03:35.160 frameworkd.subsystem DEBUG    ...in subsystem
> > ogpsd: found module <module 'ogpsd.gpsdevice' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/gpsdevice.pyo
> > '> 2010.07.12 13:03:35.167 frameworkd.subsystem DEBUG    no plugin: factory
> > function not found in module <module 'ogpsd.gpsdevice' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/gpsdevice.pyo
> > '> 2010.07.12 13:03:35.175 frameworkd.subsystem DEBUG    ...in subsystem
> > ogpsd: found module <module 'ogpsd.helpers' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/helpers.pyo'>
> > 2010.07.12 13:03:35.182 frameworkd.subsystem DEBUG    no plugin: factory
> > function not found in module <module 'ogpsd.helpers' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/helpers.pyo'>
> > 2010.07.12 13:03:35.238 frameworkd.subsystem DEBUG    ...in subsystem
> > ogpsd: found module <module 'ogpsd.eten' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/eten.pyo'>
> > 2010.07.12 13:03:35.245 frameworkd.subsystem DEBUG    no plugin: factory
> > function not found in module <module 'ogpsd.eten' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/eten.pyo'>
> > 2010.07.12 13:03:35.383 frameworkd.subsystem DEBUG    ...in subsystem
> > ogpsd: found module <module 'ogpsd.gpschannel' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/gpschannel.py
> > o'> 2010.07.12 13:03:35.390 frameworkd.subsystem DEBUG    no plugin:
> > factory function not found in module <module 'ogpsd.gpschannel' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/gpschannel.py
> > o'> 2010.07.12 13:03:35.400 frameworkd.subsystem DEBUG    ...in subsystem
> > ogpsd: found module <module 'ogpsd.__init__' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/__init__.pyo'
> > > 2010.07.12 13:03:35.406 frameworkd.subsystem DEBUG    no plugin: factory
> > function not found in module <module 'ogpsd.__init__' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/__init__.pyo'
> > > 2010.07.12 13:03:35.419 frameworkd.subsystem DEBUG    ...in subsystem
> > ogpsd: found module <module 'ogpsd.nmea' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/nmea.pyo'>
> > 2010.07.12 13:03:35.426 frameworkd.subsystem DEBUG    no plugin: factory
> > function not found in module <module 'ogpsd.nmea' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/nmea.pyo'>
> > 2010.07.12 13:03:35.434 frameworkd.subsystem DEBUG    ...in subsystem
> > ogpsd: found module <module 'ogpsd.ubx' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/ubx.pyo'>
> > 2010.07.12 13:03:35.440 frameworkd.subsystem DEBUG    no plugin: factory
> > function not found in module <module 'ogpsd.ubx' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/ubx.pyo'>
> > 2010.07.12 13:03:35.455 frameworkd.subsystem DEBUG    ...in subsystem
> > ogpsd: found module <module 'ogpsd.factory' from
> > '/usr/lib/python2.6/site-packages/framework/subsystems/ogpsd/factory.pyo'>
> > 2010.07.12 13:03:35.501 ogpsd                DEBUG    (writing '1' to
> > '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron') 2010.07.12
> > 13:03:35.507 ogpsd                WARNING  (could not write to
> > '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron': [Errno 2] No such file
> > or directory: '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron')
> > 2010.07.12 13:03:35.515 ogpsd                DEBUG    (writing '1' to
> > '/sys/bus/platform/devices/gta02-pm-gps.0/power_on') 2010.07.12
> > 13:03:36.36 ogpsd                DEBUG    (writing '0' to
> > '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron') 2010.07.12 13:03:36.42
> > ogpsd                WARNING  (could not write to
> > '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron': [Errno 2] No such file
> > or directory: '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron')
> > 2010.07.12 13:03:36.48 ogpsd                DEBUG    (writing '0' to
> > '/sys/bus/platform/devices/gta02-pm-gps.0/power_on') 2010.07.12
> 
> The GPS is being powered off immediately after it is powered on. I guess this 
> is normal when ogpsd is initialised. Note that it tries both old and new paths 
> so one will always be 'no such file'.
> 
> > 13:03:36.103 ogpsd.gpsdevice      INFO     GTA02Device initialized.
> > Serving org.freedesktop.Gypsy at /org/freedesktop/Gypsy 2010.07.12
> > 13:03:36.115 frameworkd.subsystem DEBUG    service ogpsd now owning
> > busnames [<dbus.service.BusName org.freesmartphone.ogpsd on
> > <dbus.bus.BusConnection object at 0x408a0b10> at 0x153790>,
> > <dbus.service.BusName org.freedesktop.Gypsy on <dbus.bus.BusConnection
> > object at 0x408a0b10> at 0x1bc030>] 2010.07.12 13:03:36.121
> > frameworkd.subsystem INFO     subsystem ogpsd took 1.56 seconds to startup
> > 2010.07.12 13:03:55.358 frameworkd.resource  DEBUG    processing command
> > 'disable' for resource '<ogpsd.om.GTA02Device at /org/freedesktop/Gypsy at
> > 0x1bc0f0>' (present status=unknown) 2010.07.12 13:03:55.387
> > ogpsd.gpsdevice      INFO     disabling
> 
> frameworkd now issues a disable for the resource that has just appeared. I 
> guess the subsequent UBX commands are for storing the almanac and ephemeris, 
> but since the gps is powered down already we get the warnings about sending 
> while serial isn't open. I hope this isn't a problem...
> 
> > 2010.07.12 13:03:55.399 ogpsd                DEBUG    Sending UBX packet of
> > type CFG-MSG: {'MsgID': 1, 'Rate': 0, 'Class': 1} 2010.07.12 13:03:55.416
> > ogpsd                WARNING  Attempted to send something while serial is
> > not open. 2010.07.12 13:03:55.427 ogpsd                DEBUG    Sending
> > UBX packet of type CFG-MSG: {'MsgID': 0, 'Rate': 0, 'Class': 11}
> > 2010.07.12 13:03:55.444 ogpsd                WARNING  Attempted to send
> > something while serial is not open. 2010.07.12 13:03:55.461 ogpsd         
> >       DEBUG    Sending UBX packet of type CFG-MSG: {'MsgID': 48, 'Rate':
> > 0, 'Class': 11} 2010.07.12 13:03:55.473 ogpsd                WARNING 
> > Attempted to send something while serial is not open. 2010.07.12
> > 13:03:55.484 ogpsd                DEBUG    Sending UBX packet of type
> > CFG-MSG: {'MsgID': 49, 'Rate': 0, 'Class': 11} 2010.07.12 13:03:55.501
> > ogpsd                WARNING  Attempted to send something while serial is
> > not open. 2010.07.12 13:03:55.512 ogpsd                DEBUG    Sending
> > UBX packet of type CFG-MSG: {'MsgID': 3, 'Rate': 0, 'Class': 1} 2010.07.12
> > 13:03:55.524 ogpsd                WARNING  Attempted to send something
> > while serial is not open. 2010.07.12 13:03:55.541 ogpsd               
> > DEBUG    Sending UBX packet of type CFG-MSG: {'MsgID': 2, 'Rate': 0,
> > 'Class': 1} 2010.07.12 13:03:55.552 ogpsd                WARNING 
> > Attempted to send something while serial is not open. 2010.07.12
> > 13:03:55.564 ogpsd                DEBUG    Sending UBX packet of type
> > CFG-MSG: {'MsgID': 18, 'Rate': 0, 'Class': 1} 2010.07.12 13:03:55.586
> > ogpsd                WARNING  Attempted to send something while serial is
> > not open. 2010.07.12 13:03:55.597 ogpsd                DEBUG    Sending
> > UBX packet of type CFG-MSG: {'MsgID': 33, 'Rate': 0, 'Class': 1}
> > 2010.07.12 13:03:55.609 ogpsd                WARNING  Attempted to send
> > something while serial is not open. 2010.07.12 13:03:55.625 ogpsd         
> >       DEBUG    Sending UBX packet of type CFG-MSG: {'MsgID': 4, 'Rate': 0,
> > 'Class': 1} 2010.07.12 13:03:55.637 ogpsd                WARNING 
> > Attempted to send something while serial is not open. 2010.07.12
> > 13:03:55.649 ogpsd                DEBUG    Sending UBX packet of type
> > CFG-MSG: {'MsgID': 48, 'Rate': 0, 'Class': 1} 2010.07.12 13:03:55.666
> > ogpsd                WARNING  Attempted to send something while serial is
> > not open. 2010.07.12 13:03:55.682 ogps              DEBUG    Sending UBX
> > packet of type CFG-PRT: [] 2010.07.12 13:03:55.693 ogpsd               
> > WARNING  Attempted to send something while serial is not open. 2010.07.12
> > 13:03:55.710 ogpsd                DEBUG    (writing '0' to
> > '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron') 2010.07.12
> > 13:03:55.722 ogpsd                WARNING  (could not write to
> > '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron': [Errno 2] No such file
> > or directory: '/sys/bus/platform/devices/neo1973-pm-gps.0/pwron')
> > 2010.07.12 13:03:55.733 ogpsd                DEBUG    (writing '0' to
> > '/sys/bus/platform/devices/gta02-pm-gps.0/power_on') 2010.07.12
> > 13:03:55.981 frameworkd.resource  DEBUG    (ok) done processing command
> > 'disable' for resource '<ogpsd.om.GTA02Device at /org/freedesktop/Gypsy at
> > 0x1bc0f0>' (new status=disabled); triggering next comman
> 
> After the UBX commands for the disable it tries to power off again through 
> sysfs. We're now initialised with gps powered down and frameworkd/ogsmd 
> waiting for you to enable the gps. When you enable the gps it will power up 
> and be initialised with time and, if the pickle file is present, almanac and 
> ephemeris. That's the bit we really need to see the log for.
> 
> > > look at the serial port directly.
> > 
> > ok -- I will read up on how to interact directly (what to send and to
> > "receive" ;))
> 
> IIRC this should work, but I've not tried it. Only works if you've disabled 
> ogpsd, gpsd and anything else that may try to use the serial port.
> In one terminal start listening to the serial port:
> 	cat /dev/ttySAC1 > my_log_file
> Then in another power up the gps:
> 	echo 1 > /sys/bus/platform/devices/gta02-pm-gps.0/power_on
> 
> The log should show the gps powering up and giving NMEA output for a full cold 
> start. Before long it should pick up the time and date, then start tracking 
> satellites and finally get a fix, assuming a decent sky view. You can keep an 
> eye on my_log_file with tail -f.
> 
> _______________________________________________
> support mailing list
> support at lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
> 



More information about the support mailing list