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
76 stars 44 forks source link

NTRIP Server restarted after going from Base to Rover #774

Open PaulZC opened 3 weeks ago

PaulZC commented 3 weeks ago

When in Rover mode, it should not be possible to start the connections to the NTRIP Servers. But I see the server being started when in Rover mode - after having been in Base.

Provide WiFi credentials. Provide server details for one (or two) NTRIP servers. Start the RTK in Temporary Base mode. Allow the survey-in to complete. Firmware begins sending RTCM data to the servers. Change to Rover mode. The NTRIP server connections should be stopped, but I see them being periodically restarted - leading to WiFi badness when going into WiFi Config mode.

image

PaulZC commented 3 weeks ago

After a lot of digging and head-scratching, I eventually traced this to ntripServerRestart being called - instead of ntripServerStop. I believe calling ntripServerStop is the correct thing to do. ntripServerRestart actually turns the server on if the connection limit has not been reached... The same is true for ntripClientStop vs. ntripClientRestart.

@nseidle @LeeLeahy2 : please review this commit and let me know if you agree with the solution : https://github.com/sparkfun/SparkFun_RTK_Firmware/commit/af73bf3e099c0fc887e93388aac789cea483ee4c

nseidle commented 2 weeks ago

Looks good to me.