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

Unable to find the DFU service while using ble_app_buttonless_dfu example provided in SDK17.

Hi,

I am unable to find the DFU services in example ble_app_buttonless_dfu provided in SDK 17.

Please suggest how to proceed.

Thanks 

Raj

Parents
  • Hi Raj,

    The DFU service is included in the ble_app_buttonless_dfu example (you will see many reference to it if you search for "dfu" in main.c), and you will see the device advertising with the DFU UUID if running the example on a DK. Note that it requires bootloader etc, so it requires a bit to et up unless you flash a merged hex file that included everything. Just to see how this shoud work you could flash for instance <SDK>\examples\dfu\secure_dfu_test_images\ble\nrf52832\sd_s132_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_without_bonds.hex if working with the nRF52 DK.

    If this does not address the issue, then please elaborate/clarify so that I can answer more specifically.

  • Hi Einar,

    Now I am able to put my board(nrf52840) in DFU mode with buttonless code using Esp32 as controller.

    The problem currently i am facing is to send a init packet to my nrf board at data point.

    when ever i am trying to send an init packet, I didn't get any reply at my ESP32 board  and after some time my nrf board comes in application mode from DFU mode.

    For reference i am attaching logs of my ESP32 board

    20:44:24.078 -> Starting Arduino BLE Client application...
    20:44:24.755 -> BLE Advertised Device found: Name: UART_DFU_Test, Address: c3:3e:a6:fb:ed:f4, serviceUUID: 0000fe59-0000-1000-8000-00805f9b34fb
    20:44:24.755 -> Found our device! address: Forming a connection to c3:3e:a6:fb:ed:f4
    20:44:24.789 -> - Created client
    20:44:24.822 -> - Connected to server
    20:44:25.469 -> - Found our Data service
    20:44:25.469 -> - Found our characteristic....
    20:44:25.469 -> - Found our DFU service
    20:44:25.469 -> DFU service canIndicate....
    20:44:25.537 -> Indicate callback
    20:44:25.537 -> 20 01 01(Response from NRF52 to ESP32 corrospondance to 0x01 command )
    20:44:32.153 -> 60 06 01 00 02 00 00 00 00 00 00 00 00 00 00 ((Response from NRF52 to ESP32 corrospondance to 60 01 command for select object))
    20:44:35.154 -> sending create object command...
    20:44:35.188 -> Indicate callback
    20:44:35.188 -> 60 01 01 (Response from NRF52 to ESP32 corrospondance to 0x01, 0x01,0x90,0x00,0x0,0x0 command to create object)
    20:44:35.188 -> Ready to send init Packet
    20:44:35.188 ->

    when i am trying to send init packet as show in log above nothing happens.

    i stored the content of init packet in a local buffer in my code as shown below 

    uint8_t emgPkt3[144] = {0x12,0x8D,0x01,0x0A,0x47,0x08,0x01,0x12,0x43,0x08,0x01,0x10,0x34,0x1A,0x05,0xCA,0x01,0xFE,0x95,0x03,0x20,0x20,0x28,0x20,0x30,0x20,0x38,0xF0,0xA2,0x03,0x42,0x24,0x08,0x03,0x12,0x20,0x65,0x2B,0xCB,0x9A,0xCA,0x79,0xC4,0x5C,0x99,0x81,0x98,0x06,0xF3,0x1E,0x3D,0x27,0xA7,0x08,0x69,0x20,0x20,0x94,0x51,0x7F,0x4B,0xD0,0x14,0x53,0x74,0x55,0x53,0xEF,0x48,0x01,0x52,0x040,0x80,0x01,0x12,0x20,0x10,0x20,0x1A,0x40,0x7B,0x14,0x2F,0xA8,0x3B,0xAA,0xB2,0x4B,0x84,0x5C,0x44,0x59,0xBF,0x05,0x24,0x5A,0xBF,0xDF,0x44,0x24,0x1F,0xC5,0xAE,0x3C,0xF6,0x5C,0x54,0xD0,0x3E,0x84,0xDB,0x04,0xD4,0x8B,0xA6,0x3B,0x64,0xE4,0x30,0x5E,0x8E,0x01,0xEB,0x47,0xDE,0x69,0x79,0x27,0x93,0x09,0xF3,0xE1,0xE2,0xF1,0x1B,0x73,0xE2,0x19,0x6B,0x2F,0xAB,0x1A,0x11,0x0E};

    and sending four bytes at a time till all 144 bytes are completed.

    can you suggest me where i am wrong?

    Thanks 

    Raj

  • Hi,

    whenever I try to write on DFU packet characteristics, on ESp32 side we observer that code gets stuck at "m_semaphoreWriteCharEvt.wait("writeValue"); " 

    ty..

  • I see. It is not easy for me to comment on your ESP32 code, though. But I am happy to assist on the DFU protocol.

  • Hi Einar,

    While Sending Init packet I am getting this response from Target Controller, Can you please confirm is it valid response or not?

    DFU Controller  ----------0x01----------->  DFU Target (AT DFU characteristics)

    DFU Controller  <----------0X20 0x01 0x01-----------  DFU Target 

    DFU Controller  ----------0x06 0x01----------->  DFU Target (AT Control characteristics)

    DFU Controller  <---------60 06 01 00 02 00 00 00 00 00 00 00 00 00 00------------ DFU Target 

    DFU Controller  ----------01 01 90 00 00 00---------->  DFU Target (AT Control characteristics)

    DFU Controller  <----------60 01 01---------- DFU Target 

    DFU Controller  ----------Send init packet no response----------> DFU Target (AT data characteristics)

    DFU Controller  ----------0x03---------> DFU Target (AT Control characteristics)

    DFU Controller  <----------60 03 01 90 00 00 00 58 0b a5 3b---------- DFU Target 

    DFU Controller  ----------0x04---------> DFU Target (AT Control characteristics)

    DFU Controller  <----------60 04 05---------- DFU Target 

     

    Thanks 

    Raj           

  • Hi Raj,

    The response you are getting is 0x05 which is NRF_DFU_RES_CODE_INVALID_OBJECT. From API doc: "Data object does not match the firmware and hardware requirements, the signature is wrong, or parsing the command failed". You can refer to this post for more details.

  • Hi Einar,

    Here is the RTT log given below when i am trying to perform DFU with ESP32 device, Please have a look and suggest what is wrong ?

    <info> app: Inside main
    <debug> app: In nrf_bootloader_init
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    <debug> nrf_dfu_settings: Using settings page.
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <debug> app: Enter nrf_bootloader_fw_activate
    <info> app: No firmware to activate.
    <debug> app: App is valid
    <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
    <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0
    <info> app: Inside main
    <debug> app: In nrf_bootloader_init
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    <debug> nrf_dfu_settings: Using settings page.
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <debug> app: Enter nrf_bootloader_fw_activate
    <info> app: No firmware to activate.
    <debug> app: App is valid
    <debug> app: DFU mode requested via GPREGRET.
    <info> nrf_bootloader_wdt: WDT is not enabled
    <debug> app: in weak nrf_dfu_init_user
    <debug> app: timer_stop (0x20005984)
    <debug> app: timer_activate (0x20005984)
    <info> app: Entering DFU mode.
    <debug> app: Initializing transports (found: 1)
    <debug> nrf_dfu_ble: Initializing BLE DFU transport
    <debug> nrf_dfu_ble: Setting up vector table: 0x000F1000
    <debug> nrf_dfu_ble: Enabling SoftDevice.
    <debug> nrf_dfu_ble: Configuring BLE stack.
    <debug> nrf_dfu_ble: Enabling the BLE stack.
    <debug> nrf_dfu_ble: No advertising name found
    <debug> nrf_dfu_ble: Using default advertising name
    <debug> nrf_dfu_ble: Advertising...
    <debug> nrf_dfu_ble: BLE DFU transport initialized.
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
    <debug> app: Enter main loop
    <debug> nrf_dfu_ble: Connected
    <debug> nrf_dfu_ble: Received BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST (request: 256, reply: 247).
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
    <debug> nrf_dfu_ble: max_conn_interval: 12
    <debug> nrf_dfu_ble: min_conn_interval: 12
    <debug> nrf_dfu_ble: slave_latency: 0
    <debug> nrf_dfu_ble: conn_sup_timeout: 51
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
    <debug> nrf_dfu_ble: max_conn_interval: 120
    <debug> nrf_dfu_ble: min_conn_interval: 120
    <debug> nrf_dfu_ble: slave_latency: 0
    <debug> nrf_dfu_ble: conn_sup_timeout: 60
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_SELECT:
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (command)
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> app: Shutting down transports (found: 1)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_CREATE:
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)
    <debug> app: timer_stop (0x20005984)
    <debug> app: timer_activate (0x20005984)
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 4 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (command)
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (command)
    <debug> nrf_dfu_validation: PB: Init packet data len: 67
    <error> nrf_dfu_validation: Handler: Invalid protocol buffer m_pb_stream
    <error> nrf_dfu_validation: Failed to decode init packet
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x5
    <warning> nrf_dfu_ble: DFU request 4 failed with error: 0x5

Reply
  • Hi Einar,

    Here is the RTT log given below when i am trying to perform DFU with ESP32 device, Please have a look and suggest what is wrong ?

    <info> app: Inside main
    <debug> app: In nrf_bootloader_init
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    <debug> nrf_dfu_settings: Using settings page.
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <debug> app: Enter nrf_bootloader_fw_activate
    <info> app: No firmware to activate.
    <debug> app: App is valid
    <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
    <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0
    <info> app: Inside main
    <debug> app: In nrf_bootloader_init
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    <debug> nrf_dfu_settings: Using settings page.
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <debug> app: Enter nrf_bootloader_fw_activate
    <info> app: No firmware to activate.
    <debug> app: App is valid
    <debug> app: DFU mode requested via GPREGRET.
    <info> nrf_bootloader_wdt: WDT is not enabled
    <debug> app: in weak nrf_dfu_init_user
    <debug> app: timer_stop (0x20005984)
    <debug> app: timer_activate (0x20005984)
    <info> app: Entering DFU mode.
    <debug> app: Initializing transports (found: 1)
    <debug> nrf_dfu_ble: Initializing BLE DFU transport
    <debug> nrf_dfu_ble: Setting up vector table: 0x000F1000
    <debug> nrf_dfu_ble: Enabling SoftDevice.
    <debug> nrf_dfu_ble: Configuring BLE stack.
    <debug> nrf_dfu_ble: Enabling the BLE stack.
    <debug> nrf_dfu_ble: No advertising name found
    <debug> nrf_dfu_ble: Using default advertising name
    <debug> nrf_dfu_ble: Advertising...
    <debug> nrf_dfu_ble: BLE DFU transport initialized.
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
    <debug> app: Enter main loop
    <debug> nrf_dfu_ble: Connected
    <debug> nrf_dfu_ble: Received BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST (request: 256, reply: 247).
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
    <debug> nrf_dfu_ble: max_conn_interval: 12
    <debug> nrf_dfu_ble: min_conn_interval: 12
    <debug> nrf_dfu_ble: slave_latency: 0
    <debug> nrf_dfu_ble: conn_sup_timeout: 51
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
    <debug> nrf_dfu_ble: max_conn_interval: 120
    <debug> nrf_dfu_ble: min_conn_interval: 120
    <debug> nrf_dfu_ble: slave_latency: 0
    <debug> nrf_dfu_ble: conn_sup_timeout: 60
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_SELECT:
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (command)
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> app: Shutting down transports (found: 1)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_CREATE:
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)
    <debug> app: timer_stop (0x20005984)
    <debug> app: timer_activate (0x20005984)
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 20 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_ble: Buffer 0x200092B8 acquired, len 4 (244)
    <info> nrf_dfu_req_handler: NRF_DFU_OP_OBJECT_WRITE
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
    <debug> nrf_dfu_ble: Freeing buffer 0x200092B8
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (command)
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
    <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (command)
    <debug> nrf_dfu_validation: PB: Init packet data len: 67
    <error> nrf_dfu_validation: Handler: Invalid protocol buffer m_pb_stream
    <error> nrf_dfu_validation: Failed to decode init packet
    <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x5
    <warning> nrf_dfu_ble: DFU request 4 failed with error: 0x5

Children
  • Hi,

    The firs terror in the log is "<error> nrf_dfu_validation: Handler: Invalid protocol buffer m_pb_stream", which comes from stored_init_cmd_decode() in components\libraries\bootloader\dfu\nrf_dfu_validation.c. That means that the init packet is corrupt of some sort, as the protobuf decoding fails. So you must have done something wrong when transmitting the init packet.

    Perhaps the simplest way to spot the error would be to log the data received in the bootloader (or observe with a sniffer), and compare what you get with your DFU master implementation and what you get with a working DFU master implementation upgrading with the same DFU zip file. Whatever the difference is should give a indication on what you did wrong.

  • Hi Einar,

    Init packet is send successfully, Now I need to transfer my firmware packet to the DFU Target.

    But when i send 

    Init Packet Send Process

    DFU Controller  ----------0x01----------->  DFU Target (AT DFU characteristics)

    DFU Controller  <----------0X20 0x01 0x01-----------  DFU Target 

    DFU Controller  ----------0x06 0x01----------->  DFU Target (AT Control characteristics)

    DFU Controller  <---------60 06 01 00 02 00 00 00 00 00 00 00 00 00 00------------ DFU Target 

    DFU Controller  ----------01 01 90 00 00 00---------->  DFU Target (AT Control characteristics)

    DFU Controller  <----------60 01 01---------- DFU Target 

    DFU Controller  ----------Send init packet no response----------> DFU Target (AT data characteristics)

    DFU Controller  ----------0x03---------> DFU Target (AT Control characteristics)

    DFU Controller  <----------60 03 01 90 00 00 00 58 0b a5 3b---------- DFU Target 

    DFU Controller  ----------0x04---------> DFU Target (AT Control characteristics)

    DFU Controller  <----------60 04 01---------- DFU Target 

    Firmware Packet Send Process

    DFU Controller  -----------06 02----------> DFU Target

    DFU Controller  <-----------60 06 01 00 10 00 00 00 00 00 00 00 00 00 00---------- DFU Target

    According to the response of this (06 02) we can only create a data object of 4kb size ,But my firmware image is about 97 kb can u suggest how can I transmit the image to my DFU Target controller. 

    Thanks

    Raj

  • Hi Raj,

    You cannot send larger data objects than 4 kB, but that only means that you split the firmware in multiple objects and specify the offset for each one. See DFU protocol.

  • Hi Einar,

    The link you provided is not working .

    What do you mean by offset?

    thanks 

    Raj

  • Hi Raj,

    rajAsthana said:
    The link you provided is not working .

    Odd, the link seems to be working here. You can also find it by going to the Infocenter, then Software Development Kit -> nRF5 SDK 17.0.2 -> Libraries -> Bootloader and DFU modules -> DFU Protocol.

    rajAsthana said:
    What do you mean by offset?

    The offset is from the start of the data. So let's say you have transferred x bytes, and then you continue in the next transfer. Then the offset is x.

Related