Difference: GPSReceiver (6 vs. 7)

Revision 72020-08-28 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

The Neo 6M GPS receiver

Line: 113 to 118
 What we will try to do is taking the data from the ublox neo 6M connected to the PC through the USB to serial connection instead of using the mobile phone.

The strategy will be this:

Changed:
<
<
  • Get the GPS data from the neo 6M connected through a USB to serial adapter connected to the PC and send the information to gpsd
  • Run gpsmon to verify that the data are seen.
  • Send the data to OpenStreetView and display them in marble.
  • Move the neo 6M to the ESP32 and write a program that transfers the NMEA sentences to gpsd running on the PC through a tcp socket.
>
>
  • Get the GPS data from the neo 6M connected through a USB to serial adapter to the PC and send the information to gpsd
  • Run gpspipe or gpsmon to verify that the data are seen.
  • Send the data to OpenStreetView and display them in marble. This is done with the map.qml file described in the second part of the tutorial
 Following the tutorial step by step here is a screen dump of the result:

gpsmap.png

Added:
>
>

Getting NMEA information for gpsd from the ESP32

gpsd does not only allow reading GPS information from the serial line but it can also get this information from a TCP of UDP socket. It should therefore be possible to keep the ublox neo M6 connected to the ESP32 and write a simple TCP server (named ser2tcpServer.py. I use port 29998 for this server) which listens to a connection request from gpsd and then reads NMEA sentences from the ESP32 UART and transfers them to gpsd over the TCP socket. To get things to work we must:

  • start the ser2tcpServer.py (on the ESP32)
  • start gpsd with tcp://IP_OF_ESP32:29998
Now you can run gpspipe -r to see the NMEA messages transferred or gpsmon to get them decoded.
Finally you pipe the messages from gpsd back into a socket with

gpspipe -r | nc -l 29999

from where they are picked up by map.qml. The result will be the same map as shown above but the GPS source has been shifted from the PC serial port to the ESP32.

  -- Uli Raich - 2020-07-01
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback