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

NRFutil failing to perform dfu over ble with code 0x8016.

Hello,

I've been trying to perform a dfu to a target Nordic device over Bluetooth using an nrf52840 dongle distributed by Laird, however whenever I attempt to run the command:

nrfutil dfu ble -ic NRF52 -pkg <package_name> -a <target_address>

I get a strange error. I will post the verbose output below, but first let me tell about the environment, packages and what firmware is on my device.

This is running on a Raspberry PI 4, with Buster 10.

I have the latest version of pc-ble-driver built on the device, pc-ble-driver-py version 0.14.2, and nrfutil version 6.1.0.

My nrf52840 dongle is flashed with connectivity_6.0.0_usb_with_s140_6.1.1.hex.

Here is the output from running the command:

Please select connectivity serial port:
        0 : /dev/ttyACM1 - D67B7A98D69A
Enter your choice: : 0
2020-10-08 09:18:03,198 Using connectivity board at serial port: /dev/ttyACM1
2020-10-08 09:18:03,207 Sending Application image.
2020-10-08 09:18:06,616 Successfully opened /dev/ttyACM1. Baud rate: 1000000. Flow control: none. Parity: none.
2020-10-08 09:18:06,617 evt> severity(20) message(Successfully opened /dev/ttyACM1. Baud rate: 1000000. Flow control: none. Parity: none.)
2020-10-08 09:18:06,617 RpcAppStatus.resetPerformed: Target Reset performed
2020-10-08 09:18:06,618 evt> status code(RpcAppStatus.resetPerformed) message(Target Reset performed)
2020-10-08 09:18:07,818 RpcAppStatus.connectionActive: Connection active
2020-10-08 09:18:07,818 evt> status code(RpcAppStatus.connectionActive) message(Connection active)
2020-10-08 09:18:07,823 BLE: Scanning for None
2020-10-08 09:18:08,243 RpcAppStatus.ioResourcesUnavailable: serial port read failed on port /dev/ttyACM1. Error: End of file [2]
2020-10-08 09:18:08,243 evt> status code(RpcAppStatus.ioResourcesUnavailable) message(serial port read failed on port /dev/ttyACM1. Error: End of file [2])
2020-10-08 09:18:09,324 Failed to receive response for command
2020-10-08 09:18:09,324 evt> severity(30) message(Failed to receive response for command)
Traceback (most recent call last):
2020-10-08 09:18:09,325 RpcAppStatus.pktSendError: Error sending packet to target. Code: 0x8016
  File "/usr/local/bin/nrfutil", line 11, in <module>
2020-10-08 09:18:09,325 evt> status code(RpcAppStatus.pktSendError) message(Error sending packet to target. Code: 0x8016)
    load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/__main__.py", line 1207, in ble
    dfu.dfu_send_images()
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image
    self.dfu_transport.open()
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu_transport_ble.py", line 476, in open
    target_device_addr = self.target_device_addr)
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu_transport_ble.py", line 152, in connect
    self.adapter.driver.ble_gap_scan_start()
  File "/home/pi/.local/lib/python3.7/site-packages/pc_ble_driver_py/ble_driver.py", line 107, in wrapper
    error_code=err_code,
pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_gap_scan_start. Error code: NRF_ERROR_SD_RPC_SEND

Update:

Some information I forgot to mention was that the target device is using s140_nrf52_6.1.1_softdevice.hex. Now I've since tried different hex files. Before I knew what was really on the target device I tried connectivity_4.1.2_usb_with_s132_5.1.0.hex because it was precompiled with pc-ble-driver-py. The behavior here was that it would perform the update, but fail at 62%. The output was this:

Please select connectivity serial port:
        0 : /dev/ttyACM0 - D67B7A98D69A
Enter your choice: : 0
  [######################--------------]   62%  00:00:30
Traceback (most recent call last):
  File "/usr/local/bin/nrfutil", line 11, in <module>
    load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/__main__.py", line 1205, in ble
    dfu.dfu_send_images()
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu.py", line 100, in _dfu_send_image
    self.dfu_transport.send_firmware(data)
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu_transport_ble.py", line 572, in send_firmware
    response['crc'] = self.__stream_data(data=data, crc=response['crc'], offset=i)
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu_transport_ble.py", line 642, in __stream_data
    self.dfu_adapter.write_data_point(list(to_transmit))
  File "/usr/local/lib/python3.7/dist-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu_transport_ble.py", line 350, in write_data_point
    self.adapter.write_cmd(self.conn_handle, DFUAdapter.DP_UUID, data)
  File "/home/pi/.local/lib/python3.7/site-packages/pc_ble_driver_py/ble_adapter.py", line 568, in write_cmd
    raise e
  File "/home/pi/.local/lib/python3.7/site-packages/pc_ble_driver_py/ble_adapter.py", line 554, in write_cmd
    response = self.driver.ble_gattc_write(conn_handle, write_params)
  File "/home/pi/.local/lib/python3.7/site-packages/pc_ble_driver_py/ble_driver.py", line 107, in wrapper
    error_code=err_code,
pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_gattc_write. Error code: NRF_ERROR_SD_RPC_NO_RESPONSE

After figuring out what was on the target device I've tried the following hex files:

connectivity_4.1.2_usb_with_s140_6.1.1.hex

connectivity_6.1.0_usb_with_s140_6.1.1.hex

connectivity_6.1.1_usb_with_s140_6.1.1.hex

But all of these have exhibited the exact same behavior as in the original post.

  • tried connectivity_4.1.2_usb_with_s132_5.1.0.hex

    That is the correct version to use, since pc-ble-driver-py does not support SD API 6 and 7.

    The behavior here was that it would perform the update, but fail at 62%

    Does it always fail at 62% ? and with the same error-code ?

  • Hell Sigurd,

    Thank you for the reply. That is good to know about the SD. As far always failing on 62%, that is not the case. It can fail at anytime. One time it failed at 97%. However sometimes it finishes completely, but when it fails it always has that same error code.

  • Do you see any errors in the log from the other device? 

    Could you try to flash the debug variant of the bootloader on the device you are DFUing, and check the log output on that device ? 

  • My suspicion is that the PI is dropping the dongle mid dfu at time. I've been running dfus through a separate linux environment but with the same versions of nrfutil and pc-ble-driver-py and haven't had an issue there yet. I am looking into whether it is a known issue with PIs dropping usb devices from time to time.

    Edit:

    After running in the separate linux environment about 40 times, the dfu process crashes about 5% of the time. There two seperate errors that come up. NRF_ERROR_SD_RPC_NO_RESPONSE, which only came up twice, once at 99% and another at 20%. Not sure why that issue is still occurring but it was very rare.

    The second error was a little more frequent. NRF_ERROR_INVALID_PARAM. This one had the following output when it occured. It seems to have something to do with setting the MTU.

    ...
    2020-10-09 11:38:31,172 Successfully Connected
    2020-10-09 11:38:31,172 BLE: Service Discovery
    2020-10-09 11:38:31,224 evt> on_gattc_evt_prim_srvc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Service uuid(0x1800) start handle(1) end handle(9)
     Service uuid(0x1801) start handle(10) end handle(10)
    2020-10-09 11:38:31,282 evt> on_gattc_evt_prim_srvc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Service uuid(0x0000 (Standard.unknown)) start handle(11) end handle(16)
    2020-10-09 11:38:31,342 evt> on_gattc_evt_prim_srvc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Service uuid(0xFE59) start handle(17) end handle(65535)
    2020-10-09 11:38:31,404 evt> on_gattc_evt_read_rsp status(BLEGattStatusCode.success) conn(0)
     error_handle(0)
     attr_handle(11)
     offset(0)
     data([158, 202, 220, 36, 14, 229, 169, 224, 147, 243, 163, 181, 1, 0, 64, 110])
    2020-10-09 11:38:31,463 evt> on_gattc_evt_prim_srvc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Service uuid(0x0001) start handle(11) end handle(16)
    2020-10-09 11:38:31,525 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x2A00) properties(BLECharProperties(broadcast=0, read=1, write_wo_resp=0, write=1, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(2) value handle(3)
     Characteristic uuid(0x2A01) properties(BLECharProperties(broadcast=0, read=1, write_wo_resp=0, write=0, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(4) value handle(5)
     Characteristic uuid(0x2A04) properties(BLECharProperties(broadcast=0, read=1, write_wo_resp=0, write=0, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(6) value handle(7)
    2020-10-09 11:38:31,582 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x2AA6) properties(BLECharProperties(broadcast=0, read=1, write_wo_resp=0, write=0, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(8) value handle(9)
    2020-10-09 11:38:31,642 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    2020-10-09 11:38:31,702 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2A00) handle(3)
    2020-10-09 11:38:31,762 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2A01) handle(5)
    2020-10-09 11:38:31,822 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2A04) handle(7)
    2020-10-09 11:38:31,882 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2AA6) handle(9)
    2020-10-09 11:38:31,942 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    2020-10-09 11:38:32,002 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x0003) properties(BLECharProperties(broadcast=0, read=0, write_wo_resp=0, write=1, notify=0, indicate=1, auth_signed_wr=0)) declaration handle(18) value handle(19)
    2020-10-09 11:38:32,062 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    2020-10-09 11:38:32,122 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x0003) handle(19)
    2020-10-09 11:38:32,182 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2902 (Standard.cccd)) handle(20)
    2020-10-09 11:38:32,243 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    2020-10-09 11:38:32,303 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x0002) properties(BLECharProperties(broadcast=0, read=0, write_wo_resp=1, write=1, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(12) value handle(13)
    2020-10-09 11:38:32,392 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x0003) properties(BLECharProperties(broadcast=0, read=0, write_wo_resp=0, write=0, notify=1, indicate=0, auth_signed_wr=0)) declaration handle(14) value handle(15)
    2020-10-09 11:38:32,453 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    2020-10-09 11:38:32,512 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x0002) handle(13)
    2020-10-09 11:38:32,572 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x0003) handle(15)
    2020-10-09 11:38:32,632 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2902 (Standard.cccd)) handle(16)
    2020-10-09 11:38:32,632 Un-bonded Buttonless characteristic discovered -> Increment target device addr
    2020-10-09 11:38:32,692 evt> on_gattc_evt_write_rsp conn(0)
     status(BLEGattStatusCode.success)
     error_handle(0)
     attr_handle(20)
     write_op(BLEGattWriteOperation.write_req)
     offset(0)
     data([])
    2020-10-09 11:38:32,752 evt> on_gattc_evt_write_rsp conn(0)
     status(BLEGattStatusCode.success)
     error_handle(0)
     attr_handle(19)
     write_op(BLEGattWriteOperation.write_req)
     offset(0)
     data([])
    2020-10-09 11:38:32,757 evt> on_gattc_evt_hvx status(BLEGattStatusCode.success) conn(0)
     error_handle(0)
     attr_handle(19)
     hvx_type(BLEGattHVXType.indication)
     data([32, 1, 1])
    2020-10-09 11:38:36,802 BLE: Disconnected with reason: BLEHci.connection_timeout
    2020-10-09 11:38:36,813 evt> adv_report conn(65535)
     peer_addr(79:38:B6:CB:9F:E3)
     rssi(-73)
     adv_type(BLEGapAdvType.connectable_undirected)
    2020-10-09 11:38:36,814 Received advertisement report, address: 0x7938B6CB9FE3, device_name: 
    2020-10-09 11:38:36,817 evt> adv_report conn(65535)
     peer_addr(7A:39:A6:CA:3E:95)
     rssi(-75)
     adv_type(BLEGapAdvType.non_connectable_undirected)
    2020-10-09 11:38:36,817 Received advertisement report, address: 0x7A39A6CA3E95, device_name: 
    2020-10-09 11:38:36,821 evt> adv_report conn(65535)
     peer_addr(D3:43:7B:37:B2:7B)
     rssi(-65)
     adv_type(BLEGapAdvType.connectable_undirected)
    2020-10-09 11:38:36,821 Received advertisement report, address: 0xD3437B37B27B, device_name: DfuTarg
    2020-10-09 11:38:36,821 BLE: Found target advertiser, address: 0xD3437B37B27B, name: DfuTarg
    2020-10-09 11:38:36,822 BLE: Connecting to 0xD3437B37B27B
    2020-10-09 11:38:36,829 evt> adv_report conn(65535)
     peer_addr(36:69:F5:D0:E5:AE)
     rssi(-76)
     adv_type(BLEGapAdvType.non_connectable_undirected)
    2020-10-09 11:38:36,829 Received advertisement report, address: 0x3669F5D0E5AE, device_name: 
    2020-10-09 11:38:36,835 evt> adv_report conn(65535)
     peer_addr(21:B9:40:53:52:E4)
     rssi(-54)
     adv_type(BLEGapAdvType.non_connectable_undirected)
    2020-10-09 11:38:36,835 Received advertisement report, address: 0x21B9405352E4, device_name: 
    2020-10-09 11:38:36,875 BLE: Connected to [211, 67, 123, 55, 178, 123]
    2020-10-09 11:38:37,029 BLE: Disconnected with reason: BLEHci.conn_failed_to_be_established
    2020-10-09 11:38:37,029 Received unexpected disconnect event, trying to re-connect to: D3437B37B27B
    2020-10-09 11:38:38,059 BLE: Connected to [211, 67, 123, 55, 178, 123]
    2020-10-09 11:38:38,061 evt> conn_param_update_request conn(0)
     conn_params(
      min_conn_interval_ms(15.0)
      max_conn_interval_ms(15.0)
      slave_latency(0))
    2020-10-09 11:38:38,061 evt> conn_param_update_request conn(0)
     conn_params(
      min_conn_interval_ms(15.0)
      max_conn_interval_ms(15.0)
      slave_latency(0))
    2020-10-09 11:38:39,060 Successfully Connected
    2020-10-09 11:38:39,060 BLE: Connected to target
    2020-10-09 11:38:39,060 BLE: Service Discovery
    2020-10-09 11:38:39,112 evt> on_gattc_evt_prim_srvc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Service uuid(0x1800) start handle(1) end handle(9)
     Service uuid(0x1801) start handle(10) end handle(10)
     Service uuid(0xFE59) start handle(11) end handle(65535)
    2020-10-09 11:38:39,173 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x2A00) properties(BLECharProperties(broadcast=0, read=1, write_wo_resp=0, write=1, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(2) value handle(3)
     Characteristic uuid(0x2A01) properties(BLECharProperties(broadcast=0, read=1, write_wo_resp=0, write=0, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(4) value handle(5)
     Characteristic uuid(0x2A04) properties(BLECharProperties(broadcast=0, read=1, write_wo_resp=0, write=0, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(6) value handle(7)
    2020-10-09 11:38:39,230 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x2AA6) properties(BLECharProperties(broadcast=0, read=1, write_wo_resp=0, write=0, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(8) value handle(9)
    2020-10-09 11:38:39,292 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    2020-10-09 11:38:39,352 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2A00) handle(3)
    2020-10-09 11:38:39,412 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2A01) handle(5)
    2020-10-09 11:38:39,472 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2A04) handle(7)
    2020-10-09 11:38:39,532 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2AA6) handle(9)
    2020-10-09 11:38:39,592 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    2020-10-09 11:38:39,652 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x0002) properties(BLECharProperties(broadcast=0, read=0, write_wo_resp=1, write=0, notify=0, indicate=0, auth_signed_wr=0)) declaration handle(12) value handle(13)
    2020-10-09 11:38:39,712 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Characteristic uuid(0x0001) properties(BLECharProperties(broadcast=0, read=0, write_wo_resp=0, write=1, notify=1, indicate=0, auth_signed_wr=0)) declaration handle(14) value handle(15)
    2020-10-09 11:38:39,772 evt> on_gattc_evt_char_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    2020-10-09 11:38:39,832 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x0002) handle(13)
    2020-10-09 11:38:39,921 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x0001) handle(15)
    2020-10-09 11:38:39,980 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.success) conn(0)
     Descriptor uuid(0x2902 (Standard.cccd)) handle(16)
    2020-10-09 11:38:40,040 BLE: Enabling longer ATT MTUs
    2020-10-09 11:38:40,041 evt> on_gattc_evt_desc_disc_rsp status(BLEGattStatusCode.attribute_not_found) conn(0)
     
    Traceback (most recent call last):
      File "/home/mtd/.local/lib/python3.6/site-packages/pc_ble_driver_py/ble_adapter.py", line 216, in att_mtu_exchange
        self.driver.ble_gattc_exchange_mtu_req(conn_handle, mtu)
      File "/home/mtd/.local/lib/python3.6/site-packages/pc_ble_driver_py/ble_driver.py", line 107, in wrapper
        error_code=err_code,
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_gattc_exchange_mtu_req. Error code: NRF_ERROR_INVALID_PARAM
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/home/mtd/.local/bin/nrfutil", line 8, in <module>
        sys.exit(cli())
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
        rv = self.invoke(ctx)
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "/home/mtd/.local/lib/python3.6/site-packages/nordicsemi/__main__.py", line 1199, in ble
        dfu.dfu_send_images()
      File "/home/mtd/.local/lib/python3.6/site-packages/nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
        self._dfu_send_image(self.manifest.application)
      File "/home/mtd/.local/lib/python3.6/site-packages/nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image
        self.dfu_transport.open()
      File "/home/mtd/.local/lib/python3.6/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 476, in open
        target_device_addr = self.target_device_addr)
      File "/home/mtd/.local/lib/python3.6/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 173, in connect
        self.att_mtu = self.adapter.att_mtu_exchange(self.conn_handle, DFUAdapter.LOCAL_ATT_MTU)
      File "/home/mtd/.local/lib/python3.6/site-packages/pc_ble_driver_py/ble_adapter.py", line 221, in att_mtu_exchange
        "different config tags used in ble_cfg_set and connect.") from ex
    pc_ble_driver_py.exceptions.NordicSemiException: MTU exchange request failed. Common causes are: missing att_mtu setting in ble_cfg_set, different config tags used in ble_cfg_set and connect.

  • Do you know what could be causing the NRF_ERROR_INVALID_PARAM error from the log output I provided in my other reply to this post? I probably should have done a reply instead of editing since that probably would have sent a notification. 

Related