71 lines
3.5 KiB
Markdown
71 lines
3.5 KiB
Markdown
# WiFi
|
||
|
||
## 模块介绍
|
||
<el-divider></el-divider>
|
||
|
||
### ESP8266
|
||
<div style="display: flex;justify-content: center;align-items: center;">
|
||
<img src = "./imagesrc/esp8266.jpg" alt="esp8266" width =50% max-width= 50% >
|
||
</br>
|
||
</div>
|
||
|
||
ESP8266芯片是一款串口转无线模芯片,内部自带固件,用户操作简单,无需编写时序信号等。</br>
|
||
|
||
#### ESP8266 特性:
|
||
* 802.11 b/g/n
|
||
* 内置低功耗32位CPU:可以兼作应用处理器
|
||
* 内置10 bit高精度ADC
|
||
* 内置TCP/IP协议栈
|
||
* 内置TR开关、balun、LNA、功率放大器和匹配网络
|
||
* 内置PLL、稳压器和电源管理组件
|
||
* 支持天线分集
|
||
* STBC、1x1 MIMO、2x1 MIMO
|
||
* A-MPDU、A-MSDU的聚合和0.4 s的保护间隔
|
||
* WiFi @ 2.4 GHz,支持 WPA/WPA2 安全模式
|
||
* 支持STA/AP/STA+AP工作模式
|
||
* 支持Smart Config功能(包括Android和iOS设备)
|
||
* SDIO 2.0、(H) SPI、UART、I2C、I2S、IR Remote Control、PWM、GPIO
|
||
* 深度睡眠保持电流为10 uA,关断电流小于5 uA
|
||
* 2 ms之内唤醒、连接并传递数据包
|
||
* 802.11b模式下+20 dBm的输出功率
|
||
* 待机状态消耗功率小于1.0 mW (DTIM3)
|
||
* 工作温度范围:-40°C - 125°C
|
||
* 通过 FCC, CE, TELEC, WiFi Alliance 及 SRRC 认证
|
||
|
||
## 软件结构
|
||
<div style="display: flex;justify-content: center;align-items: center;">
|
||
<img src = "./imagesrc/esp8266_swstruct.png" alt="esp8266 software structure" width =40% max-width= 40% >
|
||
</br>
|
||
</div>
|
||
|
||
软件结构如上图,故测试WiFi的时候需要添加 **AT protocol** 和**Mqtt**
|
||
|
||
## 模块配置和代码树
|
||
[\*] Enable Wifi ---></br>
|
||
    --- Enable Wifi</br>
|
||
    [\*] Espressif ESP8266 ---> (里面的默认设置就可以使用,无需修改)</br>
|
||
        --- Espressif ESP8266</br>
|
||
        [ ] Enable initialize by thread</br>
|
||
        [\*] **Enable sample(模块注册测试程序, 选定后会再启动时自动加载模块)**</br>
|
||
        (xiaoshanos) WIFI ssid </br>
|
||
        (12345678) WIFI password</br>
|
||
        (uart2) AT client device name </br>
|
||
        (512) The maximum length of receive line buffer</br></br>
|
||
|
||
[\*] Enable AT protocol ---> (里面的默认设置就可以使用,无需修改)</br>
|
||
    --- Enable AT protocol</br>
|
||
    Socket abstraction layer --->(里面的默认设置就可用,无需修改)</br>
|
||
    Network interface device --->(里面的默认设置就可用,无需修改)</br>
|
||
    AT commands ---> (里面的默认设置就可用,无需修改,但可添加调试信息)</br></br>
|
||
[\*] Enable AT commands</br>
|
||
    **[ ]Enable debug log output(simple)** </br>
|
||
    [\*]Enable AT commands client</br>
|
||
    (2) The maximum number of supported clients</br>
|
||
    [\*]Enable BSD Socket support</br>
|
||
     **[ ]Enable print RAW format communication data(complex)**</br>
|
||
    (128)The maximum length of AT Commands buffer</br></br>
|
||
[\*] Enable Mqtt --->(当需要测试mqtt时可以打开,里面的默认设置就可以使用,无需修改)</br>
|
||
|
||
<div>
|
||
<img src = "./imagesrc/esp8266_CodeTree.png" alt="esp8266_CodeTree" width =300 >
|
||
</div> |