Is there any function available to convert data from a esp_ble_adv_data_t structure to a raw data array ?
Or something like a guideline ?
function to convert esp_ble_adv_data_t to raw data array ?
Re: function to convert esp_ble_adv_data_t to raw data array ?
Howdy my friend. To clarify what you are asking for ... when working with BLE advertising, a BLE server builds advertising packet payloads as documented in the BLE spec. We can then advertise/publish these packets and because the format is well defined, a BLE client can receive an advertised packet and decode it. The ESP-IDF provides a "helper" in the form of the "esp_ble_adv_data_t" structure which contains some of the more popular advertising fields. An ESP32 application can then fill in these fields and pass it to the ESP-IDF which in turn unpacks that structure and builds the BLE advertising packet associated with the spec.
I suspect (guess) that you don't want to convert an "esp_ble_adv_data_t" structure to an advertisement packet (raw data) but instead want to be able to build your own advertisements from fields that you choose which may or may not include those already found in the "esp_ble_adv_data_t" structure.
I suspect (guess) that you don't want to convert an "esp_ble_adv_data_t" structure to an advertisement packet (raw data) but instead want to be able to build your own advertisements from fields that you choose which may or may not include those already found in the "esp_ble_adv_data_t" structure.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: function to convert esp_ble_adv_data_t to raw data array ?
Hello Neil,
sorry, but your guess is wrong.
For testing, better understanding, comparing with other chips etc, I would use esp_ble_adv_data_t to get raw data.
Somewhere inside bt-components is this (hidden ?) function, and I would like to use it from my code.
Even the information, that this does not exist would be helpful. At least I would know then.
sorry, but your guess is wrong.
For testing, better understanding, comparing with other chips etc, I would use esp_ble_adv_data_t to get raw data.
Somewhere inside bt-components is this (hidden ?) function, and I would like to use it from my code.
Even the information, that this does not exist would be helpful. At least I would know then.
Re: function to convert esp_ble_adv_data_t to raw data array ?
@wifive, thanks a lot.
Looks very promising
Looks very promising
Re: function to convert esp_ble_adv_data_t to raw data array ?
Howdy my friend, maybe some background on the puzzle you are looking to solve would help?
To my understanding, the esp_ble_adv_data_t is a data structure we populate in an ESP32 BLE Server when we want to advertise data to the BLE environment. If what you want to do is receive the raw data from other advertisers, that doesn't have anything to do with that data structure (I think). Instead, what you do is register a GAP event handler and start scanning. When advertisements start arriving, you get passed a raw chunk of data that contains the advertised payload.
To my understanding, the esp_ble_adv_data_t is a data structure we populate in an ESP32 BLE Server when we want to advertise data to the BLE environment. If what you want to do is receive the raw data from other advertisers, that doesn't have anything to do with that data structure (I think). Instead, what you do is register a GAP event handler and start scanning. When advertisements start arriving, you get passed a raw chunk of data that contains the advertised payload.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: function to convert esp_ble_adv_data_t to raw data array ?
Hello Neil,
I'm pretty sure, you know the project I'm working on
My idea right now is to get Bluetooth running.
There is a command http://www.espruino.com/Reference#l_NRF ... tisingData
Internally, this is also called in http://www.espruino.com/Reference#l_NRF_setAdvertising
For now I found a way to bypass this, but on a long term I try to be as compatible as possible to puck.js port
Therefore I'm searching for a similiar call like this one adv_data_encode(&advdata, encoded_advdata, &len_advdata);
If you want some more information, please send me a line
I'm pretty sure, you know the project I'm working on
My idea right now is to get Bluetooth running.
There is a command http://www.espruino.com/Reference#l_NRF ... tisingData
Internally, this is also called in http://www.espruino.com/Reference#l_NRF_setAdvertising
For now I found a way to bypass this, but on a long term I try to be as compatible as possible to puck.js port
Therefore I'm searching for a similiar call like this one adv_data_encode(&advdata, encoded_advdata, &len_advdata);
If you want some more information, please send me a line
Who is online
Users browsing this forum: No registered users and 110 guests