sparkfun / SparkFun_RTK_Firmware

Centimeter precision GPS/GNSS using L1/L2 signals broadcast over Bluetooth SPP (using the ESP32) in an easy to use enclosure.
https://docs.sparkfun.com/SparkFun_RTK_Firmware/
Other
82 stars 47 forks source link

Add NMEA over TCP #96

Closed gdt closed 2 years ago

gdt commented 2 years ago

There are various ways to have GNSS receivers provide data to computers, and it's good to meet interfaces that others might expect, as long as it doesn't get too hard or too complicated.

One method is just NMEA over a TCP socket, either a listening socket on the IP address of the receiver, or having the receiver connect to a configured address. This is supported by Vespucci, an openstreetmap editor Android app, and by Ardusimple's NTRIP ESP32 module. I believe it is also supported by RTKLIB, which is how vespucci grew the feature.

This would ideally involve three things: 1) configuration to have the ESP32 listen on a configured port #, and when there's a TCP connection, just send the NMEA. Obviously be graceful about errors. Bonus points for multiple sockets at once. This gets most of the value. 1) configuration to have the ESP32 connect to an IP address and port and send NMEA, and retry on failure 1) as previous but instead of an IP address, connect to the router, so that when your phone is the hotspot to let NTRIP fetch RTCM3, it will also be the place with the GIS program. Could just be a toggle for router or configured addr. 1) Maybe maybe, some support for dynamic DNS, but that's half baked so I am mentioning it but not really suggesting it.

Vespucci doesn't have Bluetooth/BLE support at the moment. It probably should, but the TCP socket request would be useful for lots of things, like having an RTK Explorer Express join a wifi and have some other node read/store the NMEA for long-term obs, perhaps as part of base with QC, etc.

Nightglobe commented 2 years ago

t is not possible to do the same as when the Ntrip client is initialized from the settings on Facet rover (from 192.168.4.1 or terminal) to be able to send nmea to a predefined tcp port so we can use wifi on rtk facet instead of bluetouth there are some programs like would be Surpad who know this feature and would be a great help

nseidle commented 2 years ago

TCP over NMEA has been added thanks to @LeeLeahy2 in the latest RC. See basic instructions for using a cell phone AP + Vespucci here. Pulling down RTCM over WiFi, then pushing TCP over WiFi is working well. While I'm not sure why someone would want to do it, you can also, simultaneously connect over BT and pull to SW Maps. Please give it a try and let us know if anything breaks.

@gdt - As the pro Vespucci user in the group, do you feel like documenting a 'how to' under the GIS software section?

Nightglobe commented 2 years ago

The instructions are too misunderstood. We prefer an IP form TCP connection: Port You connect the NTRIP client to the wifi from facet to select to transmit nmea as a server to a port, predefined as in Vespucci or another port, there is more work with it , Bluetouth is ok in this form but in the field an extra consumer is spoiled. And if we still use WiFi it is preferable to be able to use TCP IP without having to use Bluetouth.

gdt commented 2 years ago

Thanks to all that helped - it's great to see this. I have a bunch of ticket responses to work through and agreed that I should add a howto to that section. I have been able to get QField to work, too, at least briefly, and will add that too.

nseidle commented 2 years ago

@Nightglobe -

WiFi it is preferable to be able to use TCP IP without having to use Bluetouth.

You can easily use WiFi for TCP NMEA broadcast, and WiFi for RTCM download. BT was just an extra thing I was testing. It's not required.

Nightglobe commented 2 years ago

It does not understand me wrong, it is good to be both connections and wifi and Bluetouth for topographic engineers depending on age or knowledge or technology, depending on the programs used, although I have passed 50, I use both, of both . For Example I have colleagues and customers using Emlid RS2, with Ublox Z-F9P identical to those used in the wide range that a Sparkfun factory, it has a setting from the Reachwiu 3 program that allows GPS configuration as imput corrections on the client, or Bluetouth ,or radio, etc, and as a transmission of positions on NMEA I use TCP/IP, Bluetouth. The WiFi and Bluetout chip is about the one used by Sparkfun and I do not see why the future may not be too able SparkFun product to be as good technically with them. I personally use a software produced by Geoelctron, Surpad or Surv X (another name of it) very similar to Survey the master I signaled in and proposed to use in a post on the forum (gabriel_r), https: // forum. sparkfun.com/viewtopic.php?f=116&t=57966

nseidle commented 2 years ago

This has been implemented in v2.5.

pyrog commented 2 years ago

Tested successfully with TcpGPS - Topografía con GNSS Wifi + internal NTRIP client + internal NMEA TCP server

Settings Settings Stake out

Nightglobe commented 2 years ago

CAN YOU EXPLAIN TO ME THE CONNECTION STEPS. I AM USING A PORTABLE WIFI ROUTER WITH A PHONE CARD THAT ASSIGNS AN IP TO THE GNSS DEVICE AND ALTHOUGH I KNOW WHAT IP IS ASSIGNED TO THE GNSS DEVICE I CANNOT CONNECT TO THAT PORT

Nightglobe commented 2 years ago

FROM THE GPS SETTINGS IN THE TERMINAL, I ENABLED THE OTHER SETTINGS FOR NTRIP CLIENT, SOCKET ETC.

pyrog commented 2 years ago

2 steps:

Which software are you using on your smartphone/ tablet?

Nightglobe commented 2 years ago

SMARTFONE

Nightglobe commented 2 years ago

SORY SURPAD ANG TCPGPS

Nightglobe commented 2 years ago

MORE PRECISELY WHICH SPARKFUN GNSS RECEIVER ARE YOU USING, IT MAY BE A PROBLEM WITH MY RECEIVER IF IT FAILS, SPARKFUN FACET GPS-19984

Nightglobe commented 2 years ago

WHEN I CONNECT VIA WIFI TO THE NTRIP PROVIDER USING GPS-19984, IT GIVES ME THE NMEA CORRECTIONS RECEIVED VIA BLUETOOTH, SO IT IS ASSIGNED AN IP ADDRESS FROM THE ROOTER, FROM THE TERMINAL SETTINGS or wifi (192.168.4.1) I SET THE NTRIP CLIENT , FROM THE TERMINAL WITH THE KEY s , I GIVE ENABLE , c and s then exit , I try to access by connecting the controller to the same wifi network to the ip dedicated to the GNSS receiver, PORT 1958 AND NOTHING

pyrog commented 2 years ago

This is the same firmware for all Sparkfun RTK devices. (I use a Surveyor).

Settings parameters is difficult (See #338).

Could you please check parameters in your setting file and share it with us?

pyrog commented 2 years ago

@Nightglobe could you please read rule 4 of Netiquette ? 😃

carhargps commented 2 years ago

Hi. Could you explain better how you've done it? I've tried to follow the steps on #309 using vespucci and other apps and I couldn't get it working.

pyrog commented 2 years ago

@carhargps and @Nightglobe could you share your settings please ? I suspect that editing settings on the terminal don't save all parameters.

carhargps commented 2 years ago

I'm using RTK Facet, firmware version v2.5 and Tera Term VT

imagen

imagen

I usualy enable debug message s)-->d)-->31) Print NMEA TCP status and outputs that is trying to connect.

pyrog commented 2 years ago

I think that settings from the terminal is bugged. That is why I ask you to share your settings 😉 (Just replace sensitives parameters by "secret")

Sparkfun RTK settings

SFE_Surveyor_Settings_0.txt

ntripClient_CasterHost=caster.centipede.fr
ntripClient_CasterPort=2101
ntripClient_CasterUser=secret
ntripClient_CasterUserPW=secret
ntripClient_MountPoint=NCY

ntripClient_wifiSSID=secret
ntripClient_wifiPW=secret

enableNmeaClient=0
enableNmeaServer=1

TcpGPS settings

192.168.43.204 is the local address of the Sparkfun RTK device. 1958 is the port of the NMEA TCP server on the device.

Nightglobe commented 2 years ago

I made the settings and they worked on TcpGPS They didn't work on Surpad, but not everything can be perfect, it can still be improved, thanks for the settings you provided