feat(split): Increase split interval during idle#682
feat(split): Increase split interval during idle#682Nicell wants to merge 1 commit intozmkfirmware:mainfrom
Conversation
|
I've tried this on my nice!nano + sofle split briefly. Haven't seen any issues when coming out of idle yet. I'll daily drive this for a day and see if any issues come up. I'm very interested in all improvements that help with battery life so I'll test wherever I can. |
|
After trying this out for about 8 hours, I haven't practically run into any issues. I can reproduce the out of order key presses you mentioned but I have to try hard, I didn't run into it in practice. |
|
Thanks for testing this @scottg88. I don't currently daily drive a split, so I'd like to hear a few others' experiences before moving this forward. Sounds like this is pretty promising. |
petejohanson
left a comment
There was a problem hiding this comment.
Just one comment, otherwise, the code and approach looks good. Haven't had a chance to test myself yet.
| bt_conn_get_info(conn, &info); | ||
|
|
||
| if (info.role == BT_CONN_ROLE_MASTER) { | ||
| int err = bt_conn_le_param_update(conn, BT_LE_CONN_PARAM(0x0012, 0x0012, 10, 400)); |
There was a problem hiding this comment.
Can we create #defines for this and the wake versions to make this a bit clearer?
|
I have been testing this for three days on my split and haven't run into any issues. However I also couldn't intentionally reproduce the out of order keys (after waiting 30 seconds for idle). |
|
An issue found from testing this PR: https://discord.com/channels/719497620560543766/784523018050469939/827426904470192159
|
ea8f4e6 to
7f62317
Compare
ef59d6c to
09b3331
Compare
|
If anyone would like to pick this up, it would need some updates to use the Kconfig values that control connection parameters. Maybe new Kconfig options for idle multipliers could be defined. More testing around the two halves losing their connection when the connection settings update needs to be investigated. |
|
This PR has been automatically marked as stale because it has not had activity in 10 months. It will be closed in 14 days if no further activity occurs. Feel free to give a status update or re-open when it has been rebased and is ready for review (again). Thanks! |
|
This PR was closed because it had no activity for over 10 months. Feel free to give a status update or re-open when it has been rebased and is ready for review (again). |
Slows down BLE connection interval between split halves when keyboard goes idle, reducing central half battery consumption significantly during idle periods. When the keyboard becomes active again, connection parameters are restored to their normal values. There may be brief latency (0.6-1s) when waking from idle. Based on: zmkfirmware#682 Co-authored-by: Nick Winans <nick@winans.codes>
Slows down BLE connection interval between split halves when keyboard goes idle, reducing central half battery consumption significantly during idle periods. When the keyboard becomes active again, connection parameters are restored to their normal values. There may be brief latency (0.6-1s) when waking from idle. Based on: zmkfirmware#682 Co-authored-by: Nick Winans <nick@winans.codes>
Slows down BLE connection interval between split halves when keyboard goes idle, reducing central half battery consumption significantly during idle periods. When the keyboard becomes active again, connection parameters are restored to their normal values. There may be brief latency (0.6-1s) when waking from idle. Based on: zmkfirmware#682 Co-authored-by: Nick Winans <nick@winans.codes>
Slows down BLE connection interval between split halves when keyboard goes idle, reducing central half battery consumption significantly during idle periods. When the keyboard becomes active again, connection parameters are restored to their normal values. There may be brief latency (0.6-1s) when waking from idle. Based on: zmkfirmware#682 Co-authored-by: Nick Winans <nick@winans.codes>
This PR makes the split connection interval increase during idle. There's a brief period (about 0.6-1s) where the chances of having misordered keypresses are higher when coming out of idle, but this overall works well from my testing. This makes wireless battery consumption of the central half 1/3rd what it currently is when idle, and the peripheral's battery life is mostly unaffected.
For some reason, the
bt_conn_foreachfinds two connections rather than one that matches the role of master, and the first one always fails to update. Not sure what's up with that, but the second one updates the split connection properly.Would appreciate people testing this branch to see how it performs for them. Specifically, I'd be interested in how this affects your typing experience (if at all).