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

There is a question in Test Setp about the buttonless DFU sample using the nRF52832 DK board. (SDK is using 12.3.)

Hi
I am currently testing Buttonless DFU using SDK 12.3, nRF52832 DK.
Example test was conducted first using the DK board, but as you can see in the picture, it will fail. I don't know why.
Is the method wrong?

 

Parents
  • Hi Aser, 

    I assume that you didn't see the device advertised as "DFU Targ" after you set it to bootloader mode? What was the behavior after the write ? 


    I suspect that the application has crashed, you may want to check if it enters any assert handler or if it resets. 

    Have you flashed the bootloader ? Do you have any issue if you test the bootloader (without the buttonless application)?

  • I realized that I was doing something wrong after all my attempts.
    First, mark the "↓x3" button and press the "↑" button.
    I realized that I had to choose Request instead of Command in a pop-up window.
    But even though I have tried to switch to boot mode countless times through this method, I still use Nordic Buttonless to do it.
    :(What should I do?

  • Hi Aser, 

    If you instead click on the DFU button can you do a DFU update  ? The app should detect that it's a buttonless application and perform the DFU buttonless automatically. 

    The buttonless application is quite simple. It waits for a write request to write to a flag in flash and then reset to the bootloader. 

    You can debug the buttonless application quite easily. You can check if enter_bootloader() is called inside on_ctrlpt_write() when there is a BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST.

    Please be aware that SDK v12.3 is pretty old. We changed the way we enter DFU bootloader (using GPREGRET instead of flash ) from SDK v13. The current SDK is v15.3

  • Hello Bui. Good morning.
    I've done a lot of DFU with the DFU Button you mentioned, but it's repeatedly output the same log as an infinite loop.
    I don't know why.
    When this is resolved, the phone sends a signal to the boot mode and it will be able to apply it to the My Project.
    Thank you.

  • This file is a log of an issue where only the same log I talked about repeatedly is taken and DFU is not going on. This log is from Nordic's nRF Connect app.
    Would you please take a look?

    nRF Connect, 2019-08-28
    Nordic_Buttonless (FE:75:B9:3E:5E:1C)
    V	11:36:52.277	Connecting to FE:75:B9:3E:5E:1C...
    D	11:36:52.277	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE)
    D	11:36:52.659	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	11:36:52.659	Connected to FE:75:B9:3E:5E:1C
    D	11:36:52.673	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V	11:36:52.682	Discovering services...
    D	11:36:52.682	gatt.discoverServices()
    D	11:36:53.255	[Callback] Services discovered with status: 0
    I	11:36:53.255	Services discovered
    V	11:36:53.276	Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    - Central Address Resolution [R] (0x2AA6)
    Generic Attribute (0x1801)
    Experimental Buttonless DFU Service (8e400001-f315-4f60-9fb8-838830daea50)
    - Experimental Buttonless DFU [N W] (8e400001-f315-4f60-9fb8-838830daea50)
     Client Characteristic Configuration (0x2902)
    V	11:36:59.589	Enabling notifications for 8e400001-f315-4f60-9fb8-838830daea50
    D	11:36:59.589	gatt.setCharacteristicNotification(8e400001-f315-4f60-9fb8-838830daea50, true)
    D	11:36:59.591	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0100)
    I	11:36:59.936	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
    A	11:36:59.936	"Notifications enabled" sent
    V	11:36:59.947	Notifications enabled for 8e400001-f315-4f60-9fb8-838830daea50
    V	11:37:02.588	Writing request to characteristic 8e400001-f315-4f60-9fb8-838830daea50
    D	11:37:02.588	gatt.writeCharacteristic(8e400001-f315-4f60-9fb8-838830daea50, value=0x01)
    I	11:37:02.932	Notification received from 8e400001-f315-4f60-9fb8-838830daea50, value: (0x) 20-01-01
    A	11:37:02.932	"Response for: Enter bootloader
    Status: Success" received
    I	11:37:02.933	Data written to 8e400001-f315-4f60-9fb8-838830daea50, value: (0x) 20-01-01
    A	11:37:02.933	"Response for: Enter bootloader
    Status: Success" sent
    D	11:37:04.079	[Callback] Connection state changed with status: 19 and new state: DISCONNECTED (0)
    W	11:37:04.079	Connection terminated by peer (status 19)
    I	11:37:04.079	Disconnected
    D	11:37:04.088	gatt.refresh() (hidden)
    D	11:37:04.137	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D	11:37:17.066	gatt.close()
    D	11:37:17.068	wait(200)
    V	11:37:17.273	Connecting to FE:75:B9:3E:5E:1C...
    D	11:37:17.274	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE)
    D	11:37:19.117	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	11:37:19.117	Connected to FE:75:B9:3E:5E:1C
    D	11:37:19.139	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V	11:37:19.151	Discovering services...
    D	11:37:19.151	gatt.discoverServices()
    D	11:37:19.863	[Callback] Services discovered with status: 0
    I	11:37:19.863	Services discovered
    V	11:37:19.874	Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    - Central Address Resolution [R] (0x2AA6)
    Generic Attribute (0x1801)
    Experimental Buttonless DFU Service (8e400001-f315-4f60-9fb8-838830daea50)
    - Experimental Buttonless DFU [N W] (8e400001-f315-4f60-9fb8-838830daea50)
     Client Characteristic Configuration (0x2902)
    ------------------------------------------------
    V	11:37:27.302	[DFU] DFU service started
    V	11:37:27.302	[DFU] Opening file...
    I	11:37:27.328	[DFU] Firmware file opened successfully
    V	11:37:27.329	[DFU] Connecting to DFU target...
    D	11:37:27.330	[DFU] gatt = device.connectGatt(autoConnect = false)
    I	11:37:27.333	[DFU] Connected to FE:75:B9:3E:5E:1C
    V	11:37:27.334	[DFU] Discovering services...
    D	11:37:27.334	[DFU] gatt.discoverServices()
    I	11:37:27.336	[DFU] Services discovered
    D	11:37:27.349	[DFU] wait(1000)
    W	11:37:28.359	[DFU] Application with buttonless update found
    V	11:37:28.360	[DFU] Jumping to the DFU Bootloader...
    V	11:37:28.360	[DFU] Enabling notifications for 8e400001-f315-4f60-9fb8-838830daea50
    D	11:37:28.360	[DFU] gatt.setCharacteristicNotification(8e400001-f315-4f60-9fb8-838830daea50, true)
    D	11:37:28.360	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    I	11:37:28.695	[DFU] Data written to descr.8e400001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    V	11:37:28.696	[DFU] Notifications enabled for 8e400001-f315-4f60-9fb8-838830daea50
    A	11:37:28.696	[DFU] Notifications enabled
    D	11:37:28.696	[DFU] wait(1000)
    V	11:37:29.737	[DFU] Writing to characteristic 8e400001-f315-4f60-9fb8-838830daea50
    D	11:37:29.737	[DFU] gatt.writeCharacteristic(8e400001-f315-4f60-9fb8-838830daea50)
    I	11:37:30.158	[DFU] Notification received from 8e400001-f315-4f60-9fb8-838830daea50, value (0x): 20-01-01
    A	11:37:30.158	[DFU] Enter bootloader sent (Op Code = 1)
    A	11:37:30.158	[DFU] Response received (Op Code = 1, Status = 1)
    D	11:37:31.258	[Callback] Connection state changed with status: 19 and new state: DISCONNECTED (0)
    W	11:37:31.258	Connection terminated by peer (status 19)
    I	11:37:31.258	Disconnected
    D	11:37:31.263	gatt.refresh() (hidden)
    I	11:37:31.294	[DFU] Disconnected by the remote device
    D	11:37:31.294	[DFU] gatt.refresh() (hidden)
    D	11:37:31.294	[DFU] gatt.close()
    V	11:37:31.294	[DFU] Scanning for the DFU Bootloader...
    D	11:37:31.308	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D	11:37:31.326	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    I	11:37:31.554	[DFU] DFU Bootloader found with address FE:75:B9:3E:5E:1C
    ------------------------------------------------
    V	11:37:31.585	[DFU] DFU service started
    I	11:37:31.585	[DFU] Firmware file opened successfully
    D	11:37:31.585	[DFU] wait(1000)
    D	11:37:32.599	[DFU] wait(1000)
    V	11:37:33.597	[DFU] Connecting to DFU target...
    D	11:37:33.642	[DFU] gatt = device.connectGatt(autoConnect = false)
    I	11:37:33.933	[DFU] Connected to FE:75:B9:3E:5E:1C
    V	11:37:33.933	[DFU] Discovering services...
    D	11:37:33.933	[DFU] gatt.discoverServices()
    D	11:37:33.933	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D	11:37:33.948	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    I	11:37:34.525	[DFU] Services discovered
    D	11:37:34.555	[DFU] wait(1000)
    W	11:37:35.542	[DFU] Application with buttonless update found
    V	11:37:35.542	[DFU] Jumping to the DFU Bootloader...
    V	11:37:35.542	[DFU] Enabling notifications for 8e400001-f315-4f60-9fb8-838830daea50
    D	11:37:35.542	[DFU] gatt.setCharacteristicNotification(8e400001-f315-4f60-9fb8-838830daea50, true)
    D	11:37:35.542	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    I	11:37:35.640	[DFU] Data written to descr.8e400001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    V	11:37:35.640	[DFU] Notifications enabled for 8e400001-f315-4f60-9fb8-838830daea50
    A	11:37:35.640	[DFU] Notifications enabled
    D	11:37:35.640	[DFU] wait(1000)
    V	11:37:36.659	[DFU] Writing to characteristic 8e400001-f315-4f60-9fb8-838830daea50
    D	11:37:36.660	[DFU] gatt.writeCharacteristic(8e400001-f315-4f60-9fb8-838830daea50)
    I	11:37:36.750	[DFU] Notification received from 8e400001-f315-4f60-9fb8-838830daea50, value (0x): 20-01-01
    A	11:37:36.750	[DFU] Enter bootloader sent (Op Code = 1)
    A	11:37:36.750	[DFU] Response received (Op Code = 1, Status = 1)
    I	11:37:37.186	[DFU] Disconnected by the remote device
    D	11:37:37.186	[DFU] gatt.refresh() (hidden)
    D	11:37:37.186	[DFU] gatt.close()
    V	11:37:37.186	[DFU] Scanning for the DFU Bootloader...
    D	11:37:37.212	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D	11:37:37.235	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    I	11:37:37.482	[DFU] DFU Bootloader found with address FE:75:B9:3E:5E:1C
    ------------------------------------------------
    V	11:37:37.514	[DFU] DFU service started
    I	11:37:37.514	[DFU] Firmware file opened successfully
    D	11:37:37.514	[DFU] wait(1000)
    D	11:37:38.512	[DFU] wait(1000)
    V	11:37:39.509	[DFU] Connecting to DFU target...
    D	11:37:39.557	[DFU] gatt = device.connectGatt(autoConnect = false)
    I	11:37:44.129	[DFU] Connected to FE:75:B9:3E:5E:1C
    V	11:37:44.129	[DFU] Discovering services...
    D	11:37:44.129	[DFU] gatt.discoverServices()
    D	11:37:44.139	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D	11:37:44.154	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    I	11:37:44.900	[DFU] Services discovered
    D	11:37:44.924	[DFU] wait(1000)
    W	11:37:45.915	[DFU] Application with buttonless update found
    V	11:37:45.915	[DFU] Jumping to the DFU Bootloader...
    V	11:37:45.915	[DFU] Enabling notifications for 8e400001-f315-4f60-9fb8-838830daea50
    D	11:37:45.915	[DFU] gatt.setCharacteristicNotification(8e400001-f315-4f60-9fb8-838830daea50, true)
    D	11:37:45.915	[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
    I	11:37:46.013	[DFU] Data written to descr.8e400001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
    V	11:37:46.013	[DFU] Notifications enabled for 8e400001-f315-4f60-9fb8-838830daea50
    A	11:37:46.013	[DFU] Notifications enabled
    D	11:37:46.013	[DFU] wait(1000)
    V	11:37:47.057	[DFU] Writing to characteristic 8e400001-f315-4f60-9fb8-838830daea50
    D	11:37:47.061	[DFU] gatt.writeCharacteristic(8e400001-f315-4f60-9fb8-838830daea50)
    I	11:37:47.122	[DFU] Notification received from 8e400001-f315-4f60-9fb8-838830daea50, value (0x): 20-01-01
    A	11:37:47.122	[DFU] Enter bootloader sent (Op Code = 1)
    A	11:37:47.122	[DFU] Response received (Op Code = 1, Status = 1)
    I	11:37:47.575	[DFU] Disconnected by the remote device
    D	11:37:47.575	[DFU] gatt.refresh() (hidden)
    D	11:37:47.575	[DFU] gatt.close()
    V	11:37:47.575	[DFU] Scanning for the DFU Bootloader...
    D	11:37:47.585	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D	11:37:47.604	[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    I	11:37:47.873	[DFU] DFU Bootloader found with address FE:75:B9:3E:5E:1C
    ------------------------------------------------
    V	11:37:47.889	[DFU] DFU service started
    I	11:37:47.889	[DFU] Firmware file opened successfully
    D	11:37:47.889	[DFU] wait(1000)
    D	11:37:48.890	[DFU] wait(1000)
    V	11:37:49.906	[DFU] Connecting to DFU target...
    D	11:37:49.947	[DFU] gatt = device.connectGatt(autoConnect = false)
    

  • I just found the source of this problem through the nRF Connect utility.
    The problem was confirmed that the memory map areas overlap.
    The bootloader area overlaps with the application (buttonless) area.
    However, I do not understand that these two sources were tested using the original ones, and I do not understand that this phenomenon occurs.
    Do you have a solution that you know?

Reply
  • I just found the source of this problem through the nRF Connect utility.
    The problem was confirmed that the memory map areas overlap.
    The bootloader area overlaps with the application (buttonless) area.
    However, I do not understand that these two sources were tested using the original ones, and I do not understand that this phenomenon occurs.
    Do you have a solution that you know?

Children
  • Hi Aser, 

    RAM overlapping shouldn't be a problem. The bootloader and the application wouldn't run at the same time. I just tested here and don't see the problem that you are having. 

    Could you let me know how exactly you flashed the bootloader and the application ? with step by step. For example: 

    1. Flash softdevice using nrfjprog. (please specify what exact command you used to test)

    2. Flash bootloader

    3. .... 

    I attached here the hex files (BL,SD,APP) that I read from my board. You can use this file to test. 

    I have modified the bootloader so that it by default will jump to the application. The sequence you would need to do with nrfjprog (don't use nrfconnect) is: 

    1. nrfjprog --eraseall

    2.  nrfjprog --program .\s132_nrf52_3.0.0_softdevice.hex

    3. nrfjprog --program .\buttonless.hex --sectorerase

    4. nrfjprog --program .\nrf52832_xxaa_s132_compressed.hex --sectorerase

    Please use the exact sequence. If you flash the bootloader before the application you may risk erasing the bootloader setting. 

    buttonless.zip

Related