From 2097c3ad77f57eab5ace49afb9264a2fa80160ed Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 7 Oct 2023 04:25:44 +0000 Subject: [PATCH] moby: gps: document some findings --- hosts/by-name/moby/gps.nix | 17 ++++++++++++----- pkgs/additional/eg25-control/eg25-control | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/hosts/by-name/moby/gps.nix b/hosts/by-name/moby/gps.nix index b9a95940..b53da410 100644 --- a/hosts/by-name/moby/gps.nix +++ b/hosts/by-name/moby/gps.nix @@ -7,15 +7,16 @@ # - `screen /dev/ttyUSB2 115200` # - `AT+QGPSCFG="nmeasrc",1` # - `AT+QGPS=1` +# this process is automated by my `eg25-control` program and services (`eg25-control-powered`, `eg25-control-gps`) +# - see the `modules/` directory further up this repository. # -# now, something like `gpsd` can directly read from /dev/ttyUSB1. +# now, something like `gpsd` can directly read from /dev/ttyUSB1, +# or geoclue can query the GPS directly through modem-manager # # initial GPS fix can take 15+ minutes. -# meanwhile, services like eg25-manager can speed this up by uploading assisted GPS data to the modem. +# meanwhile, services like eg25-manager or eg25-control-freshen-agps can speed this up by uploading assisted GPS data to the modem. # -# geoclue somehow fits in here as a geospatial provider that leverages GPS and also other sources like radio towers -# -# support: +# support/help: # - geoclue, gnome-maps # - irc: #gnome-maps on irc.gimp.org # - Matrix: #gnome-maps:gnome.org (unclear if bridged to IRC) @@ -28,6 +29,12 @@ # - puremaps? # - osmin? # +# known/outstanding bugs: +# - `systemctl start eg25-control-gps` can the hang the whole system (2023/10/06) +# - i think it's actually `eg25-control-powered` which does this (started by the gps) +# - best guess is modem draws so much power at launch that other parts of the system see undervoltage +# - workaround is to hard power-cycle the system. the modem may not bring up after reboot: leave unpowered for 60s and boot again. +# # future work: # - integrate with [wigle](https://www.wigle.net/) for offline equivalent to Mozilla Location Services diff --git a/pkgs/additional/eg25-control/eg25-control b/pkgs/additional/eg25-control/eg25-control index 74037eac..f56182cd 100755 --- a/pkgs/additional/eg25-control/eg25-control +++ b/pkgs/additional/eg25-control/eg25-control @@ -2,7 +2,7 @@ #!nix-shell -i python3 -p "python3.withPackages (ps: [ ])" -p curl -p modemmanager # this script should run after ModemManager.service is started. -# typical invocation is `eg25_gps_init.py --enable-power --enable-gps`. +# typical invocation is `eg25-control --power-on --enable-gps`. # after running, the user may `cat /dev/ttyUSB1` to view NMEA-encoded GPS information. # the script attempts to be idempotent, such that it may be run multiple times per boot. #