InfiniTimeOrg / InfiniLink

The official iOS companion app for InfiniTime
https://apps.apple.com/us/app/infinilink/id1582318814
GNU General Public License v3.0
202 stars 22 forks source link

On boarding connection issue #9

Closed xan-m closed 3 years ago

xan-m commented 3 years ago

I’ve received a couple reports that the first connection was difficult for some (one user had to restart their phone, another had to try to connect to the device from another computer first)

I suspect this might be an issue with how the Bluetooth permissions are handled on first boot of the app.

If you had this issue, please add any information you can to this issue to help me troubleshoot!

pelgerr commented 3 years ago

I also ran into this issue. I was able to workaround it by doing a reboot on the PineTime.

Running InfiniTime version 1.3.0, Infini-iOS version 0.8, and iOS 14.

I also noticed Infini-iOS had trouble seeing the watch after it had been disconnected overnight. Again, rebooting the PineTime seemed to get everything working. I can open a separate issue for this though since it's technically not an onboarding connection issue.

xan-m commented 3 years ago

Thanks for the info! That sounds more like the ongoing connection issues being handled here and in the issues mentioned in that thread.

Everyone, regardless of companion app, seems to be having issues sustaining a connection for more than ~24 hours, and has to reboot the PineTime once a day.

Could be that's the issue others were reporting as well, but one user in particular said they had to restart their phone before it saw the PineTime, and that sounds like it's more on my end.

P.S. thank you for the detailed report!

ocdtrekkie commented 3 years ago

It's possible rebooting my PineTime would've worked. (I do not know how to reboot my PineTime!) nRF Connect on iOS didn't see my watch either prior to me somehow waking up the PineTime with my Windows PC.

pelgerr commented 3 years ago

Thanks for the info! That sounds more like the ongoing connection issues being handled here and in the issues mentioned in that thread.

Everyone, regardless of companion app, seems to be having issues sustaining a connection for more than ~24 hours, and has to reboot the PineTime once a day.

Could be that's the issue others were reporting as well, but one user in particular said they had to restart their phone before it saw the PineTime, and that sounds like it's more on my end.

P.S. thank you for the detailed report!

Ah yes I missed that issue. Thanks for pointing it out!

xan-m commented 3 years ago

@ocdtrekkie just hold the side button for about 8 seconds, and let go when the screen flickers and the green Pine64 logo shows up. Heads up too, if you continue holding beyond that point, the pinecone will turn blue (which I think reverts to the previous firmware?) and then red (which boots to just the bootloader if your install is really borked). Make sure to let go while it's still green!

It's strange that interacting with the Windows machine was enough to make the PineTime snap out of it, usually people have to reboot. Maybe leave a detailed comment of that interaction in the InfiniTime repo issue about connections? Could be helpful for them.

Itai-Nelken commented 3 years ago

which boots to just the bootloader if your install is really borked)

it boots to the recovery firmware, not the bootloader. the bootloader is the pinecone.

Utopiah commented 3 years ago

Pretty sure it comes from https://github.com/JF002/InfiniTime/issues/527 , especially if you don't see the blue BT icon anymore after e.g. losing connection due to distance from the phone.

xan-m commented 3 years ago

Yep that’s the issue I referenced above. With my phone/watch I can usually hold a connection for about 23 hours before the pinetime stops broadcasting advertisements and I have to reboot the watch. Dropped connections due to distance or other interference should be able to reconnect just fine as long as the watch is still advertising.

Let me know if you run into connection issues that don’t sound like the InfiniTime bug though!

@Itai-Nelken yes you’re right! Thanks for the correction.

xan-m commented 3 years ago

After some testing, I believe this issue is due to the fact that the Bluetooth permissions prompt is initiated by the device starting the first scan for available devices. Even if you're super quick on the draw, this leads to the BLE scan hanging, and doesn't really give any feedback to the user about what happened.

I've added an onboarding pop up that will show on first run of the app to give the permissions a chance to resolve. I've also added some checks against whether or not the BLE manager is on and authorized to connect before the connect sheet can appear, to prevent that page from coming up when it can't do anything.

I'm going to leave this issue open for a while just in case anyone else has an issue with their first connection, but I think it should be resolved in the 0.8.5 update.

xan-m commented 3 years ago

Seems like this issue is resolved, and InfiniTime devs are making great progress on the BLE issues. Feel free to reopen if you are still experiencing these issues!

Marking this issue as closed.