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

ERROR: No CMD handler!

Hi,

I added DFU functionality to my Mesh-client application as shown in your DFU-example.

At startup I get this log message:

nrf_mesh_dfu.c,  904, ERROR: No CMD handler!

coming from here:

uint32_t nrf_mesh_dfu_cmd_send(bl_cmd_t* p_cmd)
{
    if (m_cmd_handler == NULL)
    {
        __LOG(LOG_SRC_DFU, LOG_LEVEL_ERROR, "ERROR: No CMD handler!\n");
        return NRF_ERROR_NOT_SUPPORTED;
    }
...
}

Can someone please tell me, what I'm doing wrong here?

(using Mesh SDK 3.1.0 and SDK 15.2)

Regards

Gerry

  • Hi Edvin

    Yes shure. Here the CMD-log I got and attached the flash dump:

    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Parsing hex file.
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Checking that the area to write is not protected.
    Programming device.
    Verifying programming.
    Verified OK.
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    Verifying programming.
    Verified OK.
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    Verifying programming.
    Verified OK.
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    Verifying programming.
    Verified OK.
    Reading flash.
    Storing data in 'my_flash_dump.txt'.
    Applying system reset.
    Run.

    Regards Gerry

    my_flash_dump.txt

  • I don't understand this. Can you try to write this in cmd:

    nrfjprog --eraseall
    nrfjprog --program mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.hex --verify
    nrfjprog --memrd 0x10001014

    What does it say?

  • This returns:

    nrfjprog --eraseall
    Erasing user available code and UICR flash areas.
    Applying system reset.

    nrfjprog --program bootloader/mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.hex --verify
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    Verifying programming.
    Verified OK.

    nrfjprog --memrd 0x10001014
    0x10001014: 000F8000

    Edit:

    When I add the memrd to the end of my script (s. above) where also the softdevice and application is programmed, I also get 0x10001014: 000F8000

  • This is the address that your project reads. NRF_UICR->NRFFW[0]:

    https://www.nordicsemi.com/DocLib/Content/Product_Spec/nRF52840/latest/uicr?92#topic

    Are you sure you are using the correct projects? And not mixing in some parts from nrf52832?

    Your application, "connectivity_client", is it based on an nRF52832 or nRF52840 project?

    BR,

    Edvin

  • I now added a log-message at program start:

    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "NRFFW[0]: %08X\n", NRF_UICR->NRFFW[0]);

    Without programming the bootloader it outputs NRFFW[0]: FFFFFFFF

    After programming everything with my script and then start the programm in Segger Studio i get:

    NRFFW[0]: 000F8000

    Seems to work like it should.

    But why do I still get the log-message:

    <t:      24749>, nrf_mesh_dfu.c,  904, ERROR: No CMD handler!

    The project is based on the light switch example of Mesh SDK 1.0.0. We never worked with nRF52832, so this should not be an issue.

    regards

    Gerry

Related