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

Invalid Object error with OTA DFU using both example and self generated packages.

I inherited an active project with regrettably little support from the previous developer.

I have been trying to download a copy of the application firmware that I generated to get to a basic starting point.  I have followed the many slightly varying nrfutil commands to generate a DFU package.  I do not have access to the private key used to originally setup the device, so I have generated my own new priv.pem file and placed the resulting DFU_Pulic_key.c file into the proper project folder. 

I consistently get the error "Invalid object" when trying to download.  Using nrfutil pkg display, I can see that I have the same version numbers and same file size as the original source DFU package from the previous developer that I am trying to replicate.   I have even tried using nrfutil with the option --debug-mode to see if that would work: it doesn't.

So, I next tried to use example DFU packages from Nordic.  Specifically an unmodified version of DFU_TEST_APP_HRM_S132.zip  This too returns the error "Invalid Object".

Next I tried to download the bootlloader and softdevice from the same example folder: DFU_TEST_BOOTLOADER_S132.zip and DFU_TEST_SOFTDEVICE_BOOTLOADER_S132.zip These return a slightly different error - "DFU FILE ERROR"

So what is going on that even straight up Nordic examples are failing?

Note that when I try to download the original DFU package from the previous developer, that still works so the hardware and OTA DFU is still functional.

I am using Keil MDK-ARM v5.27.1.0 to compile; nrfutil v5.2.0; and Android nRF Toolbox v2.7.2

Parents
  • Hi,

    I suspect that it fails during the pre-validation of the init command (invalid signature, version number, etc). Please try to place breakpoints in dfu_req_handling.c:dfu_handle_prevalidate() to see if any of the parameters checks are failing. Also, do you know which SDK version this is based on? Recent versions provide more verbose error messages. E.g., wrong version number, etc. 

    I have even tried using nrfutil with the option --debug-mode to see if that would work: it doesn't.

    The bootloader must be built with the NRF_DFU_DEBUG_VERSION flag to accept "debug mode" packages. It will be rejected otherwise.

    So, I next tried to use example DFU packages from Nordic.  Specifically an unmodified version of DFU_TEST_APP_HRM_S132.zip  This too returns the error "Invalid Object".

    You need to use the \bootloader_secure_ble\pca10040_debug project with the original public key if you want to try the test packages as these are signed with our private key.

Reply
  • Hi,

    I suspect that it fails during the pre-validation of the init command (invalid signature, version number, etc). Please try to place breakpoints in dfu_req_handling.c:dfu_handle_prevalidate() to see if any of the parameters checks are failing. Also, do you know which SDK version this is based on? Recent versions provide more verbose error messages. E.g., wrong version number, etc. 

    I have even tried using nrfutil with the option --debug-mode to see if that would work: it doesn't.

    The bootloader must be built with the NRF_DFU_DEBUG_VERSION flag to accept "debug mode" packages. It will be rejected otherwise.

    So, I next tried to use example DFU packages from Nordic.  Specifically an unmodified version of DFU_TEST_APP_HRM_S132.zip  This too returns the error "Invalid Object".

    You need to use the \bootloader_secure_ble\pca10040_debug project with the original public key if you want to try the test packages as these are signed with our private key.

Children
Related