This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Batch OTA DFU / BLE - Using NRF52DK or NRF51Dongle as programmer over BLE, Don't Work !

Hi all the Nordic friends and Team,

I would like to do a Batch OTA of one hundred devices right now... I'm on the NRF52 stack for my devices to be flashed. And I'm using the SoftDevice 3.1.0 with the SDK 12.3... I thought that this version was not really Stamped "OTA DFU" Production ready...


So to do the best, I made myself a little python program that passes my entire list of devices "DOP_XXXX" (last 4 digits of the MAC Adress) in DFU mode automatically at first..., it works without problem.

Now, I would like to use the nrfutil from my computer to pass all these devices, one by one (automatically) at the last update of my App as follows:

#nrfutil dfu ble -ic NRF52 -pkg DOPPY_APP_dfu_package.zip -p / dev / ttyACM0 -f -a XX:XX:XX:XX:XX:XX

As much on the NRF52DK or NRF51Dongle, I previously erased and programmed the connectivity via the nrfutil via the flag "-f" but it does not work, in the end...

I leave you below the progress of the operation, until the failure... I am on Debian 9.x 64-bit, I made the test under Windows 10 64-bit, as well as macOS Hight Sierra. With sensibly the same Python environment stack etc. But the same ... anyone with an idea of ​​how to make it work?


With nRF Connect on macOS, I get to run (1 to 1...) flash OK with OTA App flashing...
But from an automation point of view it's a little shame...


A tip to run your soft command line well?

Thank you very much for the help

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# uname -a

Linux bbox2 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# python

Python 2.7.13 (default, Nov 24 2017, 17:33:09) 

[GCC 6.3.0 20170516] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# nrfutil version

nrfutil version 3.4.0

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# sudo nrfjprog --family nrf52 --eraseall ;

Erasing user available code and UICR flash areas.

Applying system reset.

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# 

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# sudo nrfutil dfu ble -ic NRF52 -pkg DOPPY_APP_dfu_package.zip -p /dev/ttyACM0 -f -a XX:XX:XX:XX:5C:C4

Flashing connectivity firmware...

Connectivity firmware flashed.

  [------------------------------------]    0%

Traceback (most recent call last):

  File "/usr/local/bin/nrfutil", line 11, in <module>

    sys.exit(cli())

  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__

    return self.main(*args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main

    rv = self.invoke(ctx)

  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke

    return ctx.invoke(self.callback, **ctx.params)

  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke

    return callback(*args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/__main__.py", line 812, in ble

    dfu.dfu_send_images()

  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu.py", line 122, in dfu_send_images

    self._dfu_send_image(self.manifest.application)

  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu.py", line 83, in _dfu_send_image

    self.dfu_transport.open()

  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 453, in open

    target_device_addr = self.target_device_addr)

  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 142, in connect

    self.verify_stable_connection()

  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 245, in verify_stable_connection

    raise Exception("Connection Failure - Device not found!")

Exception: Connection Failure - Device not found!

u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update#

Parents
  • Hum as suggested here, to recompile the sources : https://devzone.nordicsemi.com/f/nordic-q-a/22327/command-line-nrfutil-dfu-ble/87778#87778

    It still not working BLE DFU Programming…

    I will send a private ticket to the engineer with "MyPage" Nordic and I will come back if positive outcome there...

  • Hi,

    For those who may be interested, it was pure serendipity, that I found it work with ' -n "" ' instead of ' -a MAC_ADDRESS ' or ' -n "DEVICE_NAME" '… but good idea the increment of the end of the MAC address Thumbsup tone1 I still tried in this direction but it did not…

    sometimes got "pc_ble_driver_py.exceptions.NordicSemiException: CCCD not found" but…

    Maybe be using nrfutil ' -n "" ' with empty device name search for first Device in Dfu Mode, since I swapped "DfuTarg" for somethings more complicated with "Recycle DOP Updating…" into the name… 

    I have not looked in the python code of nrfutil yet…

    Regards,

    u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# nrfutil dfu ble -ic NRF52 -pkg DOPPY_APP_dfu_package.zip -p /dev/ttyACM0 -n ""

      [------------------------------------]    0%

      [###################-----------------]   50%

      [####################################]  100%             

    Device programmed.

Reply
  • Hi,

    For those who may be interested, it was pure serendipity, that I found it work with ' -n "" ' instead of ' -a MAC_ADDRESS ' or ' -n "DEVICE_NAME" '… but good idea the increment of the end of the MAC address Thumbsup tone1 I still tried in this direction but it did not…

    sometimes got "pc_ble_driver_py.exceptions.NordicSemiException: CCCD not found" but…

    Maybe be using nrfutil ' -n "" ' with empty device name search for first Device in Dfu Mode, since I swapped "DfuTarg" for somethings more complicated with "Recycle DOP Updating…" into the name… 

    I have not looked in the python code of nrfutil yet…

    Regards,

    u@bbox2:/home/u/Documents/fw/v12/4OTA_DFU_Update# nrfutil dfu ble -ic NRF52 -pkg DOPPY_APP_dfu_package.zip -p /dev/ttyACM0 -n ""

      [------------------------------------]    0%

      [###################-----------------]   50%

      [####################################]  100%             

    Device programmed.

Children
No Data
Related