Closed YannickRiou closed 1 year ago
Hi @YannickRiou ,
I think the root cause of this is the default size of the ESP32S2's Serial RX buffer - possibly 256 bytes?
The RXM-RAWX message can be over 2kBytes in size when tracking multiple satellites on dual bands. I suspect that is overflowing the receive buffer, if you do not call checkUblox
often enough.
If you call checkUblox
often, it will 'catch' the arrival of the start of the RXM-RAWX message and will keep receiving and processing the data.
But if you make your delay too long, the RX buffer will overflow and data will be lost before you next call checkUblox
. This causes a checksum error and the data is discarded.
Please try adding gnssSerial.setRxBufferSize(4096);
before gnssSerial.begin(19200, SWSERIAL_8N1, SOFT_SER_GNSS_RX, SOFT_SER_GNSS_TX, false);
. It may solve this issue.
Please also use hardware serial if possible. SoftwareSerial is always problematic.
I am going to close this, but please reopen it if you need more help or advice.
Best wishes, Paul
Subject of the issue
I use the library to communicate with a ZED-F9P GNSS module. My goal is to log raw gnss data (RAWX) and store them into flash. I found that when I try to obtain RAWX data using the function checkUblox in the main loop, it only works if the delay is 10 ms. I can't manage to get any data from gnss when the delay is above (50 ms or 100 ms). The library is used on ESP32S2 using Arduino framework (2.0.6).
Steps to reproduce
Use the following to configure the GNSS :
And the data gathering is done into the main "void loop" by calling checkUblox with a "delay(10)"
Expected behavior
I should be able to se the delay in the main loop at different value and still get the ubx buffer to fill with data.
Actual behavior
If I put a delay of 10ms , everything is fine and the buffer fills ok, but if I put 50ms or 100ms, no data is getting into the buffer. even after few seconds.