Hi,
I'm trying to perform a DFU firmware update via command line using nrfutil dfu ble. The same update using nRF connect works fine. The dongle is flashed with connectivity_1.2.0_115k2_with_s132_3.0. Using the option verbose and some debug I can see that it's able to connect to the target (buttonless DFU) and transition the device into DFU, reconnect to the target (with address + 1) and start the procedure. It writes few characteristics:
handle, uuid, data
18 0x01 [2, 0, 0]
18 0x01 [6, 1]
18 0x01 [4]
18 0x01 [6, 2]
18 0x01 [4]
18 0x01 [1, 2, 0, 16, 0, 0]
but it stops in a write request with a "TypeError: 'NoneType' object has no attribute 'getitem'g" error. It seems that the function doesn't return with a result, maybe because it's interrupted by something(e.g. timeout).
I'm using Linux but even with windows and nrfutil.exe I stumble in the same identical error.
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 814, 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 95, in _dfu_send_image
self.dfu_transport.send_firmware(data)
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 553, in send_firmware
self.__create_data(len(data))
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 572, in __create_data
self.__create_object(0x02, size)
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 576, in __create_object
+ map(ord, struct.pack('<L', size)))
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 333, in write_control_point
self.adapter.write_req(self.conn_handle, DFUAdapter.CP_UUID, data)
File "/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/ble_driver.py", line 124, in wrapper
err_code = wrapped(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/ble_adapter.py", line 309, in write_req
return result['status']
TypeError: 'NoneType' object has no attribute '__getitem__'
Thanks Fausto