I'd like to use the OAK-SoM-Pro for an industrial computer vision application and I need to be able to update the model, depth AI pipeline and config from an ESP32 over SPI. The reason I need to do OTA updates is because it's not practical/affordable for us to remove the device and connect it to a host computer over USB each time we want to deploy an improved model, or tweak the pipeline config. I can see that there were plans to add support for updates over SPI, but i couldn't find anywhere in the documentation for the bootloader, integration guide or SoM-Pro that explained how to do it. Could someone please explain how / give an example? It would also be nice if we could use the dap format for these updates so that we don't need a lot of bandwidth to push minor updates.
How do I flash/update a new pipeline and model to the OAK-SoM-Pro via SPI?
Hi rmaxwell ,
There was a PR here: luxonis/esp32-spi-message-demo23
Please note that IOT line of products (ESP32 / SPI) is community support only, so we won't be able to provide any support/updates.
Thanks, Erik
Hi rmaxwell ,
Yes, both SPI and IOT (and ESP32 examples) are community support only. Maybe you could try using UART instead, which should be better supported: https://docs.luxonis.com/projects/api/en/latest/samples/Script/script_uart/#script-uart-communication
Thanks, Erik
- Edited
Hi erik
I tried the SPI implementation, and unforunately it always hangs within a few seconds unless you're on a version of the SDK <= 2.15.x (it appears a similar issue has been reported before). I also tried the SPI pipeline flashing code linked above, and it doesn't work on the esp32 because the drivers used for Micron flash don't support extended addressing, and cannot write above 16MB - the pipeline DAP file with even a modest sized model is always going to be > 16MB.
I also tried UART, but there are a few issues that make it difficult to use in production:
- The supported baud rate is too low to transfer NN output, tracklet outputs (at least in busy scenes at reasonable frame rates), or image output.
- Reading from UART isn't working properly
- The low baud rate may cause the script to run slower than the input stages of the pipeline, and this isn't handled gracefully by the pipeline.
- I have to implement my own protocol for transferring the depthai objects over UART, because the script node doesn't allow us to add libraries.
Unless i'm mistaken, this basically means that people have to run a linux os just to have USB support for the depthai libraries, which isn't possible in a lot of embedded use cases.