Mobile or CLI utility for performing BLE OTA DFU

Hi,

I have the unfortunate task of needing to update a significant amount of inventory (several thousand units) using BLE OTA.

The devices are using the nRF52805 with nRF5 SDK v17.1.0 . I've used the nRF Connect mobile app to perform DFU before, and that process is easy, but unfortunately would take me a long time to do one by one. I'd like to develop a utility, either a script or a simple mobile app, that could at least perform these updates in larger batches (will still have to be done serially, but at least maybe I won't have to tap through the app every time). 

I'm currently considering two options:

  1. If I go the desktop script route, I was looking at using an nRF52840 dongle & the pc-ble-driver-py library.
  2. If I go the mobile app route, I was looking at using the Flutter-nRF-Connect-Device-Manager plugin.

I'm looking for any advice on how to approach this, and wondering if there are any concerns or limitations with either approach. I also want to be sure there isn't a smarter alternative path to accomplish this goal. 

Thanks in advance!

Parents
  • Hi Miles, 


    I will try to get the nRF Connect mobile app developer to take a look. 

    But if you want to go with the desktop route, I would suggest to use nrfutil  (nRFUtil for nRF5 SDK https://docs.nordicsemi.com/bundle/nrfutil/page/guides-nrf5sdk/intro.html )

    You can see  here  that you can start a DFU process with command line and you can use a script for that. If they advertise with the same name then you don't need to modify anything, just use the device name as the filter, or you can use BT address. In that case a script needed. 

  • Hello,

    Android dev here. nRF Connect for Android supports a feature called "Automated Tests". It allows Secure DFU. Here you may find some documentation: https://github.com/NordicSemiconductor/Android-nRF-Connect/tree/main/documentation/Automated%20tests

    Idea is as follows:

    1. Write a script in XML which will scan for some packet and start DFU on the found device.
    2. Copy required ZIP for the DFU onto the phone. Make sure nRF Connect has access there, so most prob it needs to be put into app's private folder: Android/data/no.nordicsemi.android.mcp/Tests, or something like that.
    3. You run the test from a connected PC using batch/sh script, like written in the doc. Currently there's no easy way to trigger the test without a PC, but it's just based on an Intent, so perhaps Tasker app or similar can do this.
    4. If you repeat the test multiple times (you may just copy <run-test> tag many many times in the XML, it should just go one by one and update all devices. I hope there's a difference in the adv packet of devices before and after the update.

    Anyway, I think using nrfutil and a script on a PC will be easier.

Reply
  • Hello,

    Android dev here. nRF Connect for Android supports a feature called "Automated Tests". It allows Secure DFU. Here you may find some documentation: https://github.com/NordicSemiconductor/Android-nRF-Connect/tree/main/documentation/Automated%20tests

    Idea is as follows:

    1. Write a script in XML which will scan for some packet and start DFU on the found device.
    2. Copy required ZIP for the DFU onto the phone. Make sure nRF Connect has access there, so most prob it needs to be put into app's private folder: Android/data/no.nordicsemi.android.mcp/Tests, or something like that.
    3. You run the test from a connected PC using batch/sh script, like written in the doc. Currently there's no easy way to trigger the test without a PC, but it's just based on an Intent, so perhaps Tasker app or similar can do this.
    4. If you repeat the test multiple times (you may just copy <run-test> tag many many times in the XML, it should just go one by one and update all devices. I hope there's a difference in the adv packet of devices before and after the update.

    Anyway, I think using nrfutil and a script on a PC will be easier.

Children
Related