stripydog / kplex

kplex marine data multiplexer
Other
82 stars 38 forks source link

send `$GPS_START` to enable modem NMEA0183 output #53

Open dangowrt opened 3 years ago

dangowrt commented 3 years ago

Some WWAN modems with built-in GNSS require that the magic string $GPS_START is sent to the serial device which is used for NMEA0183, only then data will start to arrive on that port. It would be great if kplex had an easy way to send that magic $GPS_START string when opening /dev/ttyUSB1 of the Sierra Wireless EM7455 LTE modem.

I've tried working around the problem by trying to inject the string using an external program connecting to kplex using PTY. I supposed because $GPS_START is not a correct NMEA sentence, the string isn't passed-on by kplex, so that approach didn't work...

dangowrt commented 3 years ago

Note: This is needed on Linux when using the qcserial driver to connect to recent Sierra Wireless modems.

Note 2: Other than that kplex works great on Aarch64 (OpenWrt running on BPi-R64, I'm using kplex_1.4-2_aarch64_cortex-a53.ipk built from OpenWrt's package repo)

dangowrt commented 3 years ago

See also https://techship.com/faq/basic-standalone-gnss-gps-usage-guide-for-sierra-wireless-airprime-em-mc74-series-cellular-modules/

stripydog commented 3 years ago

Thanks for this and sorry for late reply. What I might do here is make this a bit more generic as there might be other GPS units which need different initialisation strings. Ideally I'll look at generalising to all interface types (kplex already does something similar with the "preamble" tcp option which is used, for example, in switching a gpsd connection to nmea-0183) but if not I'll just take your solution and generalise it with the "preamble" option parsing