GPS/location services don't work with Maps after Bookworm upgrade
#11
I've always used sudo with mmcli.  I still don't have GPS stuff working though.
  Reply
#12
The wiki entries certainly need updating - I'll do it if nobody else has by the time I've got something I'm confident in. The AGPS data can now be uploaded using mmcli which does it using QMI rather than AT commands. I'm not clear on whether it sets the time though, which I think was important for being able to use the AGPS data. There still seems to be a gap around where responsibility for triggering the AGPS upload and (if necessary) time setting lies, and ModemManager doesn't have an API for checking its validity (don't want to repeat download/upload if data is still valid). If you hit polkit restrictions using mmcli then sudo will work around it until we've got something 'proper' that can get its own permissions config.
  Reply
#13
(06-06-2022, 03:41 PM)wibble Wrote: The wiki entries certainly need updating - I'll do it if nobody else has by the time I've got something I'm confident in. The AGPS data can now be uploaded using mmcli which does it using QMI rather than AT commands. I'm not clear on whether it sets the time though, which I think was important for being able to use the AGPS data. There still seems to be a gap around where responsibility for triggering the AGPS upload and (if necessary) time setting lies, and ModemManager doesn't have an API for checking its validity (don't want to repeat download/upload if data is still valid). If you hit polkit restrictions using mmcli then sudo will work around it until we've got something 'proper' that can get its own permissions config.

can you write exactly how to do it?
  Reply
#14
(06-13-2022, 05:33 AM)kubussz Wrote:
(06-06-2022, 03:41 PM)wibble Wrote: The wiki entries certainly need updating - I'll do it if nobody else has by the time I've got something I'm confident in. The AGPS data can now be uploaded using mmcli which does it using QMI rather than AT commands. I'm not clear on whether it sets the time though, which I think was important for being able to use the AGPS data. There still seems to be a gap around where responsibility for triggering the AGPS upload and (if necessary) time setting lies, and ModemManager doesn't have an API for checking its validity (don't want to repeat download/upload if data is still valid). If you hit polkit restrictions using mmcli then sudo will work around it until we've got something 'proper' that can get its own permissions config.

can you write exactly how to do it?

Not with any confidence, especially as gitlab.freedesktop.org is currently down due to hardware failure so I can only see the modemmanager issues that I've got in open tabs still. Remembering the polkit issue above, some of these may need sudo to even run.
You can get a list of possible URLs for location data using:
Code:
mmcli -m any --location-status
You can download the file, then upload it using something like:
Code:
mmcli -m any --location-inject-assistance-data=/path/to/downloaded/xtrapath3-xtra3gr.bin
However in ModemManager issue #417 it's noted that the data from the URLs differs, and sometimes one or other won't work properly. Meanwhile issue #439 about the lack of an API to check whether the current data is valid uses the AT command to demonstrate how to do the check:
Code:
$ mmcli -m any --command='AT+QGPSXTRADATA?'
response: '+QGPSXTRADATA: 10080,"2021/09/19,15:00:00"'
When I tried a couple of weeks or so back this worked, but when I had time to look closer after an update the --command option no longer worked as it's only usable in debug mode. I think we've been round that being enabled/disabled in updates before too. That option was the route I was going to go for using the AT+QGPSXTRATIME to set time before uploading the data too, since it's not clear (to me) whether that's done as part of the --location-inject-assistance-data command or not, and I haven't spotted an API for it.
  Reply
#15
gitlab.freedesktop.org is back, apparently without data loss and thanks to Benjamin Tissoires and Daniel Stone.

I should also have mentioned the possibility of automating turning on the gps and perhaps doing the agps data bit for applications using gpsd rather than geoclue. From the gpsd man page:
When a device is activated (i.e. a client requests data from it), gpsd attempts to execute a hook from /etc/gpsd/device-hook with first
command line argument set to the pathname of the device and the second to ACTIVATE. On deactivation it does the same passing DEACTIVATE
for the second argument.
PmOS has used this to turn the gps on and off in the past. With mmcli (and sudo unless there's a polkit permission change) the options location-enable-gps-unmanaged and location-disable-gps-unmanaged can do this without modemmanager grabbing the serial port for the nmea data before gpsd can - from the mmcli man page:
--location-enable-gps-unmanaged
Enable location discovery using GPS but without taking control of the NMEA tty port. This allows other programs, e.g. gpsd, to use
the NMEA tty once the GPS engine has been enabled.
The script should of course check whether one of the other gps sources is already enabled and the port already grabbed. There will no doubt be debate about which should get priority, how/whether this should be packaged, interaction with location preference in the settings gui etc. that will need sorting out. I don't know if gpsd has a mechanism to allow/deny access per application, but getting it working at all as a user installed option would be a start.
  Reply
#16
I think it would be useful for us at Pine64 forum to work on a community tested .sh script to enable the modem so we are not having issues where people are not following instructions. W could upload and host it in both the Pine and Mobian wikis to cut/paste into an executable file.
I don't really understand why it is not an optional or included package in Mobian but we can have something standardized to get Mobian navigation set up in a standard way while anyone who wants can take the creative route as an alternative.
  Reply
#17
It looks like geoclue already enables some types of AGPS support, so adding support for others seems a legitimate feature request.
https://gitlab.freedesktop.org/geoclue/g...ger.c#L990

Whether it's going to need some changes on the ModemManager side before the necessary interfaces exist to be used is another matter - possibly more feature requests?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 15 1,514 03-25-2024, 09:07 AM
Last Post: anonymous
  PureMaps and OSM Scout Server maps download biketool 6 2,407 01-08-2024, 04:11 AM
Last Post: vusra
  wwan0 (SIM interface) doesn't work with OpenVPN nickolas 6 1,978 09-05-2023, 11:16 AM
Last Post: nickolas
  Mobian boot failed with zstd message after upgrade. Mahgue 0 581 09-01-2023, 11:29 AM
Last Post: Mahgue
  Problem with updates: Repository 'Debian bookworm' changed its 'non-free component' Anna 7 1,913 08-31-2023, 12:38 PM
Last Post: vusra
  Chatty does not work after suspend mode user641 4 1,784 07-18-2023, 10:43 AM
Last Post: alaraajavamma
  Wifi doesn't work after update nickolas 2 1,138 04-14-2023, 10:07 AM
Last Post: nickolas
  [GPS] PureMaps with OsmScoutServer, Localization precision and Maps freelectro 2 1,174 03-21-2023, 04:17 AM
Last Post: freelectro
Wink Pinephone lost graphic during mobian system upgrade cmpin 4 2,060 03-01-2023, 04:45 PM
Last Post: anonymous
  Most recent Mobian image or installer image known to work? DrPlamsa 13 4,617 02-26-2023, 11:47 PM
Last Post: SukiiPooru

Forum Jump:


Users browsing this thread: 1 Guest(s)