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

nrfutil fails dfu - "UUID not found"

Hi,

As a part of settings up an automatic BLE DFU testing environment, we're trying to update a single NRF52 board using a PC connected to a NRF51 dongle.

The dongle is programmed using the hex file: connectivity_2.0.1_115k2_with_s130_2.0.1 

TheNRF52 board is discoverable and connectable with nRF Connect on Android and on the PC. DFU works on Android with nrf Connect.

When we try to initiate DFU using nrfutil (3.5.0) with the command line: nrfutil.exe dfu ble -ic NRF51 -pkg "<some-long-package-path>" -p COM9 -n "<our device's name>" 

we get the message:

2018-04-09 19:33:53,576 Exception: UUID not found
2018-04-09 19:33:53,582 ('c:\\python27\\lib\\site-packages\\pc_ble_driver_py\\ble_driver.py', 1483, 'sync_ble_evt_handler', 'data = util.uint8_array_to_list(hvx_evt.data, hvx_evt.len))')
2018-04-09 19:33:53,584 ('c:\\python27\\lib\\site-packages\\wrapt\\wrappers.py', 562, '__call__', 'args, kwargs)')
2018-04-09 19:33:53,584 ('c:\\python27\\lib\\site-packages\\wrapt\\decorators.py', 440, '_synchronized', 'return wrapped(*args, **kwargs)')
2018-04-09 19:33:53,585 ('c:\\python27\\lib\\site-packages\\pc_ble_driver_py\\ble_adapter.py', 486, 'on_gattc_evt_hvx', "raise NordicSemiException('UUID not found')")

Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\nrfutil.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "c:\python27\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\python27\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python27\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python27\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python27\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\python27\lib\site-packages\nordicsemi\__main__.py", line 834, in ble
dfu.dfu_send_images()
File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu.py", line 129, in dfu_send_images
self._dfu_send_image(self.manifest.application)
File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu.py", line 90, in _dfu_send_image
self.dfu_transport.open()
File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_ble.py", line 453, in open
target_device_addr = self.target_device_addr)
File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_ble.py", line 153, in connect
self.jump_from_buttonless_mode_to_bootloader(DFUAdapter.BLE_DFU_BUTTONLESS_BONDED_CHAR_UUID)
File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_ble.py", line 196, in jump_from_buttonless_mode_to_bootloader
response = self.indication_q.get(timeout=DfuTransportBle.DEFAULT_TIMEOUT)
File "c:\python27\lib\Queue.py", line 176, in get
raise Empty
Queue.Empty

And of course the DFU fails. The strange thing is that it sometimes (rarely) works, so perhaps we're missing some parameters?

Would appreciate help,

Thanks

  • Thanks for clarifying about the documentation. 

    I didn't specify earlier, but we're not using the nRF52 DK, we're using nRF52832, so it's a buttonless DFU.

    Your suggestion did help, but partially. Indeed erasing the nRF51 and using the nrfutil command (with the -n and -p parameters in addition to the -f flag) updates the firmware correctly and consistently.

    The is still a problem with successive updates. After a successful DFU, if we restart the nrf52 unit (without erasing its contents) and try another DFU with nrfutil it fails with the UUID error. It doesn't happen when using the mobile nRF connect. 

    Is this some sort of a cache issue the nrfutil can't handle?

    Thanks for the help!

  • Do you get the same exact log error as in your first comment (i.e. ('c:\\python27\\lib\\site-packages\\pc_ble_driver_py\\ble_adapter.py', 486, 'on_gattc_evt_hvx', "raise NordicSemiException('UUID not found')"))? If it is different, could you add a comment with the updated log when it fails the second time round.

    I have tested with the regular bootloader_secure_ble using the v5 softdevice & updating the ble_peripheral/blinky application. The nrfutil dfu works multiple times with that. I have to reset the nrf52 dk while holding in button 4 to enter bootloader mode, so that could maybe influence the process slightly. Have you tested with the regular buttonless dfu application in the ble_peripheral folder to see if you can do the dfu multiple times? That should work.

  • Yes, it's the same error. 

    Right now we bypass the issue by reprogramming the device to the same version we just updated to, before another update.

    Since reprogramming works and resetting doesn't, we might have an issue on our side. We'll look into it.

    In the meanwhile, we'll close this ticket.

    Thanks for the help

  • Hi,

    In a private conversation we found nrfutil to raise an exception on service changed indication if it had not yet done database discovery.

    Thanks to your reporting the nrfutil team is now aware of the issue, and they hope to have a fix for this for the next nrfutil release.

    For now, three possible workarounds are 1) to send service changed indications from the DFU target after a delay or not at all, or 2) to use a different tool than nrfutil, or 3) to try to patch the offending line in ble_adapter.py (e.g. not raise the exception).

    Finally I would like to thank you for reporting this issue and providing logs and further information in the private thread. It is highly appreciated, and allowed us to understand the problem and pinpoint the issue.

    Regards,
    Terje

Related