Open mrmorawski opened 1 year ago
I don't know the depthai-core library well enough to submit a full PR, but the hack listed in 'expected behaviour' works well for us.
Would just mirroring the adjustable watchdog code from DeviceBase.cpp work for DeviceBootloader.cpp as well?
Thanks for the proposed solution @mrmorawski - there is only one issue with this approach, that it is not completely "WD disabled" as BL still has its own WD being counted down. Though BL bumps its WD on any comms that it receives/sends successfully, so the occasion of it timing out is smaller.
Perhaps it could be reworked / put under DEPTHAI_BOOTLOADER_WATCHDOG
variable - or in general, the WD timeout just extended further. Have you tried with the latter and what was the time which worked for you?
thanks for the quick reply @themarpe . I'm aware it's not a full solution, just a quick hack that I put in to make sure it'll work at all. I'll maybe try to experiment with different timeouts next week.
Describe the bug When operating the OAK-D PoE devices over unreliable connections, the docs recommend setting environment variables to modify the XLink watchdog timeout. However, these variables only modify the watchdog timeouts DeviceBase.cpp, but not in DeviceBootloader.cpp.
When one connects to a device over XLink, it flashes a bootloader anyway. If a device connection has high latency, it'll fail during that part of the connection regardless of whether the DEPTHAI_WATCHDOG environment was set to a more conservative value than the default.
Minimal Reproducible Example Just connect to a device via a high-latency connection (e.g. over 4G), and try to flash a bootloader. It'll fail with a connection timeout, even if you set the DEPTHAI_WATCHDOG environment variable to 0.
Expected behavior The watchdog timeout should be changed also in the bootloader section of the code.
Here is an example solution that we're working with now (it only disables the watchdog, doesn't change the value): https://github.com/luxonis/depthai-core/compare/main...mrmorawski:depthai-core:no_bootloader_watchdog
Attach system log
Additional context For our particular application, we're running the cameras in standalone mode, so we don't need an XLink connection to stream frames. We only need to be able to update pipelines on cameras, which I assume will be the usecase of most people running PoE devices in standalone mode.