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

Sending Response: [0x4, 0xB] in serial DFU ?

 Hi,

I m using nrf52840 and m doing DFU over serial.

one side is master controller and other end is NRF DFU serial(secure bootloader uart debug code).

After sending init packet. i m getting correct CRC value from NRF by sending value 03.

And then i m sending 04 command.I m getting 0b response in master mcu. 

Here following error on nrf side

<warning> nrf_dfu_ver_validation: SD req not met.
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0xB
<warning> nrf_dfu_serial: DFU request completed with result: 0xB
<debug> nrf_dfu_serial: Sending Response: [0x4, 0xB]
<debug> app: Shutting down transports (found: 1)

i have no idea why its coming response like 0b.

i would appreciate any help

thnaks in advance.

  • I m using buttonless over UART.

    still i m not enter into boot mode after giving below command.

    #define BOOTLOADER_DFU_START 0xB1
    
    void boot_mode()
    {
     nrf_delay_ms(100);
                   NRF_POWER->GPREGRET = BOOTLOADER_DFU_START;
    
                  nrf_delay_ms(100);
    
                  NVIC_SystemReset(); 
    			  
    			  }

    what i did before merging part

    1) bootloader hex + Bl settings merged output1.hex.

    nrfutil settings generate --family NRF52840 --application ble_app_rscs_c_pca10056_s140.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 --key-file private.key bl_settings.hex

    2) application hex + softdevice  hex merged output2.hex

    3. output1.hex and output2.hex merged together with final output file

    mergehex --merge output1.hex output2.hex  --output final_out.hex

    after flashing the final out hex to my board running in application at first then 

    when changing to bootloader using buttonlesss with above inserted code .its entering but not properly timeout and also when sending  a new firmware through serial not updating with the new firmware.

    application memory 

    FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x100000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x40000

    FLASH_START=0x26000

    FLASH_SIZE=0xda000

    RAM_START=0x20001cd0

    RAM_SIZE=0x3e330

    uart bootloader memory 

    FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x100000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x40000

    FLASH_START=0xe4000

    FLASH_SIZE=0x1a000

    RAM_START=0x20000008

    RAM_SIZE=0x3fff8

    here is my memory location

    kindly help me out. i have been hold on here for past 3 days.

  • Looks like you are using the same code as here: https://devzone.nordicsemi.com/f/nordic-q-a/64170/ota-over-serial-merging-with-application. Is the Softdevice enabled when you call boot_mode() in your app?

  • Very first time i flashed secure uart dfu through jlink.

    D:\NRF_SDk_latest\nRF5_SDK_15.2\nRF5_SDK_15.2\examples\dfu\secure_bootloader\pca10056_uart_debug\ses

    In loader i changed to ../../../../../components/softdevice/s140/hex/s140_nrf52_6.1.0_softdevice.hex

    After i send only application file from my master to NRF. It worked.

    what did i wrong in that sending application file?

  • Does the bootloader start out in DFU mode the first time you program it with the Jlink? It sounds like maybe the buttonless mechanism is not working as intended. I.e., not putting the device into Bootloader DFU mode.

  • yes, first time it entered into bootloader.

    how do i check whether its enter into bootloader or not?

    i put some log on bootloader code. But that also not printed in the second time while giving command .

Related