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 Arduino BLE Refactoring #9878

Open
1 task done
SuGlider opened this issue Jun 17, 2024 · 8 comments
Open
1 task done

ESP32 Arduino BLE Refactoring #9878

SuGlider opened this issue Jun 17, 2024 · 8 comments
Assignees
Labels
Area: BLE Issues related to BLE Type: Feature request Feature request for Arduino ESP32
Milestone

Comments

@SuGlider
Copy link
Collaborator

Related area

BLE refactoring using NimBLE

Hardware specification

Any

Is your feature request related to a problem?

This is part of an effort to improve ESP32 Arduino.

Describe the solution you'd like

Starting point for a BLE refactoring Plan.
Targets:

  • Move from Blueroid to NimBLE library.
  • Redesign the Arduino BLE interface to make it more Arduino API alike.

Suggestion:

Examples:

Describe alternatives you've considered

None.

Additional context

None.

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.
@SuGlider SuGlider added the Type: Feature request Feature request for Arduino ESP32 label Jun 17, 2024
@h2zero
Copy link
Contributor

h2zero commented Jun 17, 2024

ArduinoBLE already supports esp32. Only change to do here would be to configure BLE to be controller only and import the ArduinoBLE library, no Bluedroid or NimBLE required.

@SuGlider
Copy link
Collaborator Author

ArduinoBLE already supports esp32. Only change to do here would be to configure BLE to be controller only and import the ArduinoBLE library, no Bluedroid or NimBLE required.

Yes, it supports the ESP32-S3 module from the UNO R4 board and the boards that use Nina-W102 that has an ESP32 module.
But those are used as WiFi/Bluetooth modem using AT commands.

The idea here is to implement the ArduinoBLE API as part of ESP32 Arduino BLE Library as direct ESP-IDF calls, instead of using a UART to send and receive AT commands.

@h2zero
Copy link
Contributor

h2zero commented Jun 17, 2024

It also has the VHCI driver here: https://github.com/arduino-libraries/ArduinoBLE/blob/98ff550988912ffbaeb1d877970e9e05f1de0599/src/utility/HCIVirtualTransport.cpp#L138

Added in arduino-libraries/ArduinoBLE#252

@SuGlider
Copy link
Collaborator Author

@h2zero - Thanks for the information!

It also has the VHCI driver here: https://github.com/arduino-libraries/ArduinoBLE/blob/98ff550988912ffbaeb1d877970e9e05f1de0599/src/utility/HCIVirtualTransport.cpp#L138

I see, this is way to implement it with internal channel AT commands.
I'll try it.

Added in [arduino-libraries/ArduinoBLE#252](arduino-libraries/ArduinoBLE#25

I like the table showing resource utilization after compiling the different libraries' respective scan example!

@VojtechBartoska VojtechBartoska added this to the 3.1.0 milestone Jun 24, 2024
@VojtechBartoska VojtechBartoska added the Area: BLE Issues related to BLE label Jun 24, 2024
@VojtechBartoska
Copy link
Collaborator

related discussion: #9836

@VojtechBartoska
Copy link
Collaborator

Hello @h2zero,

I am contacting you as a Project Manager of Arduino ESP32 project. Our Team have been recently investigating the refactoring of BLE in our core and we also investigated your NimBle-Arduino library.

As you know, we need to keep working solution also for Classic BT on ESP32 platform, but in general in case of implementing e.g. Matter, moving to NimBLE based implementation makes sense.

As you proposed before, we would like to open this approach of reusing parts of your library in the core and we would like to ask if it is okay for you and also if you would like to help us with your contribution?

We can share more details about our ideas of implementation and we will be more than happy to hear your thoughts regarding it. Rodrigo (@SuGlider) has his hands on this and has some suggestions already for BLE refactoting.

Thanks in advance

@h2zero
Copy link
Contributor

h2zero commented Sep 24, 2024

@VojtechBartoska sure, let's chat about it.

@SuGlider
Copy link
Collaborator Author

@h2zero - I have to finish the Arduino Matter Library first and then we will talk here about the nimBLE refactoring. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BLE Issues related to BLE Type: Feature request Feature request for Arduino ESP32
Projects
None yet
Development

No branches or pull requests

4 participants