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

Remote DFU: Operation Failed Error in Secure OTA

Hi,

I am trying to secure OTA in nrf51822 board.

For that trying to build bootloader file available in SDK 12.2.0 version at location nRF5_SDK_12.2.0_f012efa\examples\dfu\bootloader_secure\pca10028_debug\arm5_no_packs. But it is building perfectly and give me error of micro_ecc_lib_nrf51.lib file not found error.

i have already installed 4.9-2015-q3-update of the GCC compiler toolchain for ARM and put uECC.h file in external/micro-ecc/micro-ecc file.

  • Dear Sir,

    Please find below nRFLogger's Log:

    nRF Connect, 2017-06-02
    DfuTarg (D5:2B:A9:BA:40:D1)
    V	17:00:47.279	Connecting to D5:2B:A9:BA:40:D1...
    D	17:00:47.279	gatt = device.connectGatt(autoConnect = false)
    D	17:00:47.372	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	17:00:47.372	Connected to D5:2B:A9:BA:40:D1
    D	17:00:47.575	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V	17:00:47.645	Discovering services...
    D	17:00:47.645	gatt.discoverServices()
    D	17:00:47.666	[Callback] Services discovered with status: 0
    I	17:00:47.668	Services discovered
    V	17:00:47.703	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)
    V	17:00:59.238	[DFU] DFU service started
    V	17:00:59.238	[DFU] Opening file...
    I	17:00:59.429	[DFU] Image file opened (28744 bytes in total)
    D	17:00:59.429	[DFU] wait(1000)
    D	17:01:00.424	[DFU] wait(1000)
    V	17:01:01.469	[DFU] Connecting to DFU target...
    D	17:01:01.470	[DFU] gatt = device.connectGatt(autoConnect = false)
    I	17:01:01.470	[DFU] Connected to D5:2B:A9:BA:40:D1
    V	17:01:01.470	[DFU] Discovering services...
    D	17:01:01.470	[DFU] gatt.discoverServices()
    I	17:01:01.535	[DFU] Services discovered
    D	17:01:01.597	[DFU] wait(1000)
    V	17:01:02.565	[DFU] Enabling notifications for 8ec90001-f315-4f60-9fb8-838830daea50
    D	17:01:02.566	[DFU] gatt.setCharacteristicNotification(8ec90001-f315-4f60-9fb8-838830daea50, true)
    D	17:01:02.575	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    I	17:01:02.613	[DFU] Data written to descr.8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    V	17:01:02.613	[DFU] Notifications enabled for 8ec90001-f315-4f60-9fb8-838830daea50
    A	17:01:02.613	[DFU] Notifications enabled
    D	17:01:02.613	[DFU] wait(1000)
    V	17:01:03.624	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	17:01:03.625	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	17:01:03.685	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-01
    I	17:01:03.685	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-01-00-00-86-00-00-00-7F-2D-F2-C4
    A	17:01:03.685	[DFU] Command object info received (Max size = 256, Offset = 134, CRC = C4F22D7F)
    A	17:01:03.686	[DFU] Received CRC match Init packet
    V	17:01:03.686	[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
    D	17:01:03.686	[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
    I	17:01:03.727	[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
    I	17:01:03.727	[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-0A
    E	17:01:03.727	[DFU] Remote DFU error: REMOTE DFU OPERATION FAILED
    V	17:01:03.727	[DFU] Disconnecting...
    D	17:01:03.784	[DFU] gatt.disconnect()
    I	17:01:03.785	[DFU] Disconnected
    D	17:01:03.785	[DFU] gatt.refresh() (hidden)
    D	17:01:03.785	[DFU] gatt.close()
    D	17:01:03.789	[DFU] wait(600)
    

    Also i have no change in any IRAM setting for bootloader and example only add external flash for programming.

  • What do you mean by "add external flash for programming" ?

  • Btw, Which nRF51 variant are you testing with , it's with 32kB RAM or 16kB RAM ? Could you read the chip laser marker ? Also please edit the question and add the bootloader hex , and the .zip file you used.

  • @Nilesh: Please stop creating answer, you only use Answer when you want to answer for the question, not when you want to answer my comment. You use the comment box instead. When you want to attach a file, please edit the question.

    I tested here and with your bootloader and the app_dfu_package.zip it worked. It advertised as "nordic_template" Please make sure you use S130 v2.0.1 not S130 v2.0.0 because you used --sd-req 0x87

  • I apologize for my mistake. Please tell me how to burn you bootloader and softdevice into the board?

Related