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

[Draft] Improve BLE reliability #269

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sethterashima
Copy link
Collaborator

  • Increase timeouts for BLE dialer and listener
  • Retry initial connection on non-fatal errors until context expires
  • Tweak scanning interval to reflect BLE advertisement parameters

TODO:

  • Retry connection using client MAC address instead of scanning
  • Optimize scanning interval
  • Adjust timeouts using caller context
  • Test Maximum BLE connections
  • Test vehicles with different BLE advertisement intervals

Description

Please include a summary of the changes and the related issue.

Fixes # (issue)

Type of change

Please select all options that apply to this change:

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Checklist:

Confirm you have completed the following steps:

  • My code follows the style of this project.
  • I have performed a self-review of my code.
  • I have made corresponding updates to the documentation.
  • I have added/updated unit tests to cover my changes.

 - Increase timeouts for BLE dialer and listener
 - Retry initial connection on non-fatal errors until context expires
 - Tweak scanning interval to reflect BLE advertisement parameters

TODO:

 - Retry connection using client MAC address instead of scanning
 - Optimize scanning interval
 - Adjust timeouts using caller context
 - Test Maximum BLE connections
 - Test vehicles with different BLE advertisement intervals
@iainwhyte
Copy link

tested an RPi4 with built in Bluetooth today to a 2021 M3 and could not fault it. about 25 commands, no timeouts. This seems heaps better. It also seems faster as well.

@wimaha
Copy link

wimaha commented Jul 5, 2024

Tested on RPI3+ with built in bluetooth and it is working very good! Thank you for your effort.

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.

None yet

3 participants