The struct esp_ble_adv_params_t contains a 'flag' field:
uint8_t flag; /*!< Advertising flag of discovery mode */
It seems that this field is ignored in the implementation?
Greetings
Andreas
Flags ignored in BLE advertising
Re: Flags ignored in BLE advertising
I think I've found the issue:
It seems that the flags are lost in the BLE stack, in file "btc_gap_ble.c", function "btc_to_bta_adv_data".
The input object "p_adv_data" still contains them, but they're not copied to the output object "bta_adv_data".
By changing...
... to ...
... I got the flags working correctly.
Could someone please verify and fix this issue in the repository?
Thanks and all the best for 2017!
Andreas
It seems that the flags are lost in the BLE stack, in file "btc_gap_ble.c", function "btc_to_bta_adv_data".
The input object "p_adv_data" still contains them, but they're not copied to the output object "bta_adv_data".
By changing...
Code: Select all
if (p_adv_data->flag != 0) {
mask = BTM_BLE_AD_BIT_FLAGS;
}
Code: Select all
if (p_adv_data->flag != 0) {
mask = BTM_BLE_AD_BIT_FLAGS;
bta_adv_data->flag = p_adv_data->flag; // Added this line to copy the flags
}
Could someone please verify and fix this issue in the repository?
Thanks and all the best for 2017!
Andreas
-
- Posts: 26
- Joined: Wed Dec 21, 2016 3:41 pm
Re: Flags ignored in BLE advertising
There is actually a corresponding pull request on github (not by me).
I agree, it would be nice to have this included in the next update.
I agree, it would be nice to have this included in the next update.
Who is online
Users browsing this forum: No registered users and 13 guests