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

How to multiple times update program in secure OTA

Hi,

I had done secure OTA in my custom board using SDK12.2.0 with S130 v2.0.1 softdevice. But when i am trying to update the same for multiple times then its not happened.

Which configuration needed for multiple times update? Any example is availble in SDK12.2.0?

  • Could you start a debug session in the bootloader after you have performed the first DFU, press run without setting any breakpoints, the bootloader shoudl then start the application. Now set a breakpoint in the bootloaders main and then start a DFU and see if you hit this breakpoint.

  • No, I am not using breakpoints in anywhere my boot loader as well as application file.

  • Im not asking if you are using breakpoints, I am asking if you can start a debug session and set a breakpoint according to the instructions in my previous comment.

  • Hi,

    Please find below log of my activity in nrfLogger:

    Second time update:

    nRF Connect, 2017-07-31
    nilesh (DB:A7:5E:8D:30:74)
    V	13:32:00.386	Connecting to DB:A7:5E:8D:30:74...
    D	13:32:00.386	gatt = device.connectGatt(autoConnect = false)
    D	13:32:00.604	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	13:32:00.604	Connected to DB:A7:5E:8D:30:74
    D	13:32:00.617	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V	13:32:00.623	Discovering services...
    D	13:32:00.623	gatt.discoverServices()
    D	13:32:00.655	[Callback] Services discovered with status: 0
    I	13:32:00.657	Services discovered
    V	13:32:00.682	Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    Generic Attribute (0x1801)
    Experimental Buttonless DFU Service (8e400001-f315-4f60-9fb8-838830daea50)
    - Experimental Buttonless DFU [N] (8e400001-f315-4f60-9fb8-838830daea50)
       Client Characteristic Configuration (0x2902)
    V	13:32:10.303	[DFU] DFU service started
    V	13:32:10.304	[DFU] Opening file...
    I	13:32:10.430	[DFU] Image file opened (28736 bytes in total)
    D	13:32:10.430	[DFU] wait(1000)
    D	13:32:11.446	[DFU] wait(1000)
    V	13:32:12.479	[DFU] Connecting to DFU target...
    D	13:32:12.480	[DFU] gatt = device.connectGatt(autoConnect = false)
    I	13:32:12.480	[DFU] Connected to DB:A7:5E:8D:30:74
    V	13:32:12.480	[DFU] Discovering services...
    D	13:32:12.480	[DFU] gatt.discoverServices()
    I	13:32:12.496	[DFU] Services discovered
    D	13:32:12.545	[DFU] wait(1000)
    W	13:32:13.553	[DFU] Application with buttonless update found
    V	13:32:13.554	[DFU] Jumping to the DFU Bootloader...
    V	13:32:13.554	[DFU] Enabling notifications for 8e400001-f315-4f60-9fb8-838830daea50
    D	13:32:13.554	[DFU] gatt.setCharacteristicNotification(8e400001-f315-4f60-9fb8-838830daea50, true)
    D	13:32:13.554	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    I	13:32:13.899	[DFU] Data written to descr.8e400001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    V	13:32:13.899	[DFU] Notifications enabled for 8e400001-f315-4f60-9fb8-838830daea50
    A	13:32:13.899	[DFU] Notifications enabled
    D	13:32:13.899	[DFU] wait(1000)
    V	13:32:14.968	[DFU] Writing to characteristic 8e400001-f315-4f60-9fb8-838830daea50
    D	13:32:14.969	[DFU] gatt.writeCharacteristic(8e400001-f315-4f60-9fb8-838830daea50)
    V	13:32:40.973	Disconnecting...
    D	13:32:40.973	gatt.disconnect()
    D	13:32:40.976	[Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
    I	13:32:40.976	Disconnected
    D	13:32:40.979	gatt.refresh() (hidden)
    D	13:32:40.980	gatt.close()
    D	13:32:40.982	wait(200)
    

    Please share your suggestion.

Related