How to access GPS data in Mobian
#1
Anyone know how to get the GPS information from the GPS in the PinePhone? I've tried a few programs to get the location but they all seem to go by IP address so they all basically just say the town I am in and are off by a few miles so I was hoping to get the actual information from the GPS itself but I don't know how to do that. I also tried 'whereami' and for some reason that doesn't work. I install it and it says I have the most up to date version then when I try to run `whereami` it says the package isn't installed.
  Reply
#2
You could install gpsd and run one of the clients. xgps works but is not optimized for the screen. The text based clients gpsmon and cgps will give you all the typical GPS statistical information. The NMEA output that gpsd needs is on /dev/ttyUSB1. The config file is in /etc/default/gpsd

The antenna is very weak and it will take a long time outdoors even with a clear view of the sky to get a lock. You will want to run the AGPS proof of concept script to speed up the initial lock. https://gist.github.com/alastair-dm/2632...e555fa6628

You can also talk directly to the modem via AT commands to get a location manually, It is what the AGPS script uses. https://sixfab.com/wp-content/uploads/20...l_V1.1.pdf
  Reply
#3
(05-08-2021, 08:52 PM)8bit Wrote: You could install gpsd and run one of the clients. xgps works but is not optimized for the screen. The text based clients gpsmon and cgps will give you all the typical GPS statistical information. The NMEA output that gpsd needs is on /dev/ttyUSB1. The config file is in /etc/default/gpsd

The antenna is very weak and it will take a long time outdoors even with a clear view of the sky to get a lock. You will want to run the AGPS proof of concept script to speed up the initial lock. https://gist.github.com/alastair-dm/2632...e555fa6628

You can also talk directly to the modem via AT commands to get a location manually, It is what the AGPS script uses. https://sixfab.com/wp-content/uploads/20...l_V1.1.pdf
Thank you for the information! Quick question, as I don't have my PP on me right now to test, with the AGPS it says to run `AT+QGPS=1` to start the GPS, is that just ran in the command line? I don't have any real experience with working with modems in general though I do have experience with a handful of programming languages.
  Reply
#4
(05-09-2021, 06:11 PM)ragreenburg Wrote:
(05-08-2021, 08:52 PM)8bit Wrote: You could install gpsd and run one of the clients. xgps works but is not optimized for the screen. The text based clients gpsmon and cgps will give you all the typical GPS statistical information. The NMEA output that gpsd needs is on /dev/ttyUSB1. The config file is in /etc/default/gpsd

The antenna is very weak and it will take a long time outdoors even with a clear view of the sky to get a lock. You will want to run the AGPS proof of concept script to speed up the initial lock. https://gist.github.com/alastair-dm/2632...e555fa6628

You can also talk directly to the modem via AT commands to get a location manually, It is what the AGPS script uses. https://sixfab.com/wp-content/uploads/20...l_V1.1.pdf
Thank you for the information! Quick question, as I don't have my PP on me right now to test, with the AGPS it says to run `AT+QGPS=1` to start the GPS, is that just ran in the command line? I don't have any real experience with working with modems in general though I do have experience with a handful of programming languages.
That would be through a serial terminal like minicom. If you run the AGPS script it turns GPS on for you so you don't need to do any manual AT commands.

If the AGPS script gives serial errors you probably need pyserial
sudo pip3 install pyserial
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 15 1,517 03-25-2024, 09:07 AM
Last Post: anonymous
  cant verify mobian image at website gnugpg penguins_rule 0 70 03-18-2024, 08:54 PM
Last Post: penguins_rule
  mobian installed to eMMC - how to install tow-boot grump_fiddle_reinstall 6 1,720 11-22-2023, 11:46 AM
Last Post: aLoop100o
  What actions needed to keep on mobian testing user641 3 1,691 09-05-2023, 06:44 AM
Last Post: Zebulon Walton
  Mobian boot failed with zstd message after upgrade. Mahgue 0 582 09-01-2023, 11:29 AM
Last Post: Mahgue
  how to update mobian over tor vusra 13 6,545 07-09-2023, 08:57 PM
Last Post: vusra
  opensnitch outbound firewall now works on mobian vusra 2 1,802 07-09-2023, 01:37 AM
Last Post: vusra
  Using Nativefier on PP64 with Mobian paulcarton 0 577 07-05-2023, 03:57 AM
Last Post: paulcarton
  Has anyone got briar-desktop running on mobian? vusra 5 2,864 06-19-2023, 03:02 PM
Last Post: vusra
  4G data on default startup / boot dcinoz 1 771 04-29-2023, 11:24 PM
Last Post: dcinoz

Forum Jump:


Users browsing this thread: 1 Guest(s)