新手上路
- 积分
- 28
- 金钱
- 28
- 注册时间
- 2020-9-11
- 在线时间
- 7 小时
|
发表于 2020-10-3 16:25:15
|
显示全部楼层
新手有疑问,既然是配置8266为AP模式,为什么这里又要重新设置它为STA模式
- void atk_82666_STAConfig(void)
- {
- // char p[6];
- // sprintf(p,"AT+CWMODE=%d",Mode);
- atk_8266_send_cmd("AT+CWMODE=1","OK",50);
- //Wifi模块重启
- atk_8266_send_cmd("AT+RST","OK",20);
- delay_ms(1000); //延时3S等待重启成功
- delay_ms(1000);
- delay_ms(1000);
- //STA模式
- atk_8266_send_cmd("AT+CWJAP="Hero","sss666888"","OK",200);
- atk_8266_send_cmd("AT+CIPMUX=1","OK",20);
- atk_8266_send_cmd("AT+CIPSERVER=1,8086","OK",200);
-
- // atk_8266_send_cmd("AT+CIPMODE=1","OK",50); // 开启透传
- // atk_8266_send_cmd("AT+CIPSEND=0,25","OK",50);
- }
复制代码 |
|