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

Signing update rejected

When i try to do an update with Nrfutils Under android i get a REMOTE_DFU_OPERATION_FAILED since i added signing.

I created my pem file key with nrfutil.exe keys i copied Qx and Qy in my dfu_init_template_signing.c i modified Makefile to use dfu_init_template_signing.c instead of dfu_init_template.c i signed my update with my pem file key

  • Are you able to identify where the reset, i.e. the device enters app_error_fault_handler?

  • Hi Bjørn,

    I have a problem with this example. When I try send a DFU package (ble_app_hrs_s132_with_dfu_signed.zip) from MCP 3.10.0.14 every time I catch BLE_ERROR_INVALID_CONN_HANDLE on dfu_transport_ble.c

           case BLE_DFU_BYTES_RECEIVED_SEND:
            err_code = ble_dfu_bytes_rcvd_report(p_dfu, m_num_of_firmware_bytes_rcvd);
            APP_ERROR_CHECK(err_code);
    

    It's looks like SD can't Notify application but i have no idea why. Conn_handle isn't empty.

    Name : conn_handle
    Hex:0x70d0
    

    The same problem with update from android nrf MCP.

    Chip: nrf52832-QFAAB0

    SD: s132_nrf52_2.0.0_softdevice.exe

    GCC: 4.9 2015q3

  • Hello, I try to re open this question :-)

    I just thinked, NRFSEC_SETTINGS and NRFSEC_MODULE are specifics. Is there somewhere to set them in code ?

    This is my linker configuration (in ld file)

          FLASH (rx) : ORIGIN = 0x00075800, LENGTH = 0x6000 /* 24 Ko bootloader */
    	/* modify BOOTLOADER_REGION_START in dfu_types.h to use the previous origin*/
    	
    	SOFT_DEVICE (rw) : ORIGIN = 0x00000000, LENGTH = 0x1C000
    	
       /** slot 1 */
    	SLOT_1 (rw) : ORIGIN = 0x0001C000, LENGTH = 0x2C400
    	
      /** slot 2 */
    	SLOT_2 (rw) : ORIGIN = 0x00048400, LENGTH = 0x2C400
    	
      	/** Location of application data */
    	APPLICATION_DATA (rw) : ORIGIN = 0x00074800, LENGTH = 0x1000
      
      /** Flash start address for the bootloader. This setting will also be stored in UICR to allow the
       *  MBR to init the bootloader when starting the system. This value must correspond to 
       *  BOOTLOADER_REGION_START found in dfu_types.h. The system is prevented from starting up if 
       *  those values do not match. The check is performed in main.c, see
       *  APP_ERROR_CHECK_BOOL(*((uint32_t *)NRF_UICR_BOOT_START_ADDRESS) == BOOTLOADER_REGION_START);
       */
      BOOTLOADER (rx) : ORIGIN = 0x00075800, LENGTH = 0x6000 /* 24 Ko bootloader */
    	/* modify BOOTLOADER_REGION_START in dfu_types.h to use the previous origin*/
    	
    	/** Location of mbr params page in flash. */
      MBR_PARAMS_PAGE (rw) : ORIGIN = 0x0007B800, LENGTH = 0x1000
      
      /** Location of bootloader setting in flash. */
      BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0007C800, LENGTH = 0x1000
      
      /** Update signing module */
      NRFSEC_SETTINGS (rw) : ORIGIN = 0x0007D800, LENGTH = 0x400
      NRFSEC_MODULE (rw) : ORIGIN = 0x0007DC00, LENGTH = 0x2400
    
      /** RAM Region for bootloader. This setting is suitable when used with s132. */ /* see in app_ram_base.h APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_3_MID_BW */
      RAM (rwx) :  ORIGIN = 0x20002F50, LENGTH = 0xD030
    
      /** Location of non initialized RAM. Non initialized RAM is used for exchanging bond information
       *  from application to bootloader when using buttonluss DFU OTA. 
       */
      NOINIT (rwx) :  ORIGIN = 0x2000FF80, LENGTH = 0x80
    
      /** Location in UICR where bootloader start address is stored. */
      UICR_BOOTLOADER (r) : ORIGIN = 0x10001014, LENGTH = 0x04
        
      /** Location in UICR where mbr params page address is stored. */
      UICR_MBR_PARAM_PAGE(r) : ORIGIN = 0x10001018, LENGTH = 0x04
    
  • I have already modified theses ones in dfu_types.h

    #define BOOTLOADER_REGION_START             0x00075800                  
    #define BOOTLOADER_SETTINGS_ADDRESS         0x0007C800                 
    #define BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS  0x0007B800
    
  • Did you set somewhere in code the address of nrf_sec ?

Related