Not saving GPS. Couldn't find location

hi all!

I built a pwnagotchi with a neo-6m GPS unit. I think there’s a race condition between the GPS plugin and the pwnagotchi process where the GPS is locked and receiving data:

(GPGGA values replaced with x’es)

[email protected]:~ $ sudo cat /dev/ttyAMA0 | grep "GGA\|GPGSA"

at the same time, /var/log/pwnagotchi.log says:

[2021-10-17 02:09:10,515] [WARNING] !!! captured new handshake on channel 6, -77 dBm: 6c:56:97:da:99:e8 (Amazon Technologies Inc.) -> TP-LINK_DE00 [:e3:27:xx:xx:xx (Tp-Link Technologies Co.,Ltd.)] !!!
[2021-10-17 02:09:12,429] [INFO] not saving GPS. Couldn't find location.
[2021-10-17 02:09:12,588] [INFO] sending association frame to TP-Link_356A (b0:95:75:xx:xx:xx Tp-Link Technologies Co.,Ltd.) on channel 10 [0 clients], -88 dBm...
[2021-10-17 02:09:13,451] [INFO] waiting for 10s on channel 10 ...
[2021-10-17 02:09:14,370] [WARNING] !!! captured new handshake on channel 10, -77 dBm: 56:30:32:17:10:10 () -> Rampe [cc:32:e5:xx:xx:xx (Tp-Link Technologies Co.,Ltd.)] !!!
[2021-10-17 02:09:16,508] [INFO] not saving GPS. Couldn't find location.

if I restart the pwnagotchi (i.e. sudo reboot) it starts working (saves json files with GPS data along with the pcap file) so I think the race condition has to be due to something in the initial lock up time of the GPS unit. I tried the same just restarting the pwnagotchi process sudo systemctl restart pwnagotchi but it still fails to see the GPS unit. I think this may be related to bettercap rather than pwnagotchi.