-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Synced sleep bewteen central/peripherals #2408
Comments
Personally I'd say your suggested function should be how it behaves, I don't see the reason why you would want to have the option to not sync sleep timers. |
Hi @Genteure , I took a stab at this, and shared my changes above, based on syncing the last activity timing, rather than sleep timers. One issue I realized is that in deep sleep mode, the BLE capability is turned off, so it's not possible to wake either device from either side (to my knowledge), but the changes do prevent the peripheral from going into deep sleep, if the central device is used, and the timing synced to the peripheral |
Hmm @Genteure , I was reading through some other issues when a realisation occurred, the last activity timers are synced, but the state is not. If the central is powered by USB, it'll never go to sleep, but the last activity time is still synced, and can result in the peripheral going to idle mode, while the central is in active state. Some users may be ok with this (saves battery on the peripheral), while some may prefer the alternative where even the states are synchronised. Maybe it would be better to explicitly sync the states rather than indirectly through the last activity timers. Just wanted to check if this use case crossed your mind when raising the issue, and your thoughts on it? |
I don't really have a strong opinion but to me syncing time numbers feels better than completely synchronized sleep state. I can think of four scenarios where the central is connected to USB but the peripherals are not:
For scenario 4, users would probably not enable sleep to begin with. Also a peripheral should still be able to sleep on it's own to save battery when it's not connected to the central. |
Would be nice to have an option to sync sleep timers.
Currently key presses on a peripheral keeps the central awake but not the reverse. I imagine with a multi-peripheral setup (e.g. with a dongle) key presses on peripheral A would also not keep peripheral B awake.
This leads to the peripheral side occasionally sleeping on it's own. Although wake-up and reconnect is pretty quick in my experience, there's still a few seconds of delay.
The text was updated successfully, but these errors were encountered: