Hi!
For our development purposes I am implementing NRFUTIL 0.3 for mesh on Android/Java, migrating it from Python code, via UART/Serial, for DFU purposes
It looks like the code is half finished on some parts and I am wondering if this works as it should
1. When send_firmware is finished, how do you properly end DFU?
IF I check the code, after the firmware is done sending, it is calling
self.dfu_transport.send_validate_firmware()
and
self.dfu_transport.send_activate_firmware()
But this 2 code functions for mesh just return "True" or pass and don't do anything?
When I send firmware partially or if I send it 100% I always get response like:
A3 02 04 59 00 00 00 01 00 03 00 00 00 06
and that is it. So A3 = DFU End
1.1 So is that it? Will all devices (with device updating mesh) be updated, or do I need to call something else, like sending bank flash command?
1.2 And what happens if firmware progress was not 100% finished? Can I just start DFU again and send remaining data or do I need to start whole process again?
2. There are some functions called from _handle_dfu:
def _handle_dfu(self, data):
handle = bytes_to_int32(data[:2])
if handle is MESH_DFU_PACKET_FWID:
self._handle_dfu_fwid(data[2:])
elif handle is MESH_DFU_PACKET_STATE:
self._handle_dfu_state(data[2:])
elif handle is MESH_DFU_PACKET_DATA_REQ:
self._handle_dfu_data_req(data[2:])
But this never gets called, because I am getting 0x84 response all the time, when sending firmware, which is only ACK
2.1 Am I maybe missing something, or I have not implemented it correctly or is this not needed?
3. How can I request scanning response for all bluetooth devices visible? Because I can see there is some Provisioned devices scan, which I haven't been able to make it work yet, but can I get result via UART for visible devices and some of their info?
I got this working. I send 0x61 and I get all unprovisioned devices via serial port, so that works!
Thank you in advance!