Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

GATT Error issue(Error 133) when DFU Firmware updating through nRFConnect application

Hi,

followed below link to do the firmware updating using DFU service with "nRF Connec"t application on Android mobile.

https://novelbits.io/nrf52-ota-dfu-ble-part-4/

While updating the Zip file I am getting Error 133 (0x85):GATT Error, please check the below log and video for more information 

nRF Connect, 2022-12-01
NordicUART (D2:EB:38:F0:47:E8)
V 12:01:54.568 Connecting to D2:EB:38:F0:47:E8...
D 12:01:54.568 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 12:01:54.683 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 12:01:54.683 Connected to D2:EB:38:F0:47:E8
V 12:01:54.685 Discovering services...
D 12:01:54.685 gatt.discoverServices()
D 12:01:54.695 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 12:01:55.318 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 12:01:55.671 [Callback] Services discovered with status: 0
I 12:01:55.671 Services discovered
V 12:01:55.675 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)
- Service Changed [I] (0x2A05)
   Client Characteristic Configuration (0x2902)
Unknown Service (6e40bbaa-b5a3-f393-e0a9-e50e24dcca9e)
- Unknown Characteristic [W WNR] (6e400004-b5a3-f393-e0a9-e50e24dcca9e)
- Unknown Characteristic [N] (6e400005-b5a3-f393-e0a9-e50e24dcca9e)
   Client Characteristic Configuration (0x2902)
Secure DFU Service (0xFE59)
- Buttonless DFU [I W] (8ec90003-f315-4f60-9fb8-838830daea50)
   Client Characteristic Configuration (0x2902)
D 12:01:55.675 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
D 12:01:55.678 gatt.setCharacteristicNotification(6e400005-b5a3-f393-e0a9-e50e24dcca9e, true)
I 12:01:55.759 Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
V 12:01:58.332 Enabling indications for 8ec90003-f315-4f60-9fb8-838830daea50
D 12:01:58.332 gatt.setCharacteristicNotification(8ec90003-f315-4f60-9fb8-838830daea50, true)
D 12:01:58.334 gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0200)
I 12:01:58.414 Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 02-00
A 12:01:58.414 "Indications enabled" sent
V 12:01:58.416 Indications enabled for 8ec90003-f315-4f60-9fb8-838830daea50
V 12:02:04.264 [DFU] DFU service started
V 12:02:04.264 [DFU] Opening file...
I 12:02:04.292 [DFU] Firmware file opened successfully
V 12:02:04.292 [DFU] Connecting to DFU target...
D 12:02:04.292 [DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
I 12:02:04.301 [DFU] Connected to D2:EB:38:F0:47:E8
V 12:02:04.301 [DFU] Discovering services...
D 12:02:04.301 [DFU] gatt.discoverServices()
I 12:02:04.301 [DFU] Services discovered
D 12:02:04.314 [DFU] wait(1000)
W 12:02:05.306 [DFU] Application with buttonless update found
V 12:02:05.306 [DFU] Jumping to the DFU Bootloader...
V 12:02:05.306 [DFU] Enabling indications for 8ec90003-f315-4f60-9fb8-838830daea50
D 12:02:05.306 [DFU] gatt.setCharacteristicNotification(8ec90003-f315-4f60-9fb8-838830daea50, true)
D 12:02:05.308 [DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x02-00)
I 12:02:05.479 [DFU] Data written to descr.8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 02-00
V 12:02:05.479 [DFU] Notifications enabled for 8ec90003-f315-4f60-9fb8-838830daea50
A 12:02:05.479 [DFU] Indications enabled
D 12:02:05.480 [DFU] wait(1000)
V 12:02:06.495 [DFU] Writing to characteristic 8ec90003-f315-4f60-9fb8-838830daea50
D 12:02:06.496 [DFU] gatt.writeCharacteristic(8ec90003-f315-4f60-9fb8-838830daea50)
I 12:02:06.560 Indication received from 8ec90003-f315-4f60-9fb8-838830daea50, value: (0x) 20-01-01
A 12:02:06.560 "Response for: Enter bootloader
Status: Success" received
A 12:02:06.560 [DFU] Enter bootloader sent (Op Code = 1)
I 12:02:06.560 [DFU] Notification received from 8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 20-01-01
A 12:02:06.560 [DFU] Response received (Op Code = 1, Status = 1)
D 12:02:06.560 [DFU] gatt.refresh() (hidden)
D 12:02:06.565 [DFU] gatt.disconnect()
D 12:02:06.565 [DFU] gatt.close()
V 12:02:06.568 [DFU] Scanning for the DFU Bootloader... (timeout 5000 ms)
I 12:02:06.635 [DFU] DFU Bootloader found with address D2:EB:38:F0:47:E8
V 12:02:06.644 [DFU] DFU service started
I 12:02:06.644 [DFU] Firmware file opened successfully
D 12:02:06.644 [DFU] wait(1000)
I 12:02:07.017 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 12:02:07.647 [DFU] wait(1000)
V 12:02:08.647 [DFU] Connecting to DFU target...
D 12:02:08.647 [DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
I 12:02:08.664 [DFU] Connected to D2:EB:38:F0:47:E8
V 12:02:08.664 [DFU] Discovering services...
D 12:02:08.664 [DFU] gatt.discoverServices()
D 12:02:12.030 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 12:02:12.030 Disconnected
E 12:02:12.060 [DFU] Disconnected
D 12:02:12.060 [DFU] gatt.refresh() (hidden)
D 12:02:12.060 [DFU] gatt.disconnect()
D 12:02:12.060 [DFU] gatt.close()
D 12:02:12.060 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 12:02:12.066 [DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 12:02:12.066 [DFU] wait(600)
D 12:02:12.666 gatt.close()
D 12:02:12.668 wait(200)
V 12:02:12.868 Connecting to D2:EB:38:F0:47:E8...
D 12:02:12.868 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 12:02:42.884 [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
E 12:02:42.885 Error 133 (0x85): GATT ERROR
I 12:02:42.885 Disconnected

We are using

nrf5 SDK v17.1.0  

S140 softdevice

nRF conncet on Google pixel6 phone with Android 12  

What could  be the cause for it and how to over come 

Regards,

Sudheer

  • A sudheer Kumar said:
    If we keep optimization as "None", can we see more log?

    No, but when optimization is enabled, it may swap around some of the order of operations that are not affecting the outcome of the application. The application is more optimized, but it may be confusing while debugging. The reason you didn't see the logs was probably that the softdevice wasn't able to boot up, because it was waiting for the LFCLK to start, but since the XTAL was not present, it never started.

    BR,
    Edvin

  • Hi Edvin,

    The reason you didn't see the logs was probably that the softdevice wasn't able to boot up, because it was waiting for the LFCLK to start, but since the XTAL was not present, it never started.

    If softdevice is waiting for the LFCLK, then how it started when we flashed merged(merged boot loader, softdevice and application) hex file with custom board(because it was waiting for the LFCLK to start, but since the XTAL was not present, it never started.)

    Regards,

    Sudheer

  • If you program the application and the settings, the bootloader will see that the application is valid, and it doesn't try to start up the softdevice. It skips that part and goes straight to the application. 

    I still believe that the reason you weren't able to set a breakpoint because of optimization and that things happen in a bit different order when this is enabled.

    I will leave for holidays now. I will be back some time in January. Please expect delayed replies. I am sorry for the inconvenience.

    BR,

    Edvin

  • If you program the application and the settings, the bootloader will see that the application is valid, and it doesn't try to start up the softdevice. It skips that part and goes straight to the application. 

    Okay, Is it.

    BR,

    Sudheer

Related