How to specify S=2 (500kbps) and S=8 (125kbps) in ESP32S3 BLE5.0 coded PHY?
Posted: Fri Jun 23, 2023 10:46 am
I am able to advertise using the coded PHY, but I'm unsure about how to specify S=2 (500kbps) and S=8 (125kbps) coding options.
I found the following configuration values in esp_gap_ble_api.h:
I also found a function that seems capable of setting this:
I tried setting ESP_BLE_GAP_PHY_OPTIONS_PREF_S8_CODING and calling the function, and it appears to have succeeded with a return value of 0. However, I received the following error:
BT_BTM: BTM_BleSetPreferPhy, invalid parameters
Please let me know what might be causing this issue.
Thank you in advance.
I found the following configuration values in esp_gap_ble_api.h:
Code: Select all
#define ESP_BLE_GAP_PHY_OPTIONS_NO_PREF 0 /*!< The Host has no preferred coding when transmitting on the LE Coded PHY */
#define ESP_BLE_GAP_PHY_OPTIONS_PREF_S2_CODING 1 /*!< The Host prefers that S=2 coding be used when transmitting on the LE Coded PHY */
#define ESP_BLE_GAP_PHY_OPTIONS_PREF_S8_CODING 2 /*!< The Host prefers that S=8 coding be used when transmitting on the LE Coded PHY */
typedef uint16_t esp_ble_gap_prefer_phy_options_t;
Code: Select all
esp_err_t esp_ble_gap_set_prefered_phy(esp_bd_addr_t bd_addr,
esp_ble_gap_all_phys_t all_phys_mask,
esp_ble_gap_phy_mask_t tx_phy_mask,
esp_ble_gap_phy_mask_t rx_phy_mask,
esp_ble_gap_prefer_phy_options_t phy_options);
BT_BTM: BTM_BleSetPreferPhy, invalid parameters
Please let me know what might be causing this issue.
Thank you in advance.