FOTA to an encapsulated Bluetooth device that is having "No free slot" error

Hello,

Recently, my team has been struggling with an issue regarding a nRF5340 device that's encapsulated and inaccessible to be flashed with a JTAG connection. Our normal use case is:
1. Connect to the device via the DeviceManager iOS app or equivalent Android app

2. Select the "image" option

3. Select the OTA package.zip

4. Click start and "Confirm only"

This has worked for us up until this point, and we've used this process for nearly a year now. However, we ran into an issue with one of our devices that's fully closed off where the OTA bugged midway through downloading and the app reported an error of "No free slot". My understanding is this:

There is enough space for two builds on the device, each made up of two images, one for the Bluetooth core and one for the main core, and the primary build slot is the firmware that the device is running, and the secondary build slot is for OTAing images. When an image is successfully downloaded into the secondary slot, the primary slot will switch over to the image in the secondary slot and clear the secondary slot, which will allocate space for future OTA images to be placed into the secondary slot.

However, I believe what has occurred is that the OTA process bugged during the uploading stage of the image to the device, and this has left the secondary build slot in a "stuck" state where it cannot accept any new OTA images since it's full with an incomplete one. Thus, the "No free slot" error.

To solve this, my approach would be to connect to the device over Bluetooth and tell it to clear the secondary build slot. This is much easier said than done though. To do this, I tried to communicate with mcuMGR terminal commands, but through many rabbit holes, I found that OTAing is not available over Windows and therefore there's not much support for how to communicate via mcuMGR to the device to get it to clear its secondary build slot.

My question, therefore, is: how can we clear the secondary build slot of the device to solve this "No free slot" error via Bluetooth? We cannot open or unencapsulate the device.

Thanks!

Parents Reply Children
  • Thanks for the reply Edvin!

    I actually had already given that a shot, and we found a way to get the application core image to be put into the primary slot. When we clicked "read", we saw that there were two images, the primary and secondary. When I clicked "erase", the secondary image was erased, and only one image was left, the primary image. I then attempted to upload an image, experienced the error, and then clicked "read" again and saw that there were now two images in place. I then clicked "test" to move the secondary image to the primary slot, clicked "confirm" to confirm the secondary image to the primary slot, and then I clicked "reset" to reset the device. The application core image was successfully moved to the primary slot.

    However, this didn't solve the issue of the network core image not being able to be FOTA'd. If both images were FOTA-able, then the error wouldn't have happened in the first place. I would like to find a way to erase the secondary network core image so that I can FOTA successfully again.

    I believe the answer involves terminal commands, but the terminal commands aren't supported on Windows. I was hoping to find a work-around, or to be able to do it with a Linux VirtualBox.

    Do you have any ideas?

Related