Bluetooth LE APIs

michaelwgnr
Posts: 22
Joined: Wed Dec 21, 2016 3:41 pm

Bluetooth LE APIs

Postby michaelwgnr » Thu Jan 05, 2017 4:09 pm

Looking at all the Bluetooth LE examples, I realised that these all outline three possible approaches to work with Bluetooth LE in the current version of the SDK:
  • examples/05_ble_adv: Manually shove bytes through the HCI.
  • examples/12_blufi: Apart from the parts that are handled by the "blufi"-profile, this example directly works with the BTA API.
  • examples/14_gatt_server and examples/15_gatt_client: Work with the ESP provided APIs
VHCI (bt/include)
Well... of course I would like to avoid having to manually write bytes to the VHCI, as it is rather low level, tedious and error prone to implement a completely functional Bluetooth peripheral with multiple services, etc. (at least if it's me doing this... :lol:)

BTA API (bt/bluedroid/bta/include)
Bluedroid application layer. This seems like a fairly consistent API and looks understandable to me.

ESP API (bt/bluedroid/api/include)
My understanding is that the ESP API provides an interface that would be a bit more consistent with the rest of the system, but is essentially just placed on top of the BTA API, decoupling direct calls to the BTA API from the user application by implementing the intermediate BTC task.

Is this assessment correct?

Now, I understand that the ESP BLE stack is still under development, so it is obvious that it looks like the ESP API is not yet completed. There are a few things missing, e.g. advertising more than one UUID128 is not yet workable, there is still lots of error checking missing, the documentation is rather minimalistic etc.

So, my questions are:
  • Does anything speak against using the BTA API directly? It seems to be documented rather thoroughly and seems to be well usable.
  • Are there any large updates planned for the BLE API in the near future? Is there some sort of roadmap or some more info about where Espressif are headed with it?
Thank you in advance for any information.

ESP_Tianhao
Posts: 12
Joined: Thu Jan 05, 2017 10:46 am

Re: Bluetooth LE APIs

Postby ESP_Tianhao » Fri Jan 06, 2017 6:12 am

Hi, for your questions:
1. We make ESP_api provide to users. BTA_api is for bluedroid internal. So users should call ESP_api, rather than BTA_api.
2. When newer version of ESP_IDF release, we will update some ESP_api.

michaelwgnr
Posts: 22
Joined: Wed Dec 21, 2016 3:41 pm

Re: Bluetooth LE APIs

Postby michaelwgnr » Fri Jan 06, 2017 8:09 am

ESP_Tianhao wrote:Hi, for your questions:
1. We make ESP_api provide to users. BTA_api is for bluedroid internal. So users should call ESP_api, rather than BTA_api.
2. When newer version of ESP_IDF release, we will update some ESP_api.


Thanks for your response!

1. Okay, I understand that, so I can't really assume that this BTA API will stay as ist is? It would probably be helpful if the examples would not use the BTA API in that case.
2. Is there a roadmap lining out what the future plans are with BLE / Bluetooth in the ESP32 SDK?

Who is online

Users browsing this forum: No registered users and 3 guests