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

DFU over NRF util error NRF_ERROR_SD_RPC_SEND

Hello!

I'm trying to DFU an NRF52 device on a custom board using nrfutil

I'm able to DFU the device using the NRF Connect v3.3.0 software together with an nrf52840 dongle.

But when I try to do same thing using the nrfutil I got this message:

$ nrfutil dfu ble -ic NRF52 -pkg app_dfu_package.zip -p COM24 -a "ADDR"

....

File "c:\users\jose.cazarin\appdata\local\programs\python\python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 103, in wrapper
raise NordicSemiException(
pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_cfg_set. Error code: NRF_ERROR_SD_RPC_SEND

And I get the same error even if the device is not in DFU mode. Probably is this an error that occurs even before the dongle starts searching for the DFU device?

If I add the -f option to the command line, I got the following error:

$ nrfutil dfu ble -ic NRF52 -pkg app_dfu_package.zip -p COM24 -a "ADDR"

...

File "c:\users\jose.cazarin\appdata\local\programs\python\python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 2733, in __init__
raise NordicSemiException("Board not found: {}".format(serial_port or snr))
pc_ble_driver_py.exceptions.NordicSemiException: Board not found: COM24

But I'm pretty sure the COM24 is the correct port because I'm using it to dfu the device through the NRF Connect software.

I'm using Windows 10, python 3.8 and nrfutil 6.0.1

Thanks in advance!

  • Thanks! One question about this:

    If the burnt in address is : "AA:BB:CC:DD:00: FF"

    Will it roll over to: "AA:BB:CC:DD:01:00" or will it just reset the last byte becoming: "AA:BB:CC:DD:00:00"?


  • Only the last byte, so it will be:

    "AA:BB:CC:DD:00:00"

    You can see in the function gap_address_change() in the bootloader project:

    #if (!NRF_DFU_BLE_REQUIRES_BONDS)
    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;
    }
    #endif

    That it only changes the last byte. Also note that it doesn't change the address if the bootloader requires bonding. In that case, it will use a different method of notifying the connected device that it has a new set of services.

    Best regards,

    Edvin

  • Hello Edvin! I got back to this task after a while
    So, now I've updated my nrfutils version to 6.1.0 and still using python 3.8
    And I cannot update a device in the way I already described in this post anymore
    Now both in nrfutil and in NRF Connect (version 3.5.0 ) I'm getting an error related to a timeout when trying to set the PRN.
    This is the message from nrfutil:

    File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\nrfutil-6.1.0-py3.8.egg\nordicsemi\dfu\dfu_transport_ble.py", line 663, in __get_response
    raise NordicSemiException('Timeout: operation - {}'.format(get_dict_key(DfuTransportBle.OP_CODE,
    pc_ble_driver_py.exceptions.NordicSemiException: Timeout: operation - SetPRN

    And this is the message from NRF Connect:



    Can you help with this problem? Do I need to flash a specific version of the nrf connectivity that's different from the one that the NRF Connect is currently flashing?
    Before I tried to do the update I flashed the dongle as requested by NRF Connect when I was trying to DFU a node using the interface of NRF Connect

    Thank you so much!

Related