Hello Helmut, yes cat /dev/ttyACM0 | nc -lk 20000 is working as well.
But gpsserver.py is very clever :-) You can start the script and then its waiting to connect the GPS-Mouse. And when unplug and plugin again, its reconnect immediatly. Exactly what I need. Karl ... -------- Weitergeleitete Nachricht -------- Von: Helmut Schmidt <hs...@arcor.de> An: m...@karl-karsten.de, qlandkartegt-users@lists.sourceforge.net Betreff: Re: [Qlandkartegt-users] My Just-For-Fun-Project: Recording real time tracks in QMS Datum: Wed, 14 Oct 2020 06:16:19 +0200 Hi Karl, great that it works for you! Just for the records: as the gpsserver.py does not seem to modify anything in the NMEA stream, a simple cat /dev/ttyACM0 | nc -lk 20000 might do the same job without any python/pyserial/script installation. BR, Helmut Am 13.10.2020 um 20:24 schrieb Karl Karsten: Hello Helmut, thanks for your comment. I overlooked the python script from Henrik Schulz in the wiki, which is doing exactly what I need - great code :-) https://github.com/Maproom/qmapshack/wiki/DocRealtime https://raw.githubusercontent.com/wiki/Maproom/qmapshack/Downloads/gpsserver.py Installation and usage On Ubuntu 20.04 is very easy. Installation: sudo usermod -a -G dialout $USER python3 -m pip install pyserial Plugin the GPS-Mouse and start the gpsserver: python3 ./gpsserver.py In QMS start the realtime recording. Thanks to Henrik. Karl ... -------- Weitergeleitete Nachricht -------- Von: Helmut Schmidt <hs...@arcor.de> An: qlandkartegt-users@lists.sourceforge.net Betreff: Re: [Qlandkartegt-users] My Just-For-Fun-Project: Recording real time tracks in QMS Datum: Sun, 11 Oct 2020 19:15:11 +0200 Hi Karl, your message made me curious, so I looked in the python script. First of all, I think you do not need gpsbabel at all. Because your GPS-Mous already provides NMEA, i.e. what QMS needs A simple cat /dev/ttyACM0 might do the job as well. Regarding the python script: It looks like it is doing two jobs a) set all GPS fixes to valid (probably contradictory to your goals?) b) ensure that timestamps contain fractions of seconds (apparently needed by QMS) With a bit of luck, the timestamps provided by the GPS mouse already contain sub-second fractions. Then you could cat directly to nc Otherwise, you might comment out that line of the python script msg.data[idx["gps_qual"]] = '1' Have fun, Helmut Am 11.10.2020 um 18:08 schrieb Karl Karsten: Hello all, I bought at Amazon this little GPS-Mouse (Stick G72 USB GPS-Mouse) and plugged it to my Tablet. https://www.amazon.de/gp/product/B07SMRXSC8/ref=ppx_yo_dt_b_asin_title_o01_s01?ie=UTF8 More or less it's working out of the box. It is sending directly in NMEA format. Here the procedure to connect it to Ubuntu 20.04. Connect it to USB: In a terminal to get access as user (non-root) to the tty device: sudo usermod -a -G dialout $USER reboot To set up the TCP/IP server enter in a terminal: /usr/bin/gpsbabel -T -i nmea,get_posn -f /dev/ttyACM0 -o nmea,gpgga=1,gprmc=0,gpvtg=0,gpgsa=0 -F - | /path_to/nmeahandler.py | nc -lk 20000 The nmeahandler.py script is the same I mentioned in a previous post. Download can be here: https://cloud.karl-karsten.de/index.php/s/fKdy54NSqoxeJk3 In QMS/Realtime you have to setup: Server: localhost Port: 20000 Then you should get the real time positions in QMS. First test was positive. I took the chance to record a business trip by car and this morning a cycling tour. I took some pictures and and put them in a PDF. https://cloud.karl-karsten.de/index.php/s/Pp6WXoMNWeFC9jn (Give nextcloud 5-10 seconds to show the PDF file ...) At this point I would like to say a big thank you to Oliver. Oliver set up these great possibilities around realtime few years ago. And as always: With a lot of foresight, openness, flexibility and stability - thanks Oliver. What next: I see that the GPS-Mouse is sending Lon and Lat 0 (zero) when there are no signals coming from the satellites. This has to be filtered out before sending to the nc server. I will check whether gpsbabel will help or I have to modify the python script. I am not a python expert, a helping hand will be great or I will learn by doing. :-) Karl ... BTW: Yes - I know, there are many, many other solution, apps, devices etc. available doing this much, much more better. But for me it's hobby and it's open source which I can manage and control ... _______________________________________________ Qlandkartegt-users mailing list Qlandkartegt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users _______________________________________________ Qlandkartegt-users mailing list Qlandkartegt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users _______________________________________________ Qlandkartegt-users mailing list Qlandkartegt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users