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

bootloader_secure related

 Hello,

 

I am using nrf51822 / SDK v12.3 / SD 130.

I want to change the FW of the sold product to a new FW.

The bootloader address / length of the two are the same, and the secure key (*.pem) is different.

 

I’m trying the process(FW 1 -> FW 2-> FW 3).

 - FW 1 : FW of the sold product

 - FW 2 : hw / fw / some signature information ignore in dfu_req_handling.c  and FW 3 secure key add

 - FW 3 : FW to be changed

 

DFU  to FW 2 works, but it seems to show a secure key related error in the DFU to FW 3 process.

Here, I ask if there is any way to pass without referring to the secure key information.

 

 Thnaks.

  • Hi,

    but it seems to show a secure key related error in the DFU to FW 3 process.

    What is the error? Please provide the log. 

    You should use the same pair of the key for the boolader and updated package.  

    -Amanda H.

  • Sure, I used same pair. I'll get log and provide them.

  • I'm trying to get the log, but there's a problem with the debug mode bootloader size, etc.

    If I ask the question again, it is how to move to FW3(from FW1) through DFU.

    FW1 and FW3 differ only in *.pem / dfu_public_key.c files.

    Of course *.pem / dfu_public_key.c and package(SD+appl+bootloader) are created using nrfutil.

  • Hi, 

    Do you use nRFConnect to update with DFU? If so, is it possible to provide the log of nRFConnect?

    air said:
    FW1 and FW3 differ only in *.pem / dfu_public_key.c files.

    Are you able to update FW3 without key encryption (*.pem / dfu_public_key.c)? To make sure the issue is in key encryption. 

    What is the version of nrfutil? Could you use the latest version v6.1.0? Let me know this can help or not. 

    -Amanda 

  • I tried to DFU from FW1 to new FW1 with different key.

    I changed *.pem / dfu_public_key.c in FW1 and made package(SD + appl + bootloader).

    I attach the log file.

    nRF Connect, 2021-07-07
    
    CHDL_Dfu (C9:7E:87:9F:8C:E5)
    
    V    16:39:05.045    Connecting to C9:7E:87:9F:8C:E5...
    
    D    16:39:05.045    gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    
    D    16:39:05.231    [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    
    I    16:39:05.231    Connected to C9:7E:87:9F:8C:E5
    
    D    16:39:05.237    [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    
    V    16:39:05.259    Discovering services...
    
    D    16:39:05.259    gatt.discoverServices()
    
    I    16:39:05.674    Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    
    D    16:39:05.768    [Callback] Services discovered with status: 0
    
    I    16:39:05.768    Services discovered
    
    V    16:39:05.784    Generic Access (0x1800)
    
    - Device Name [R W] (0x2A00)
    
    - Appearance [R] (0x2A01)
    
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    
    Generic Attribute (0x1801)
    
    Secure DFU Service (0xFE59)
    
    - DFU Packet [WNR] (8ec90002-f315-4f60-9fb8-838830daea50)
    
    - DFU Control Point [N W] (8ec90001-f315-4f60-9fb8-838830daea50)
    
       Client Characteristic Configuration (0x2902)
    
    I    16:39:05.850    Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    
    I    16:39:06.452    Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    
    V    16:39:29.247    Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
    
    D    16:39:29.247    gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
    
    I    16:39:29.317    Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
    
    A    16:39:29.317    "Notifications and indications disabled" received
    
    V    16:40:07.883    [DFU] DFU service started
    
    V    16:40:07.883    [DFU] Opening file...
    
    I    16:40:08.186    [DFU] Firmware file opened successfully
    
    V    16:40:08.186    [DFU] Connecting to DFU target...
    
    D    16:40:08.186    [DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
    
    I    16:40:08.188    [DFU] Connected to C9:7E:87:9F:8C:E5
    
    V    16:40:08.188    [DFU] Discovering services...
    
    D    16:40:08.188    [DFU] gatt.discoverServices()
    
    I    16:40:08.189    [DFU] Services discovered
    
    D    16:40:08.194    [DFU] wait(1000)
    
    V    16:40:09.193    [DFU] Requesting new MTU...
    
    D    16:40:09.194    [DFU] gatt.requestMtu(517)
    
    I    16:40:09.242    [DFU] MTU changed to: 23
    
    V    16:40:09.242    [DFU] Enabling notifications for 8ec90001-f315-4f60-9fb8-838830daea50
    
    D    16:40:09.243    [DFU] gatt.setCharacteristicNotification(8ec90001-f315-4f60-9fb8-838830daea50, true)
    
    D    16:40:09.245    [DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    
    I    16:40:09.302    [DFU] Data written to descr.8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    
    V    16:40:09.303    [DFU] Notifications enabled for 8ec90001-f315-4f60-9fb8-838830daea50
    
    A    16:40:09.303    [DFU] Notifications enabled
    
    D    16:40:09.304    [DFU] wait(1000)
    
    V    16:40:10.305    [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    
    D    16:40:10.305    [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    
    I    16:40:10.352    [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-01
    
    I    16:40:10.354    [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-01-00-00-8E-00-00-00-C4-A4-5F-A0
    
    A    16:40:10.356    [DFU] Command object info received (Max size = 256, Offset = 142, CRC = A05FA4C4)
    
    A    16:40:10.357    [DFU] Received CRC match Init packet
    
    V    16:40:10.357    [DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    
    D    16:40:10.357    [DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    
    I    16:40:10.411    [DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    
    I    16:40:10.412    [DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-0A
    
    E    16:40:10.414    [DFU] Remote DFU error: OPERATION FAILED
    
    V    16:40:10.414    [DFU] Disconnecting...
    
    D    16:40:10.431    [DFU] gatt.disconnect()
    
    I    16:40:10.431    [DFU] Disconnected
    
    D    16:40:10.431    [DFU] gatt.refresh() (hidden)
    
    D    16:40:10.431    [DFU] gatt.disconnect()
    
    D    16:40:10.431    [DFU] gatt.close()
    
    D    16:40:10.431    [DFU] wait(600)
    
    I    16:40:10.711    Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    
    I    16:40:10.892    Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    
    I    16:40:11.492    Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 4000ms)
    
    
    

Related