|
@@ -581,7 +581,7 @@ esp_err_t esp_wifi_get_channel(uint8_t *primary, wifi_second_chan_t *second);
|
|
|
* and the country info of the AP to which the station is connected is {.cc="JP", .schan=1, .nchan=14}
|
|
* and the country info of the AP to which the station is connected is {.cc="JP", .schan=1, .nchan=14}
|
|
|
* then the country info that will be used is {.cc="JP", .schan=1, .nchan=14}. If the station disconnected
|
|
* then the country info that will be used is {.cc="JP", .schan=1, .nchan=14}. If the station disconnected
|
|
|
* from the AP the country info is set back back to the country info of the station automatically,
|
|
* from the AP the country info is set back back to the country info of the station automatically,
|
|
|
- * {.cc="USA", .schan=1, .nchan=11} in the example.
|
|
|
|
|
|
|
+ * {.cc="US", .schan=1, .nchan=11} in the example.
|
|
|
* @attention 3. When the country policy is WIFI_COUNTRY_POLICY_MANUAL, always use the configured country info.
|
|
* @attention 3. When the country policy is WIFI_COUNTRY_POLICY_MANUAL, always use the configured country info.
|
|
|
* @attention 4. When the country info is changed because of configuration or because the station connects to a different
|
|
* @attention 4. When the country info is changed because of configuration or because the station connects to a different
|
|
|
* external AP, the country IE in probe response/beacon of the soft-AP is changed also.
|
|
* external AP, the country IE in probe response/beacon of the soft-AP is changed also.
|
|
@@ -881,60 +881,22 @@ typedef void (*esp_vendor_ie_cb_t) (void *ctx, wifi_vendor_ie_type_t type, const
|
|
|
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
|
|
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @brief Set maximum WiFi transmiting power
|
|
|
|
|
- *
|
|
|
|
|
- * @attention WiFi transmiting power is divided to six levels in phy init data.
|
|
|
|
|
- * Level0 represents highest transmiting power and level5 represents lowest
|
|
|
|
|
- * transmiting power. Packets of different rates are transmitted in
|
|
|
|
|
- * different powers according to the configuration in phy init data.
|
|
|
|
|
- * This API only sets maximum WiFi transmiting power. If this API is called,
|
|
|
|
|
- * the transmiting power of every packet will be less than or equal to the
|
|
|
|
|
- * value set by this API. If this API is not called, the value of maximum
|
|
|
|
|
- * transmitting power set in phy_init_data.bin or menuconfig (depend on
|
|
|
|
|
- * whether to use phy init data in partition or not) will be used. Default
|
|
|
|
|
- * value is level0. Values passed in power are mapped to transmit power
|
|
|
|
|
- * levels as follows:
|
|
|
|
|
- * - [78, 127]: level0
|
|
|
|
|
- * - [76, 77]: level1
|
|
|
|
|
- * - [74, 75]: level2
|
|
|
|
|
- * - [68, 73]: level3
|
|
|
|
|
- * - [60, 67]: level4
|
|
|
|
|
- * - [52, 59]: level5
|
|
|
|
|
- * - [44, 51]: level5 - 2dBm
|
|
|
|
|
- * - [34, 43]: level5 - 4.5dBm
|
|
|
|
|
- * - [28, 33]: level5 - 6dBm
|
|
|
|
|
- * - [20, 27]: level5 - 8dBm
|
|
|
|
|
- * - [8, 19]: level5 - 11dBm
|
|
|
|
|
- * - [-128, 7]: level5 - 14dBm
|
|
|
|
|
- *
|
|
|
|
|
- * @param power Maximum WiFi transmiting power.
|
|
|
|
|
|
|
+ * @brief Set maximum WiFi transmitting power
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param power Maximum WiFi transmitting power, unit is 0.25dBm, range is [40, 82] corresponding to 10dBm - 20.5dBm here.
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
* - ESP_OK: succeed
|
|
* - ESP_OK: succeed
|
|
|
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
|
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
|
|
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
|
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
|
|
|
|
+ * - ESP_ERR_WIFI_NOT_ARG: invalid argument
|
|
|
*/
|
|
*/
|
|
|
esp_err_t esp_wifi_set_max_tx_power(int8_t power);
|
|
esp_err_t esp_wifi_set_max_tx_power(int8_t power);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @brief Get maximum WiFi transmiting power
|
|
* @brief Get maximum WiFi transmiting power
|
|
|
*
|
|
*
|
|
|
- * @attention This API gets maximum WiFi transmiting power. Values got
|
|
|
|
|
- * from power are mapped to transmit power levels as follows:
|
|
|
|
|
- * - 78: 19.5dBm
|
|
|
|
|
- * - 76: 19dBm
|
|
|
|
|
- * - 74: 18.5dBm
|
|
|
|
|
- * - 68: 17dBm
|
|
|
|
|
- * - 60: 15dBm
|
|
|
|
|
- * - 52: 13dBm
|
|
|
|
|
- * - 44: 11dBm
|
|
|
|
|
- * - 34: 8.5dBm
|
|
|
|
|
- * - 28: 7dBm
|
|
|
|
|
- * - 20: 5dBm
|
|
|
|
|
- * - 8: 2dBm
|
|
|
|
|
- * - -4: -1dBm
|
|
|
|
|
- *
|
|
|
|
|
- * @param power Maximum WiFi transmiting power.
|
|
|
|
|
|
|
+ * @param power Maximum WiFi transmitting power, unit is 0.25dBm.
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
* - ESP_OK: succeed
|
|
* - ESP_OK: succeed
|