ubuntu-location-service  ..
An aggregating location service providing positioning and geocoding capabilities to applications.
/build/location-service-EliX7b/location-service-3.0.0+16.04.20160404/doc/debugging.md
Go to the documentation of this file.
1 # Debugging
2 
3 Location not working? Here's how to debug.
4 
5 ## Layers
6 
7 Test in OSMTouch (QML app using Qt API) before testing in webapps or
8 webbrowser app. Different results? File a bug where it doesn't
9 work. Same result of no location? Next step.
10 
11 ## Check that stack works with dummy provider
12 
13 Edit /etc/init/ubuntu-location-provider.override to start
14 location-serviced with just the dummy provider; this should
15 work. Doesn't work? File a bug against location-service. Works? Reset
16 config to defaults and try the next thing.
17 
18 ## Hardware GPS breaking all of location-service
19 
20 GPS provider is built-in into location-service and might break all of
21 it if it goes south (working on splitting it out); try enabling only
22 the HERE provider on the location-serviced command-line and see if
23 that works. Works? File a bug against location-service. Doesn't work?
24 Move on.
25 
26 ## HERE test
27 
28 To test whether the low-level HERE stack gets a location, put
29 http://people.canonical.com/~lool/espoo-cli on your phone (will be
30 included along HERE bits in the future) and run with:
31 
32  chmod a+x espoo-cli
33  GLOG_logtostderr=1 GLOG_v=100 LD_LIBRARY_PATH=/custom/vendor/here/location-provider/lib/arm-linux-gnueabihf ./espoo-cli 5
34 
35 NB: 5 is the number of location updates after which the tool exits;
36 updates should come in at approx 15s interval. Output looks like:
37 
38  I1101 21:30:01.285964 4403 cli.cpp:117] Requested number of updates is 2
39  I1101 21:30:01.299002 4403 cli.cpp:133] Starting location updates
40  I1101 21:30:01.301888 4403 cli.cpp:141] Starting GLib main loop
41  I1101 21:30:11.304612 4403 cli.cpp:158] Location: tstamp=1414891811 lat=xyz long=foo hor. acc.=2569 alt=nan vert. acc.=nan tech=cell
42  I1101 21:30:11.306061 4403 cli.cpp:170] Remaining updates: 1
43  I1101 21:30:26.736821 4403 cli.cpp:158] Location: tstamp=1414891826 lat=xyz long=foo hor. acc.=2824 alt=nan vert. acc.=nan tech=cell
44  I1101 21:30:26.738348 4403 cli.cpp:148] Stopping location updates
45 
46 Low-level HERE stack works but location-serviced with just HERE
47 provider doesn't work? File a bug against espoo projet (HERE) and/or
48 location-service. Low-level HERE stack doesn't work? Move on
49 
50 ## location-service and espoo-service debug
51 
52 Collect some debug data by editing /etc/init/ubuntu-espoo-service.conf
53 and /etc/init/ubuntu-location-service.override and changing the start
54 sequence to add some env vars:
55 
56  export GLOG_v=200
57 
58 before the exec. Reboot, and start some app. You should have some log
59 files under /var/log/upstart/ubuntu-espoo-service.log and
60 /var/log/upstart/ubuntu-location-service.log to attach to a bug
61 report; e.g. a working espoo log looks like this:
62 
63  WARNING: Logging before InitGoogleLogging() is written to STDERR
64  I1105 16:30:10.221474 1620 provider.cpp:568] StartPositionUpdates
65  I1105 16:30:10.224901 1620 provider.cpp:122] Successfully started position updates.
66  I1105 16:30:10.228739 1620 provider.cpp:596] StartVelocityUpdates
67  I1105 16:30:13.046851 1621 provider.cpp:83] Received location: Position(lat: Coordinate(12.34 deg), lon: Coordinate(12.34 deg), alt: Coordinate(nan m), hor.acc.: 1430 m, ver.acc.: nan m)
68 
69 No position there? check connectivity API works by running:
70 
71  cd /tmp
72  wget http://people.ubuntu.com/~lool/connectivity
73  GLOG_v=200 GLOG_logtostderr=1 ./connectivity
74 
75 you should see something like:
76 
77  I1105 16:47:26.431466 11140 cached_radio_cell.cpp:160] (mcc: 123, mnc: 2, lac: 1234, id: 123456, asu: 1)
78  I1105 16:47:26.533818 11140 connectivity.cpp:47] Is wifi enabled: true
79  I1105 16:47:26.533963 11140 connectivity.cpp:48] Is wifi hw enabled: true
80  I1105 16:47:26.534010 11140 connectivity.cpp:49] Is wwan enabled: true
81  I1105 16:47:26.534050 11140 connectivity.cpp:50] Is wwan hw enabled: true
82  I1105 16:47:26.534442 11140 connectivity.cpp:122] umts(mcc: 123, mnc: 2, lac: 1234, id: 123456, asu: 1)
83  I1105 16:47:26.534633 11140 connectivity.cpp:155] (bssid: 12:12:12:12:12:12, ssid: xyz, last seen: 1415224046, mode: Mode::infrastructure, frequency: 2442, strength: 63)
84  I1105 16:47:26.534828 11140 connectivity.cpp:155] (bssid: 12:12:12:12:12:12, ssid: boing, last seen: 1415224046, mode: Mode::infrastructure, frequency: 2467, strength: 57)
85 
86 Also, please attach output of /usr/share/ofono/scripts/list-modems > list-modems-output.txt
87 Please note that the command might take ~1 minute to complete.
88 
89 TODO: document dbus-monitor / d-feet capturing of client / system traffic with snooping config.
90 
91