Testing GPS
#21
What is GPSA ?
  Reply
#22
(05-21-2020, 01:17 PM)drpi Wrote: What is GPSA ?

GPS assisted (hence the A) by mobile cell towers.
You can find me on IRC, Discord and Twitter


  Reply
#23
Oh, you mean A-GPS Wink
https://en.wikipedia.org/wiki/Assisted_GPS
  Reply
#24
(05-21-2020, 01:27 PM)drpi Wrote: Oh, you mean A-GPS Wink
https://en.wikipedia.org/wiki/Assisted_GPS

Si Wink
You can find me on IRC, Discord and Twitter


  Reply
#25
(05-21-2020, 12:46 PM)Luke Wrote: You gotta love it: for some it flat-out doesn't work, for others (me) it works now and then on occasion, and yet for others it works fine Smile
My uneducated guess is that it actually has something to do with how well GPSA works on a particular network - will see what Marius thinks about my theory

Oddly, it worked earlier when I posted. Now that I've had more free time, I'm unable to get GPS working.

Used https://gpsd.gitlab.io/gpsd/installation.html as a reference to test the GPS and it does seem to be found, but nothing is coming back?


Code:
root@ubuntu-phablet:/var/log# gpsd -D 5 -N -n /dev/EG25.NMEA
gpsd:INFO: launching (Version 3.15)
gpsd:IO: opening IPv4 socket
gpsd:IO: opening IPv6 socket
gpsd:INFO: listening on port gpsd
gpsd:PROG: NTP: shmat(0,0,0) succeeded, segment 0
gpsd:PROG: NTP: shmat(1,0,0) succeeded, segment 1
gpsd:PROG: NTP: shmat(2,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(3,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(4,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(5,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(6,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(7,0,0) succeeded, segment 7
gpsd:PROG: successfully connected to the DBUS system bus
gpsd:PROG: shmget(0x47505344, 8936, 0666) for SHM export succeeded
gpsd:PROG: shmat() for SHM export succeeded, segment 8
gpsd:INFO: stashing device /dev/EG25.NMEA at slot 0
gpsd:INFO: opening GPS data source type 3 at '/dev/EG25.NMEA'
gpsd:INFO: speed 9600, 8N1
gpsd:PROG: Probing "Garmin USB binary" driver...
gpsd:INFO: attempting USB device enumeration.
gpsd:INFO: 1d6b:0001 (bus 4, device 1)
gpsd:INFO: 2c7c:0125 (bus 3, device 2)
gpsd:INFO: 1d6b:0002 (bus 3, device 1)
gpsd:INFO: 1d6b:0001 (bus 2, device 1)
gpsd:INFO: 1d6b:0002 (bus 1, device 1)
gpsd:INFO: vendor/product match with 091e:0003 not found
gpsd:PROG: Probe not found "Garmin USB binary" driver...
gpsd:PROG: Probing "GeoStar" driver...
gpsd:PROG: Sent GeoStar packet id 0xc1
gpsd:IO: => GPS: <SNIP>
gpsd:PROG: Probe not found "GeoStar" driver...
gpsd:PROG: Probing "Trimble TSIP" driver...
gpsd:INFO: speed 9600, 8O1
gpsd:INFO: speed 9600, 8N1
gpsd:PROG: Probe not found "Trimble TSIP" driver...
gpsd:PROG: no probe matched...
gpsd:INFO: gpsd_activate(2): activated GPS (fd 6)
gpsd:PROG: PPS:/dev/EG25.NMEA chrony socket /var/run/chrony.EG25.NMEA.sock doesn't exist
gpsd:INFO: KPPS:/dev/EG25.NMEA cannot set PPS line discipline Invalid argument
gpsd:WARN: KPPS:/dev/EG25.NMEA kernel PPS unavailable, PPS accuracy will suffer
gpsd:PROG: PPS:/dev/EG25.NMEA thread launched
gpsd:INFO: PPS:/dev/EG25.NMEA ntpshm_link_activate: 1
gpsd:INFO: device /dev/EG25.NMEA activated
gpsd:WARN: TPPS:/dev/EG25.NMEA ioctl(TIOCMIWAIT) failed: 25 Inappropriate ioctl for device
gpsd:PROG: PPS:/dev/EG25.NMEA die: TIOCMIWAIT Error
gpsd:PROG: PPS:/dev/EG25.NMEA gpsd_ppsmonitor exited.
gpsd:INFO: running with effective group ID 20
gpsd:INFO: running with effective user ID 0
gpsd:INFO: startup at 2020-05-22T01:30:05.000Z (1590111005)
?WATCH={"enable":true,"json":true};

After watch, nothing is returned. I did verify that the gpsd service wasn't running. Phone also has a clear view of the outside. I'll reflash and try again as I have been doing OTA since release. Based on the above output, seems something broke.

Well this is fun... is the latest image broken?

Just downloaded a fresh image from Jenkins, https://ci.ubports.com/job/rootfs/job/ro...stemimage/, and found gpsd / ubuntu-location-service were missing from init.d. Redownloaded the image again and found I have the same file. Odd... The gpsd service listed below is due to me running "apt install gpsd" as an attempt to fix.


Code:
$ md5sum ubuntu-touch-pinephone.img*
26bd67943a8699f2a9ec006be7bd23d6  ubuntu-touch-pinephone.img(1).xz
26bd67943a8699f2a9ec006be7bd23d6  ubuntu-touch-pinephone.img.xz



Code:
root@ubuntu-phablet:/etc/init.d# ls -laF
total 284
drwxr-xr-x   2 root   root    4096 May 21 19:05 ./
drwxrwxr-x 109 system system  4096 May 21 19:05 ../
-rwxr-xr-x   1 root   root    5336 Apr 14  2016 alsa-utils*
-rwxr-xr-x   1 root   root    6223 Mar  3  2017 apparmor*
-rwxr-xr-x   1 root   root    2968 Apr 17 09:38 bluetooth*
-rwxr-xr-x   1 root   root    1275 Jan 19  2016 bootmisc.sh*
-rwxr-xr-x   1 root   root    3565 Sep 14  2015 cgmanager*
-rwxr-xr-x   1 root   root    3354 Sep 14  2015 cgproxy*
-rwxr-xr-x   1 root   root    1904 Oct 15  2014 cgroupfs-mount*
-rwxr-xr-x   1 root   root    3807 Jan 19  2016 checkfs.sh*
-rwxr-xr-x   1 root   root    1098 Jan 19  2016 checkroot-bootclean.sh*
-rwxr-xr-x   1 root   root    9353 Jan 19  2016 checkroot.sh*
-rwxr-xr-x   1 root   root    1343 Apr  4  2016 console-setup*
-rwxr-xr-x   1 root   root    3049 Apr  5  2016 cron*
-rwxr-xr-x   1 root   root    2813 Oct  7  2019 dbus*
-rw-r--r--   1 root   root     998 May 21 19:05 .depend.boot
-rw-r--r--   1 root   root     818 May 21 19:05 .depend.start
-rw-r--r--   1 root   root     844 May 21 19:05 .depend.stop
-rwxr-xr-x   1 root   root    1108 Mar 24 20:33 dundee*
-rwxr-xr-x   1 root   root    4052 Oct 31  2015 gpsd*
-rwxr-xr-x   1 root   root    1336 Jan 19  2016 halt*
-rwxr-xr-x   1 root   root    1423 Jan 19  2016 hostname.sh*
-rwxr-xr-x   1 root   root    3809 Mar 12  2016 hwclock.sh*
-rwxr-xr-x   1 root   root    2970 Nov 20  2019 isc-dhcp-server*
-rwxr-xr-x   1 root   root    1804 Apr  4  2016 keyboard-setup*
-rwxr-xr-x   1 root   root    1300 Jan 19  2016 killprocs*
-rwxr-xr-x   1 root   root    2087 Dec 20  2015 kmod*
-rwxr-xr-x   1 root   root    3431 Mar 31  2017 lightdm*
-rwxr-xr-x   1 root   root     703 Jan 19  2016 mountall-bootclean.sh*
-rwxr-xr-x   1 root   root    2301 Jan 19  2016 mountall.sh*
-rwxr-xr-x   1 root   root    1461 Jan 19  2016 mountdevsubfs.sh*
-rwxr-xr-x   1 root   root    1564 Jan 19  2016 mountkernfs.sh*
-rwxr-xr-x   1 root   root     711 Jan 19  2016 mountnfs-bootclean.sh*
-rwxr-xr-x   1 root   root    2456 Jan 19  2016 mountnfs.sh*
-rwxr-xr-x   1 root   root    4771 Jul 19  2015 networking*
-rwxr-xr-x   1 root   root    1757 Jan 18  2018 network-manager*
-rwxr-xr-x   1 root   root    1123 Mar 24 20:33 ofono*
-rwxr-xr-x   1 root   root    1581 Oct 15  2015 ondemand*
-rwxr-xr-x   1 root   root   10240 Apr 24  2019 openvpn*
-rwxr-xr-x   1 root   root    1366 Nov 15  2015 plymouth*
-rwxr-xr-x   1 root   root     752 Nov 15  2015 plymouth-log*
-rwxr-xr-x   1 root   root     612 Jan 27  2016 pppd-dns*
-rwxr-xr-x   1 root   root    1192 Sep  5  2015 procps*
-rwxr-xr-x   1 root   root    6366 Jan 19  2016 rc*
-rwxr-xr-x   1 root   root     820 Jan 19  2016 rc.local*
-rwxr-xr-x   1 root   root     117 Jan 19  2016 rcS*
-rw-r--r--   1 root   root    2427 Jan 19  2016 README
-rwxr-xr-x   1 root   root     661 Jan 19  2016 reboot*
-rwxr-xr-x   1 root   root    4149 Nov 23  2015 resolvconf*
-rwxr-xr-x   1 root   root    2796 Feb  3  2016 rsyslog*
-rwxr-xr-x   1 root   root    3927 Jan 19  2016 sendsigs*
-rwxr-xr-x   1 root   root     597 Jan 19  2016 single*
-rw-r--r--   1 root   root    1087 Jan 19  2016 skeleton
-rwxr-xr-x   1 root   root    4077 Aug 21  2018 ssh*
-rwxr-xr-x   1 root   root    6087 Apr 12  2016 udev*
-rwxr-xr-x   1 root   root    2049 Aug  7  2014 ufw*
-rwxr-xr-x   1 root   root    2737 Jan 19  2016 umountfs*
-rwxr-xr-x   1 root   root    2202 Jan 19  2016 umountnfs.sh*
-rwxr-xr-x   1 root   root    1879 Jan 19  2016 umountroot*
-rwxr-xr-x   1 root   root    3111 Jan 19  2016 urandom*
-rwxr-xr-x   1 root   root    2757 Jan 19  2017 x11-common*
root@ubuntu-phablet:/etc/init.d# service ubuntu-location-service
ubuntu-location-service: unrecognized service

I don't remember which OTA I started on, but when I ssh'd in, in my last post, I did see these same errors when trying to get GPS working again.


Code:
root@ubuntu-phablet:~# initctl unset-env --global UBUNTU_PLATFORM_API_BACKEND
initctl: Not permissible to modify PID 1 job environment
root@ubuntu-phablet:~# initctl set-env --global UBUNTU_PLATFORM_API_BACKEND=touch_mirclient
initctl: Not permissible to modify PID 1 job environment
root@ubuntu-phablet:~# su phablet
phablet@ubuntu-phablet:/root$ initctl unset-env --global UBUNTU_PLATFORM_API_BACKEND
initctl: Rejected send message, 1 matched rules; type="method_call", sender=":1.159" (uid=32011 pid=17970 comm="initctl unset-env --global UBUNTU_PLATFORM_API_BAC") interface="com.ubuntu.Upstart0_6" member="UnsetEnvList" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init ")
phablet@ubuntu-phablet:/root$ initctl set-env --global UBUNTU_PLATFORM_API_BACKEND=touch_mirclient
initctl: Rejected send message, 1 matched rules; type="method_call", sender=":1.160" (uid=32011 pid=18012 comm="initctl set-env --global UBUNTU_PLATFORM_API_BACKE") interface="com.ubuntu.Upstart0_6" member="SetEnvList" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init ")

I didn't see anything in /var/log/syslog
  Reply
#26
(05-18-2020, 02:43 PM)Luke Wrote: Here are the steps to enable and help testing GPS on Ubuntu Touch.

I strongly suggest you open SSH first:

Code:
sudo mount -o rw,remount /
sudo umount /etc/init/ssh.override
sudo rm /etc/init/ssh.override
sudo start ssh


Step 1)
You need to be using OTA version 27 (May 17th) or newer. You should be on devel channel.

Step 2)
Fetch uNav and Pure Maps from OpenStore

Step 3)
Mount the volume so its rewritable

Code:
sudo mount -o rw,remount /


Step 4)
Install gpsd

Code:
ubports-qa install xenial_-_edge_-_gpsd


Step 5)
Start GPS + some magic
Code:
sudo /etc/init.d/gpsd start
sudo restart ubuntu-location-service
initctl unset-env --global UBUNTU_PLATFORM_API_BACKEND
initctl set-env --global UBUNTU_PLATFORM_API_BACKEND=touch_mirclient

Step 6)
Open uNav and request it to fetch your location.


Report issues, fixes, ideas and everything else related to the topic of location services on Ubuntu Touch in this thread.

Luke (or any helpful person?,

I have been a bit of a Smeghead. I was unable to get this to work unfortunately.  I will continue to try.  However, I mistakenly have appeared to remove the PPA from my phone, getting the message "CRITICAL:ubports-qa: PPA not found".

Is there an easy way to re-install it?  I tried the usual way (or so I thought), but was not successful.

Thanks,

Pinetop Perkins
  Reply
#27
Would it be correct to assume, then, that we're getting GNSS messages via NMEA strings over UART, and gpsd is just parsing those?
  Reply
#28
(05-24-2020, 11:41 AM)ozymandium Wrote: Would it be correct to assume, then, that we're getting GNSS messages via NMEA strings over UART, and gpsd is just parsing those?

That's correct - NMEA received via a one-way USB serial interface. Config, enabling and disabling is done via AT commands over one of the other USB serial interfaces. i assume ubports is doing the same as pmOS by giving gpsd commands to enable gps when the first client connects, and disable it when the last one disconnects.
  Reply
#29
Just gave this a spin, didn't have any luck... (after realising that perhaps I needed to turn the modem back on again!) ... wifi performance seemed to take a turn for the worse, and didn't seem to get a GPS lock at all. uNAV did place me in the right country, but it was using IP geo-location, not GPS, so thought I was in Brisbane, where my ISP's endpoint is.
  Reply
#30
Pure Maps and uNav just crashed on mine ?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Testing Crust Deep-sleep Luke 53 80,321 08-06-2020, 11:10 AM
Last Post: erikinkinen
  Testing and Donating jmasters 2 4,575 06-30-2020, 11:32 PM
Last Post: jmasters

Forum Jump:


Users browsing this thread: 2 Guest(s)