Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLE connection will not be closed #798

Closed
michapr opened this issue Nov 9, 2020 · 2 comments · Fixed by #842
Closed

BLE connection will not be closed #798

michapr opened this issue Nov 9, 2020 · 2 comments · Fixed by #842
Milestone

Comments

@michapr
Copy link

michapr commented Nov 9, 2020

I have noted a high battery usage of the MHO-C401 sensors and one LYWSD03MMC with original firmware.

Looking for the power usage I have seen that after connection to the deices the connection after received notification will not be closed.
So, in my case, the connection will be live for 1:06 minutes (!!) - until next scan, where a
BLEDevice::deinit(true);
will kill all connections.
During this time the sensor take about 3-4mA (peaks between 1.5 and 5,5mA) what will drain the battery of course.

For MMC is the alternate firmware a solution, but for MHO-C401 not.

Not sure how it can be solved, if connection to device cannot be closed after received notification - maybe make a
BLEDevice:deinit(true)
after a defined time (as sample max 10 seconds after request)?

Thanks
Michael

@1technophile 1technophile added this to the v0.9.6 milestone Nov 9, 2020
@1technophile
Copy link
Owner

Good point @michapr !
Will take a look

@1technophile 1technophile linked a pull request Jan 2, 2021 that will close this issue
@1technophile
Copy link
Owner

I have added the disconnection after a timeout, in the BLEconnect function.

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 a pull request may close this issue.

2 participants