-
Notifications
You must be signed in to change notification settings - Fork 52
Crash and missing data #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the settings file! It's helpful to be able to see things like your current firmware, ZED firmware, and sentences enabled. Log reboot reason to log file - good idea. But oh man, you're going to make me write a NMEA generator :) I'll see what I can do. |
FYI - we were recording a brief message if the log was reused. |
Ok, this is what it looks like: New binary is on the release page. |
Update firmware at home this morning:
First test on the field (20 mn car trip):
Note: the firmware version could be also in this (or another) GNTXT NMEA sentence. |
FYI - I have a few leads on the crash issue. I believe it is related to the SPP Bluetooth and too many mallocs that are leading to a loss of heap, that eventually leads to system reset. Below is a log of ~1 hour with Lefebure NTRIP sending data, logging, a handful of extra UBX messages turned on.
You can see a few things:
My current theory is that the Bluetooth link is degrading which leads to backups and additional buffers being malloc'd. So, @pyrog and @Stefal: When you are testing in the field, how far away is the phone or tablet from the RTK Surveyor? I suspect >10m from the RTK Surveyor will begin to cause these types of SPP issues over a period of minutes. FYI - The way I am introducing a 'bad link' is by putting my phone in the microwave (and moving the kid's ladder away so that my 1 year old doesn't cook my phone). The microwave is a great 2.4GHz Faraday cage. Fun fact: my phone got a call while it was in the microwave because a microwave is designed to block 2.4GHz, not 1.4GHz or whatever my LTE is operating at (yay EE!). |
Usually, less than 1 meter. Initially I thought more of a regression because it happened just after the firmware update? |
Ya, I figured it was near by but I was hoping maybe you had the phone far away for some reason. I will keep working on it. After much searching it does seem that SPP performance varies between phones and manufacturers. I will attempt to make the RTK Surveyor as friendly as possible to all devices. |
In all my later tests, I didn't got any crash nor missing data 😃 My theory is that if Mapillary take pictures too fast (image min delay=0) and/or the phone memory is nearly full, the SPP consuming app in Android couldn't respond fast enough, then provoque a SPP congestion… So this is mainly a smartphone issue 😅 It could be reproduced this ways?
@nseidle |
Ok, I think we're starting to solve this issue! Is it acceptable to not transmit data when Bluetooth becomes congested? Data logging will remain unaffected? I think so but I'd like to know your thoughts. @pyrog - I agree. As the link degrades (either because the phone is busy or the RF interference increases) the BluetoothSerial library attempts to buffer more and more data causing heap shortages. To avoid this I've added a isCongested check before adding new NMEA data from the ZED into the SPP buffer. This allows ZED data to always be recorded to SD, but rejected/dropped if the BT SPP is congested. This setting called
Above you can see the F9PSerialReadTask dropping bytes (1170, 930, etc) but the heap is maintaining. I've been running a harsh test and so far, so good: My phone is in a metal drawer. RTK is covered by an ESD bin. This is enough to cause a lot of RF problems, but not drop the link entirely. I've got a lot of messages turned on to increase the TX to ~18k/s. The downside to I'll add the June28 RC binary to the release page. Please give it a try and let me know what you think. |
I believe we've reduced the system crashes due to BT congestion quite a bit (I haven't seen a crash in ages) but there will be dropped data if the link becomes congested. Closing. Please open a new issue if you discover anything new. |
Subject of the issue
During a 1 hour and 45 minutes hiking, got:
Your workbench
RTK_Surveyor_Firmware_v14RC_June22
Default settings SFE_Surveyor_Settings.txt
Device connected over Bluetooth with Lefebure NTRIP Client
Device and phone powered with their internal batteries
Feature request
The text was updated successfully, but these errors were encountered: