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

OTA Broken after install of 0.9.0 #129

Closed kgj closed 3 years ago

kgj commented 3 years ago

Not sure what the cause is yet but OTA firmware updates are not working after pushing 0.9.0

Error:

================================ == == == DFU Server == == ==

Sending file image-0.9.0.bin to D7:2C:58:C7:1C:8C Binary imge size: 268208 Binary CRC32: 2078034561 Connecting to D7:2C:58:C7:1C:8C Need to switch to DFU mode Exception at line 147: UUID not found: 00001531-1212-efde-1523-785feabcd123 DFU Server done

JF002 commented 3 years ago

Hello! The good news is that OTA is not broken in 0.9.0, it still works with NRFConnect and Gadgetbridge.

However, I confirm that it does not work using the script dfu.py. I'm not sure why it can't find the characteristic 00001531-1212-efde-1523-785feabcd123... NRFConnect is able to discover it without any issue.

Bluetoothctl also detects it on connect:

...
[NEW] Characteristic (Handle 0x86de)
        /org/bluez/hci0/dev_D1_3F_E0_18_80_21/service0039/char003c
        00001531-1212-efde-1523-785feabcd123
        Vendor specific
...
JF002 commented 3 years ago

I've just push a new commit to dfu.py : https://github.com/JF002/Pinetime/commit/f0e1f98823e41bfc2d9743fa8de70c882f26f93b (last commit on develop)

I've increased the timeout of characteristics discovery, and now, the script is able to initiate the OTA. @kgj could you please confirm it works for you?

kgj commented 3 years ago

Hi There,

Thanks for the quick fix!

I can confirm that OTA is working again.

JF002 commented 3 years ago

Thanks!