Closed mbv closed 8 months ago
BLE_ERR_INV_HCI_CMD_PARMS
and BLE_HS_EROLE
both have the same 0x12
value.
They are defined for different purposes.
I believe it is correct that the esp_idf_sys::ble_gap_adv_set_data
function used within set_raw_data
should return the error code defined in BLE_HS_*
.
In fact, the esp_idf_sys::ble_gap_adv_rsp_set_data
function used within set_raw_scan_response_data
returns BLE_HS_EINVAL
instead of BLE_ERR_INV_HCI_CMD_PARMS.
I would like to change it so that it returns BLE_HS_EINVAL
not BLE_ERR_INV_HCI_CMD_PARMS
.
If you provide more than 31 bytes to the
BLEAdvertising::set_raw_data
function, it will result in the errorBLE_ERR_INV_HCI_CMD_PARMS = 0x12
. However, this error is incorrectly mapped toBLE_HS_EROLE
(Err(Operation requires different role (e.g., central vs. peripheral).)
)