InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.71k stars 926 forks source link

1.9.0 update from 1.8.0 gets stuck (Connection failed (0x85): GATT ERROR) #1066

Closed lytex closed 2 years ago

lytex commented 2 years ago

Verification

What happened?

The upgrade from 1.8.0 to 1.9.0

What should happen instead?

The device should upgrade to 1.9.0

Reproduction steps

Upgrade from 1.8.0 to 1.9.0, either using the .zip or the .bin app image using nRF Connect. The update always gets stuck at 13%.

More details?

nRF Connect, 2022-04-03
InfiniTime (ED:4D:29:44:14:32)
V 00:22:13.389 Connecting to ED:4D:29:44:14:32...
D 00:22:13.389 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 00:22:13.740 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 00:22:13.753 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 00:22:13.753 Connected to ED:4D:29:44:14:32
V 00:22:13.762 Discovering services...
D 00:22:13.762 gatt.discoverServices()
I 00:22:14.069 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 00:22:15.333 [Callback] Services discovered with status: 0
I 00:22:15.334 Services discovered
V 00:22:15.365 Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
Generic Attribute (0x1801)
- Service Changed [I] (0x2A05)
   Client Characteristic Configuration (0x2902)
Device Information (0x180A)
- Manufacturer Name String [R] (0x2A29)
- Model Number String [R] (0x2A24)
- Serial Number String [R] (0x2A25)
- Firmware Revision String [R] (0x2A26)
- Hardware Revision String [R] (0x2A27)
- Software Revision String [R] (0x2A28)
Current Time Service (0x1805)
- Current Time [R W] (0x2A2B)
Unknown Service (00000000-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [N] (00000001-78fc-48fe-8e23-433b3a1942d0)
   Client Characteristic Configuration (0x2902)
- Unknown Characteristic [R W] (00000002-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000004-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000003-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000005-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000006-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000007-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000007-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000008-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000009-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (0000000a-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (0000000b-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (0000000c-78fc-48fe-8e23-433b3a1942d0)
Unknown Service (00040000-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [W] (00040001-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00040002-78fc-48fe-8e23-433b3a1942d0)
Unknown Service (00010000-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00010001-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00010002-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00010003-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00010004-78fc-48fe-8e23-433b3a1942d0)
Alert Notification Service (0x1811)
- New Alert [W] (0x2A46)
- Unknown Characteristic [N] (00020001-78fc-48fe-8e23-433b3a1942d0)
   Client Characteristic Configuration (0x2902)
Device Firmware Update Service (00001530-1212-efde-1523-785feabcd123)
- DFU Packet [WNR] (00001532-1212-efde-1523-785feabcd123)
- DFU Control Point [N W] (00001531-1212-efde-1523-785feabcd123)
   Client Characteristic Configuration (0x2902)
- DFU Version [R] (00001534-1212-efde-1523-785feabcd123)
Battery Service (0x180F)
- Battery Level [N R] (0x2A19)
   Client Characteristic Configuration (0x2902)
Immediate Alert (0x1802)
- Alert Level [WNR] (0x2A06)
Heart Rate (0x180D)
- Heart Rate Measurement [N R] (0x2A37)
   Client Characteristic Configuration (0x2902)
Unknown Service (00030000-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [N R] (00030001-78fc-48fe-8e23-433b3a1942d0)
   Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R] (00030002-78fc-48fe-8e23-433b3a1942d0)
   Client Characteristic Configuration (0x2902)
Unknown Service (0000febb-0000-1000-8000-00805f9b34fb)
- Unknown Characteristic [R] (adaf0100-4669-6c65-5472-616e73666572)
- Unknown Characteristic [N R W] (adaf0200-4669-6c65-5472-616e73666572)
   Client Characteristic Configuration (0x2902)
D 00:22:15.366 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
D 00:22:15.367 gatt.setCharacteristicNotification(00000001-78fc-48fe-8e23-433b3a1942d0, true)
D 00:22:15.368 gatt.setCharacteristicNotification(00020001-78fc-48fe-8e23-433b3a1942d0, true)
D 00:22:15.369 gatt.setCharacteristicNotification(00002a19-0000-1000-8000-00805f9b34fb, true)
D 00:22:15.369 gatt.setCharacteristicNotification(00002a37-0000-1000-8000-00805f9b34fb, true)
D 00:22:15.370 gatt.setCharacteristicNotification(00030001-78fc-48fe-8e23-433b3a1942d0, true)
D 00:22:15.370 gatt.setCharacteristicNotification(00030002-78fc-48fe-8e23-433b3a1942d0, true)
D 00:22:15.371 gatt.setCharacteristicNotification(adaf0200-4669-6c65-5472-616e73666572, true)
I 00:22:15.418 Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
V 00:22:23.805 [DFU] DFU service started
V 00:22:23.805 [DFU] Opening file...
I 00:22:23.849 [DFU] Firmware file opened successfully
V 00:22:23.849 [DFU] Connecting to DFU target...
D 00:22:23.849 [DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
I 00:22:23.894 [DFU] Connected to ED:4D:29:44:14:32
V 00:22:23.896 [DFU] Discovering services...
D 00:22:23.896 [DFU] gatt.discoverServices()
I 00:22:23.925 [DFU] Services discovered
D 00:22:23.942 [DFU] wait(1000)
V 00:22:24.942 [DFU] Reading DFU version number...
D 00:22:24.942 [DFU] gatt.readCharacteristic(00001534-1212-efde-1523-785feabcd123)
I 00:22:25.094 [DFU] Read Response received from 00001534-1212-efde-1523-785feabcd123, value (0x): 51-00
A 00:22:25.094 [DFU] Version number read: 0.1
V 00:22:25.095 [DFU] Requesting new MTU...
D 00:22:25.095 [DFU] gatt.requestMtu(517)
I 00:22:25.184 [DFU] MTU changed to: 256
D 00:22:25.185 [DFU] wait(1000)
V 00:22:26.186 [DFU] Enabling notifications for 00001531-1212-efde-1523-785feabcd123
D 00:22:26.186 [DFU] gatt.setCharacteristicNotification(00001531-1212-efde-1523-785feabcd123, true)
D 00:22:26.187 [DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
I 00:22:26.265 [DFU] Data written to descr.00001531-1212-efde-1523-785feabcd123, value (0x): 01-00
V 00:22:26.265 [DFU] Notifications enabled for 00001531-1212-efde-1523-785feabcd123
A 00:22:26.265 [DFU] Notifications enabled
D 00:22:26.265 [DFU] wait(1000)
V 00:22:27.266 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123
D 00:22:27.267 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123)
I 00:22:27.344 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 01-04
A 00:22:27.345 [DFU] DFU Start sent (Op Code = 1, Upload Mode = 4)
V 00:22:27.348 [DFU] Writing to characteristic 00001532-1212-efde-1523-785feabcd123
D 00:22:27.348 [DFU] gatt.writeCharacteristic(00001532-1212-efde-1523-785feabcd123)
I 00:22:27.354 [DFU] Data written to 00001532-1212-efde-1523-785feabcd123, value (0x): 00-00-00-00-00-00-00-00-18-2A-06-00
A 00:22:27.354 [DFU] Firmware image size sent (0b, 0b, 403992b)
I 00:22:34.546 [DFU] Notification received from 00001531-1212-efde-1523-785feabcd123, value (0x): 10-01-01
A 00:22:34.547 [DFU] Response received (Op Code = 1 Status = 1)
A 00:22:34.547 [DFU] Writing Initialize DFU Parameters...
V 00:22:34.547 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123
D 00:22:34.547 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123)
I 00:22:34.634 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 02-00
V 00:22:34.636 [DFU] Writing to characteristic 00001532-1212-efde-1523-785feabcd123
D 00:22:34.637 [DFU] gatt.writeCharacteristic(00001532-1212-efde-1523-785feabcd123)
I 00:22:34.640 [DFU] Data written to 00001532-1212-efde-1523-785feabcd123, value (0x): 52-00-FF-FF-FF-FF-FF-FF-01-00-FE-FF-43-90
V 00:22:34.640 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123
D 00:22:34.641 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123)
I 00:22:34.769 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 02-01
A 00:22:34.770 [DFU] Initialize DFU Parameters completed
I 00:22:35.714 [DFU] Notification received from 00001531-1212-efde-1523-785feabcd123, value (0x): 10-02-01
A 00:22:35.714 [DFU] Response received (Op Code = 2, Status = 1)
V 00:22:35.715 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123
D 00:22:35.715 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123)
I 00:22:35.804 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 03
A 00:22:35.804 [DFU] Receive Firmware Image request sent
A 00:22:35.841 [DFU] Uploading firmware...
V 00:22:35.841 [DFU] Sending firmware to characteristic 00001532-1212-efde-1523-785feabcd123...
D 00:22:40.885 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
E 00:22:40.887 [DFU] Device has disconnected
D 00:22:40.887 [DFU] gatt.disconnect()
E 00:22:40.888 Error 8 (0x8): GATT CONN TIMEOUT
I 00:22:40.888 Disconnected
D 00:22:40.925 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 00:22:40.940 [DFU] gatt.close()
D 00:22:40.940 [DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
V 00:22:40.980 [DFU] DFU service started
I 00:22:40.980 [DFU] Firmware file opened successfully
D 00:22:40.980 [DFU] wait(1000)
D 00:22:42.009 [DFU] wait(1000)
V 00:22:42.960 [DFU] Connecting to DFU target...
D 00:22:42.989 [DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
E 00:22:48.010 [DFU] Connection failed (0x85): GATT ERROR
W 00:22:48.010 [DFU] Retrying...
D 00:22:48.010 [DFU] gatt.refresh() (hidden)
D 00:22:48.013 [DFU] gatt.disconnect()
D 00:22:48.018 [DFU] gatt.close()
V 00:22:48.039 [DFU] DFU service started
I 00:22:48.039 [DFU] Firmware file opened successfully
D 00:22:48.039 [DFU] wait(1000)
D 00:22:49.061 [DFU] wait(1000)
V 00:22:50.040 [DFU] Connecting to DFU target...
D 00:22:50.040 [DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
D 00:22:51.507 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 00:22:51.530 [DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 00:22:51.530 [DFU] Connected to ED:4D:29:44:14:32
V 00:22:51.530 [DFU] Discovering services...
D 00:22:51.530 [DFU] gatt.discoverServices()
D 00:22:52.553 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 00:22:52.553 Connected to ED:4D:29:44:14:32
I 00:22:52.560 Notification received from 00002a19-0000-1000-8000-00805f9b34fb, value: (0x) 51, "Q"
A 00:22:52.560 "81%" received
V 00:22:52.597 Discovering services...
D 00:22:52.597 gatt.discoverServices()
I 00:22:53.078 [DFU] Services discovered
D 00:22:53.083 [Callback] Services discovered with status: 0
I 00:22:53.083 Services discovered
D 00:22:53.107 [DFU] wait(1000)
V 00:22:53.137 Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
Generic Attribute (0x1801)
- Service Changed [I] (0x2A05)
   Client Characteristic Configuration (0x2902)
Device Information (0x180A)
- Manufacturer Name String [R] (0x2A29)
- Model Number String [R] (0x2A24)
- Serial Number String [R] (0x2A25)
- Firmware Revision String [R] (0x2A26)
- Hardware Revision String [R] (0x2A27)
- Software Revision String [R] (0x2A28)
Current Time Service (0x1805)
- Current Time [R W] (0x2A2B)
Unknown Service (00000000-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [N] (00000001-78fc-48fe-8e23-433b3a1942d0)
   Client Characteristic Configuration (0x2902)
- Unknown Characteristic [R W] (00000002-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000004-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000003-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000005-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000006-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000007-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000007-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000008-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00000009-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (0000000a-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (0000000b-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (0000000c-78fc-48fe-8e23-433b3a1942d0)
Unknown Service (00040000-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [W] (00040001-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00040002-78fc-48fe-8e23-433b3a1942d0)
Unknown Service (00010000-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00010001-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00010002-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00010003-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [R W] (00010004-78fc-48fe-8e23-433b3a1942d0)
Alert Notification Service (0x1811)
- New Alert [W] (0x2A46)
- Unknown Characteristic [N] (00020001-78fc-48fe-8e23-433b3a1942d0)
   Client Characteristic Configuration (0x2902)
Device Firmware Update Service (00001530-1212-efde-1523-785feabcd123)
- DFU Packet [WNR] (00001532-1212-efde-1523-785feabcd123)
- DFU Control Point [N W] (00001531-1212-efde-1523-785feabcd123)
   Client Characteristic Configuration (0x2902)
- DFU Version [R] (00001534-1212-efde-1523-785feabcd123)
Battery Service (0x180F)
- Battery Level [N R] (0x2A19)
   Client Characteristic Configuration (0x2902)
Immediate Alert (0x1802)
- Alert Level [WNR] (0x2A06)
Heart Rate (0x180D)
- Heart Rate Measurement [N R] (0x2A37)
   Client Characteristic Configuration (0x2902)
Unknown Service (00030000-78fc-48fe-8e23-433b3a1942d0)
- Unknown Characteristic [N R] (00030001-78fc-48fe-8e23-433b3a1942d0)
   Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R] (00030002-78fc-48fe-8e23-433b3a1942d0)
   Client Characteristic Configuration (0x2902)
Unknown Service (0000febb-0000-1000-8000-00805f9b34fb)
- Unknown Characteristic [R] (adaf0100-4669-6c65-5472-616e73666572)
- Unknown Characteristic [N R W] (adaf0200-4669-6c65-5472-616e73666572)
   Client Characteristic Configuration (0x2902)
D 00:22:53.137 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
D 00:22:53.140 gatt.setCharacteristicNotification(00000001-78fc-48fe-8e23-433b3a1942d0, true)
D 00:22:53.141 gatt.setCharacteristicNotification(00020001-78fc-48fe-8e23-433b3a1942d0, true)
D 00:22:53.142 gatt.setCharacteristicNotification(00002a19-0000-1000-8000-00805f9b34fb, true)
D 00:22:53.143 gatt.setCharacteristicNotification(00002a37-0000-1000-8000-00805f9b34fb, true)
D 00:22:53.144 gatt.setCharacteristicNotification(00030001-78fc-48fe-8e23-433b3a1942d0, true)
D 00:22:53.148 gatt.setCharacteristicNotification(00030002-78fc-48fe-8e23-433b3a1942d0, true)
D 00:22:53.149 gatt.setCharacteristicNotification(adaf0200-4669-6c65-5472-616e73666572, true)
I 00:22:53.160 Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
V 00:22:54.092 [DFU] Reading DFU version number...
D 00:22:54.093 [DFU] gatt.readCharacteristic(00001534-1212-efde-1523-785feabcd123)
I 00:22:54.163 [DFU] Read Response received from 00001534-1212-efde-1523-785feabcd123, value (0x): 51-00
A 00:22:54.163 [DFU] Version number read: 0.1
V 00:22:54.164 [DFU] Requesting new MTU...
D 00:22:54.164 [DFU] gatt.requestMtu(517)
I 00:22:54.254 [DFU] MTU changed to: 256
D 00:22:54.255 [DFU] wait(1000)
V 00:22:55.256 [DFU] Enabling notifications for 00001531-1212-efde-1523-785feabcd123
D 00:22:55.256 [DFU] gatt.setCharacteristicNotification(00001531-1212-efde-1523-785feabcd123, true)
D 00:22:55.258 [DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
I 00:22:55.334 [DFU] Data written to descr.00001531-1212-efde-1523-785feabcd123, value (0x): 01-00
V 00:22:55.334 [DFU] Notifications enabled for 00001531-1212-efde-1523-785feabcd123
A 00:22:55.334 [DFU] Notifications enabled
D 00:22:55.334 [DFU] wait(1000)
V 00:22:56.340 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123
D 00:22:56.340 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123)
I 00:22:56.414 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 01-04
A 00:22:56.415 [DFU] DFU Start sent (Op Code = 1, Upload Mode = 4)
V 00:22:56.415 [DFU] Writing to characteristic 00001532-1212-efde-1523-785feabcd123
D 00:22:56.415 [DFU] gatt.writeCharacteristic(00001532-1212-efde-1523-785feabcd123)
I 00:22:56.417 [DFU] Data written to 00001532-1212-efde-1523-785feabcd123, value (0x): 00-00-00-00-00-00-00-00-18-2A-06-00
A 00:22:56.417 [DFU] Firmware image size sent (0b, 0b, 403992b)
I 00:23:03.568 [DFU] Notification received from 00001531-1212-efde-1523-785feabcd123, value (0x): 10-01-01
A 00:23:03.569 [DFU] Response received (Op Code = 1 Status = 1)
A 00:23:03.569 [DFU] Writing Initialize DFU Parameters...
V 00:23:03.569 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123
D 00:23:03.569 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123)
I 00:23:03.658 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 02-00
V 00:23:03.659 [DFU] Writing to characteristic 00001532-1212-efde-1523-785feabcd123
D 00:23:03.659 [DFU] gatt.writeCharacteristic(00001532-1212-efde-1523-785feabcd123)
I 00:23:03.662 [DFU] Data written to 00001532-1212-efde-1523-785feabcd123, value (0x): 52-00-FF-FF-FF-FF-FF-FF-01-00-FE-FF-43-90
V 00:23:03.663 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123
D 00:23:03.663 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123)
I 00:23:03.749 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 02-01
A 00:23:03.749 [DFU] Initialize DFU Parameters completed
I 00:23:04.693 [DFU] Notification received from 00001531-1212-efde-1523-785feabcd123, value (0x): 10-02-01
A 00:23:04.693 [DFU] Response received (Op Code = 2, Status = 1)
V 00:23:04.693 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123
D 00:23:04.693 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123)
I 00:23:04.783 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 03
A 00:23:04.783 [DFU] Receive Firmware Image request sent
A 00:23:04.803 [DFU] Uploading firmware...
V 00:23:04.803 [DFU] Sending firmware to characteristic 00001532-1212-efde-1523-785feabcd123...
D 00:23:09.896 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
E 00:23:09.896 Error 8 (0x8): GATT CONN TIMEOUT
I 00:23:09.896 Disconnected
E 00:23:09.937 [DFU] Device has disconnected
D 00:23:09.938 [DFU] gatt.disconnect()
D 00:23:09.950 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 00:23:09.967 [DFU] gatt.close()
D 00:23:09.967 [DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
V 00:23:10.013 [DFU] DFU service started
I 00:23:10.013 [DFU] Firmware file opened successfully
D 00:23:10.013 [DFU] wait(1000)
D 00:23:11.001 [DFU] wait(1000)
V 00:23:11.990 [DFU] Connecting to DFU target...
D 00:23:12.020 [DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
E 00:23:17.040 [DFU] Connection failed (0x85): GATT ERROR
W 00:23:17.040 [DFU] Retrying...
D 00:23:17.040 [DFU] gatt.refresh() (hidden)
D 00:23:17.040 [DFU] gatt.disconnect()
D 00:23:17.043 [DFU] gatt.close()
V 00:23:17.062 [DFU] DFU service started
I 00:23:17.062 [DFU] Firmware file opened successfully
D 00:23:17.062 [DFU] wait(1000)

Version

1.8.0

Companion app

NRF Connect

Joshndroid commented 2 years ago

Mine doesn't even get that far. I am also on 1.8.0 I tried with gadgetbridge with the .bin and it says "Element cannot be installed"

I downloaded and installed NRF Connect and tried with the .zip Mine gets to 0%, reboots (3 times total) with it getting to 0% and fails out.

Getting exactly this in the NRF Connect app logs D 00:23:09.896 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0) E 00:23:09.896 Error 8 (0x8): GATT CONN TIMEOUT I 00:23:09.896 Disconnected E 00:23:09.937 [DFU] Device has disconnected

Avamander commented 2 years ago

Have you tried something besides NRF Connect?

yuval-herman commented 2 years ago

I tried the dfu zip and gadgetbridge twice and everything worked fine

sssmack commented 2 years ago

Siglo did not work for me (using that from the pinephone - non Pro) Siglo reported "The firmware update has failed. Retrying the update will fix it in most cases". I re-tried about 20 times with no change in response from Siglo. No whining from me here. :) The purpose of my post is to provide more info. to you - whom I greatly appreciate your time and effort on the software. I have been letting my regular job and family take my time.

Avamander commented 2 years ago

Maybe it's worth changing the ambient radio environment, might be noise that causes the uploads to fail.

Rebooting all components in the setup as well, but you've probably done that.

Joshndroid commented 2 years ago

Maybe it's worth changing the ambient radio environment, might be noise that causes the uploads to fail.

Rebooting all components in the setup as well, but you've probably done that.

Moved to another part of the house sadly the same result... Also have been rebooting like a mad man as well as repairing device multiple times. Can't even flash the same firmware thats on it, let alone anything else.

sssmack commented 2 years ago

I changed the ambient radio environment and rebooted both devices .
After doing that, the download and install worked the 1st time and as well as all of the previous downloads and installs. Thank you!

yuval-herman commented 2 years ago

Have any of you had similar issues before 1.8?

Joshndroid commented 2 years ago

After 6 attempts using my PinePhonePro and Siglo on Manjaro ARM i was able to get it flashed. Never had an issue with my android phone in the past. Kinda weird but yeah

yuval-herman commented 2 years ago

I think this might have to do with previously configured secure pairing in ble

yuval-herman commented 2 years ago

did any of you configured secure pairing?

Joshndroid commented 2 years ago

Is that the "companion device pairing' in gadget bridge? I had tried that both off and on if so

yuval-herman commented 2 years ago

I have a suspicion it might have to do with this I will check on my PC soon

yuval-herman commented 2 years ago

I'm seeing a lot of strange changes in NimbleController namely in line 189 and the gav event switch but also in general, see full diff.

I can't investigate further at the moment...

Strit commented 2 years ago

I have this issue (restarting at 0% transfer) coming from version 1.7.1 too. Tried both GadgetBridge and nRF Connect on Android.

marcdw1289 commented 2 years ago

Failing miserably here with Gadgetbridge. Mostly fails at about 5%, few times into the 30s, only once up to 75%. Frustrating. Looking forward to seeing that terminal watchface. 😁

EDIT: Finally got it installed. After numerous attempts with Gadgetbridge and nRF Connect I went to another phone. Still no-go with nRF so I installed Gadgetbridge and it fully uploaded on first try.

Initial tries was on a Moto G5 Plus with LineageOS 14.1 (recent unofficial build). Final attempts on OnePlus 8T, CarbonROM, Android 11.

lytex commented 2 years ago

I got mine working installing with gadgetbridge from the .bin. I initially moved from it to nRF Connect because it was gadgetbridge which got stuck.

guek commented 2 years ago

No succes with nRF Conn. (0% - reboot, x3, see https://github.com/InfiniTimeOrg/InfiniTime/issues/1066#issuecomment-1086740627)

Success by first attempt with Gadgetbridge and dfu-zip. I could provide some log from nRF. I suspect something changed with their new version.

HTH

StarGate01 commented 2 years ago

My update experience is hit and miss as well, updates via NRF connect on Android stopped working some time ago, but that might be due to an update of the app. Siglo sometimes manages to update. I suspect that the watch can't cope with some (presumably) higher datarate? Or maybe some timing issue, as the amount of data successfully transferred before a crash varies.

The only tool that works somewhat reliably for me (>50% of tries, but slow transmission) is the bootloader/ota-dfu-python/dfu.py script.

hrmckay commented 2 years ago

The update of my dev kit PineTime from 1.8.0 to 1.9.0 worked first time. Pixel 3A phone, Android 12, Gadgetbridge 0.65. I used the .zip file.

Joshndroid commented 2 years ago

Bizarre that there is so much variation in updating, whats working, whats not and how many times its taking various persons to get the update to stick.

yuval-herman commented 2 years ago

Did anyone try to downgrade to previous versions? This might shed some light on the matter

Joshndroid commented 2 years ago

Did anyone try to downgrade to previous versions? This might shed some light on the matter

So i didn't bother with downgrading but I got the same error when trying to just reflash the same version I was on.

Riksu9000 commented 2 years ago

Use the dfu .zip file when flashing with most companion apps like Gadgetbridge or nRF Connect. The image .bin file is only used by Amazfish. If the firmware upgrade fails, restart your PineTime before retrying.

I upgrade the firmware with Gadgetbridge often. I used to have some issues a long time ago, but nowadays I never have any issues. Same thing with reconnecting. I tried using Siglo, and couldn't get it to work. I had trouble getting it to detect the watch. I had it fail at 0%, at 100%, and now it won't even start.

From my experience, all firmware upgrades after a single failed attempt will also fail most of the time, if not always, until the watch is restarted. If the upgrade fails, please restart your watch by holding down the button until you see the pine logo.

I'm doubtful that there's any new issue with InfiniTime. People have reported issues with all versions.

guek commented 2 years ago

Did anyone try to downgrade to previous versions? This might shed some light on the matter

I tried to reflash V1.9: No success with nRF and GB. Same with downgrade to 1.8: Both not working. After several attempts only 1 reflash of V1.9 was sussessful.

It's no fun.

StarGate01 commented 2 years ago

I had better luck when I moved the watch closer to the Bluetooth adapter / phone, which seems to indicate that dropped packets could be a problem. Maybe I have a lot of RF interference.

Strit commented 2 years ago

I switched to try Siglo. Worked like a charm the first time. So the issue is likely not related to InfiniTime itself, but rather the connection between the phone and the watch.

loidinhm31 commented 2 years ago

nRF restart my device many times, only works with gadgetbridge

JF002 commented 2 years ago

Remember that nRFConnect is a proprietary application by Nordic Semiconductor. They might have pushed an update that makes it incompatible with the DFU implementation in InfiniTime.

I strongly recommend using one of the open source companion app as they implemented the DFU protocol specifically for InfiniTime.

Also, note that the OTA is some kind of stress tests for both the phone/computer side and InfiniTime : it transmits a lot of data in a short amount of time. A single issue during the transfer will make the OTA fail. It can be a packet lost or corrupted, RF interference, bug in the BLE stack of the phone or in InfiniTime,...

So, as other said, reboot your watch between every attempts, try with another phone/computer and another companion app and, if possible, analyze and debug to find out why the transfer failed and how we could improve the code ;-)

Also, note that most of the companion app will only accept the DFU (.zip) file, while Amazfish only supports the image (.bin) file.

advation commented 2 years ago

What worked for me (Android 12) was to stop using nRFConnect and connected via GadgetBridge 0.66, downloaded the .zip, and then in a file browser opened the .zip with GadgetBridge. This worked first time without incident.

Q-lds commented 2 years ago

Same here: couldn't really use nRFConnect (4.24.3) as it always got stuck at the 0% stage, while GadgetBridge (0.59.2) worked at the first attempt. Upgrading from 1.2 to 1.9