I am trying to do OTA DFU by 'nrfutil' shell line tool and encounter the error, logs as below:
$ nrfutil dfu ble -ic NRF52 -pkg ota_app_evt1_0.01.06.20201119.zip -p /dev/ttyACM1 -a F2:8F:6D:01:B7:18
BLE: ble_enable with local ATT MTU: 247
BLE: Scanning for None
Received advertisement report, address: 0x0C930D8ECA68, device_name:
Received advertisement report, address: 0x38F0B07B71FF, device_name:
Received advertisement report, address: 0x10C0C2FABC37, device_name:
Received advertisement report, address: 0x22FAB30D5849, device_name:
Received advertisement report, address: 0x2E9945890EB9, device_name:
Received advertisement report, address: 0x182F5337D367, device_name:
Received advertisement report, address: 0x1322A82D43A7, device_name:
Received advertisement report, address: 0xF28F6D01B718, device_name: TEST_HRM
BLE: Found target advertiser, address: 0xF28F6D01B718, name: TEST_HRM
BLE: Connecting to 0xF28F6D01B718
Received advertisement report, address: 0xF28F6D01B718, device_name:
BLE: Found target advertiser, address: 0xF28F6D01B718, name:
BLE: Connecting to 0xF28F6D01B718
BLE: Connected to [242L, 143L, 109L, 1L, 183L, 24L]
ATT MTU exchanged: conn_handle=0 att_mtu=247
Successfully Connected
BLE: Service Discovery
Un-bonded Buttonless characteristic discovered -> Increment target device addr
BLE: Disconnected with reason: BLEHci.remote_user_terminated_connection
.
.
.
Received advertisement report, address: 0xF28F6D01B718, device_name: DfuTarg
Traceback (most recent call last):
File "/usr/local/bin/nrfutil", line 11, in <module>
sys.exit(cli())
File "/home/waydy_chou/.local/lib/python2.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/waydy_chou/.local/lib/python2.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/waydy_chou/.local/lib/python2.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/waydy_chou/.local/lib/python2.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/waydy_chou/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/waydy_chou/.local/lib/python2.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/__main__.py", line 1151, in ble
dfu.dfu_send_images()
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu.py", line 129, in dfu_send_images
self._dfu_send_image(self.manifest.application)
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu.py", line 90, in _dfu_send_image
self.dfu_transport.open()
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 457, in open
target_device_addr = self.target_device_addr)
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 151, in connect
self.jump_from_buttonless_mode_to_bootloader(DFUAdapter.BLE_DFU_BUTTONLESS_CHAR_UUID)
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 206, in jump_from_buttonless_mode_to_bootloader
self.verify_stable_connection()
File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_ble.py", line 246, in verify_stable_connection
raise Exception("Connection Failure - Device not found!")
Exception: Connection Failure - Device not found!
In this log you can see "Increment target device addr".
How should I do if I don't want this increment in my OTA DFU procedure.
PS. I already modified my bootloader to non-increment and it works well with "nrfConnect" android tool.
static uint32_t gap_address_change(void)
{
uint32_t err_code;
ble_gap_addr_t addr;
err_code = sd_ble_gap_addr_get(&addr);
VERIFY_SUCCESS(err_code);
/* Increase the BLE address by one when advertising openly. */
//addr.addr[0] += 1;
err_code = sd_ble_gap_addr_set(&addr);
VERIFY_SUCCESS(err_code);
return NRF_SUCCESS;
}