InfiniTimeOrg / InfiniTime

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

Unable to start bluetooth #737

Closed pshem closed 3 years ago

pshem commented 3 years ago

I got a sealed PineTime this week. The attached documentation suggested I need to connect it to a companion app to update the OS to the newest version. However, try as I might, I couldn't get Gadgetbridge to see my watch.

Eventually, I stumbled upon https://wiki.pine64.org/wiki/PineTime_FAQ#Troubleshooting_PineTime.27s_Bluetooth_.28InfiniTime_firmware.29, reset the watch and bluetooth connected straight away, displaying a blue bluetooth symbol. I downloaded the 1.6.0 release and attempted to update. The update got to 53% before displaying "firmware update error". After 5 minutes, Gadgetbridge still seemed to think the update will succeed, while the watch showed no change.

So I tried to reset the watch again, hoping to regain bluetooth connectivity and try the update again. Alas, I've had no bluetooth connection to the watch since and subsequent resets have not helped. While reading about InfiniTime, I've ran into information about recovery firmware that provides bluetooth connectivity for updates if the current firmware does not.

  1. How can I access the recovery firmware?
  2. How else can I get bluetooth connectivity on the watch?

The PineTime I got came with InfiniTime 1.2.0, and I am using Gadgerbridge 0.60.0 to connect

JF002 commented 3 years ago

Some big issues with BLE were fixed in 1.5 and 1.6. As your watch is running 1.2, it doesn't have those fixes, which means you can experience difficulties with connecting to your smartphone (BLE advertising was improved in 1.5) and BLE on the PineTime will stop working after 18hrs of uptime).

So, if your phone cannot find your watch, I would recommend you reboot your watch (long push on the button and release as soon as you see the white pinecone on the display).

Now, if your phone cannot reconnect after the watch reboot, please check that

If it still don't work, could you try to reboot your phone? BLE stack on Android are sometimes buggy... Also, avoid RF interferences by staying away from other RF devices (wifi, bluetooth) and possibly USB3 devices too.

When the watch connects and OTA starts, it is still possible the file transfer fails. If it's the case, reboot the watch and try again.

How can I access the recovery firmware?

I don't think the recovery firmware is needed here, you're most likely experiencing bugs in InfiniTime and in your phone BLE stack. The recovery was designed to recover from a non-functioning firmware. Anyway, you can load it by keeping the button press when the bootloader is loading (when you see the white pinecone becoming green). If you keep the button pressed, the cone will be paint in blue (meaning it'll load the last working version of the firmware) and then red (meaning it'll load the recovery firmware). More info here: https://github.com/JF002/pinetime-mcuboot-bootloader#boot-flow.

Note that in InfiniTime 1.2, bluetooth goes to sleep after 3 minutes when the display if off. Just remember to wake the watch (by pushing the button) before trying to connect to it. As of 1.5, bluetooth should work all of the time.

pshem commented 3 years ago

You might be onto something with Android bluetooth stacks being bad... rebooting the phone found InfiniTime straight away. The update failed again though, this time at 12%. After the watch reset, the phone no longer sees the watch, so I guess I will have to keep resetting the two and try to go as far from the router as possible.

pshem commented 3 years ago

Ok, I got the update transfer to succeed by putting the phone and watch together in a turned off microwave.... didn't have a better farday cage idea. Thank you!