Skip to content

Redo reconnect feature for HR#1319

Open
jonasoreland wants to merge 14 commits intomasterfrom
hr-reconnect
Open

Redo reconnect feature for HR#1319
jonasoreland wants to merge 14 commits intomasterfrom
hr-reconnect

Conversation

@jonasoreland
Copy link
Owner

No description provided.

@gerhardol
Copy link
Collaborator

The first to be done for HR is to modernize the API. It currently uses the 4.3 BluetoothAdapter.startLeScan() instead of 5.0 BluetoothLeScanner.startScan()

I asked Gemini to make the changes but it does not compile.
I suggest this is done first.

@jonasoreland
Copy link
Owner Author

if you get a version that works, I can test it...
the version here mostly works...which is what I care about :)

@jonasoreland
Copy link
Owner Author

fwiw, I checked into 5.0 BluetoothLeScanner.startScan
and concluded that moving to that is fine...but it will not affect the reconnect behavior...
i.e. it' s unrelated...

@jonasoreland
Copy link
Owner Author

I've been using this personally now for a couple of month.
It fixes the reconnect problem encountered without this change.

A noticeable problem about testing this is that I don't know when the disconnect
happens...it can go days without any disconnect, only to a day later get 3 disconnects
on one run...really weird...

Anyway, I think is good enough to merge now!

PTAL

Copy link
Collaborator

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 I have not seen the problem, but I dont really check the HR when I have that connected
Have not used and reviewed just briefly. The logic is not simple, but I doubt I will have many comments.
May look again after the ble 5 update is merged, unless you want to merge first.

Edit: ble5 merged.

I prefer a squash merge here too

@jonasoreland
Copy link
Owner Author

jonasoreland commented Mar 8, 2026

re squash: sure, np

maybe try copilot on this too ?
it did find a bug, but didn't fix it :)
maybe it find something here too ?
wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants