ESP32 BLE 学习:关于 RSSI 与发射功率
蓝牙发射功率
工作频率:2.4GHz
蓝牙是能工作在以下三种功率级下的短距离无线网络技术:
功率级别 | 最高功率电平 | 有效范围 | 描述 |
---|---|---|---|
功率级1 | +20dbm | 100m | 即 0.1W, 是GSM手机最大功率的1/20 |
功率级2 | +4dbm | 20m | 即2.5mW, 是蓝牙耳机常用功率等级 |
功率级3 | 0dbm | 10m | 即1mW, 是GSM手机最大功率的1/2000 |
esp32 的发射功率的控制范围为 -12dbm ~ 9 dbm (BR/EDR 和 BLE 都是),功率级别设置如下, 若程序中未设置发射功率,默认选择 ESP_PWR_LVL_P3
typedef enum {
ESP_PWR_LVL_N12 = 0, /*!< Corresponding to -12dbm */
ESP_PWR_LVL_N9 = 1, /*!< Corresponding to -9dbm */
ESP_PWR_LVL_N6 = 2, /*!< Corresponding to -6dbm */
ESP_PWR_LVL_N3 = 3, /*!< Corresponding to -3dbm */
ESP_PWR_LVL_N0 = 4, /*!< Corresponding to 0dbm */
ESP_PWR_LVL_P3 = 5, /*!< Corresponding to +3dbm */
ESP_PWR_LVL_P6 = 6, /*!< Corresponding to +6dbm */
ESP_PWR_LVL_P9 = 7, /*!< Corresponding to +9dbm */
ESP_PWR_LVL_N14 = ESP_PWR_LVL_N12, /*!< Backward compatibility! Setting to -14dbm will actually result to -12dbm */
ESP_PWR_LVL_N11 = ESP_PWR_LVL_N9, /*!< Backward compatibility! Setting to -11dbm will actually result to -9dbm */
ESP_PWR_LVL_N8 = ESP_PWR_LVL_N6, /*!< Backward compatibility! Setting to -8dbm will actually result to -6dbm */
ESP_PWR_LVL_N5