ESP8266 WiFi信号强度

时间:2016-05-28 17:37:08

标签: wifi arduino-uno at-command esp8266

如何在esp8266中使用AT + CWLAP来获得wifi信号强度?我希望获得串行监视器上显示的信号强度,并在我的arduino IDE代码中使用它!

1 个答案:

答案 0 :(得分:0)

发送AT + CWLAP命令后,ESP8266将回答所有可用AP的列表。

响应的格式如下:

+CWLAP:<ecn>,<ssid>,<rssi>,<mac>,<freq offset,<freq calibration>

其中:

<ecn>: indicates the security level, from 0 (OPEN) to 4 (Maximum security level)

<ssid>: it's the ssid of the AP

<rssi>: it's the signal strength, which is indicated in decibel format (e.g. -70)

<mac>: it's the MAC address

<ch>: channel

<freq offset>: ut's the frequency offset of AP,unit:KHz.

<freq calibration>: it's the calibration for frequency offset

因此,<rssi>参数是您感兴趣的。

也许,根据ESP8266的固件版本,AT + CWLAP命令可能会返回不同数量的参数,例如省略最后四个参数。