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

ESP32-S3 BLE fixes #8645

Merged
merged 2 commits into from
Nov 22, 2023
Merged

ESP32-S3 BLE fixes #8645

merged 2 commits into from
Nov 22, 2023

Conversation

dhalbert
Copy link
Collaborator

Fixes #8631.

Seems to fix ESP32-S3 BLE acting as a simple central. See https://forums.adafruit.com/viewtopic.php?t=206024 for user problems. I will point the users in that thread to the artifacts once this has built.

Tested on a BerryMed Pulse Oximeter with the library's simpletest.

Notes:

  • QTPY ESP32S3 9.0.0A5: fails on BLERadio startScan() #8631 fix fixes a problem exposed by the new split heap use.
  • BLE_ERR_SUCCESS is 0, but was being used in places where the return values are actually BLE_HS_*. Nimble has multiple sets of error return codes, but no corresponding types, so it's hard to figure out which codes to use where. BLE_HS_* values don't have a zero BLE_HS_OK or BLE_HS_SUCCESS, unfortunately.
  • Fixed some apparent missing returns in error cases.
  • common_hal_bleio_characteristic_set_value() was being used to set a remote Characteristic value during discovery, but this did not work.
  • An initial value should have been passed as a bufinfo, but was not.

There may be other problems, and the functionality is still limited in several ways. But this seems to fix some basic issues that were holding up using ESP32-S3 BLE as a central.

Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Nothing obviously wrong, and user tests show it improves status quo. Thanks!

@dhalbert dhalbert merged commit b2c32cf into adafruit:main Nov 22, 2023
471 checks passed
@dhalbert dhalbert deleted the esp32s3-ble-fixes branch November 22, 2023 03:48
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.

QTPY ESP32S3 9.0.0A5: fails on BLERadio startScan()
2 participants