ESP8266 SmartConfig

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(概述)
(快速尝试)
第40行: 第40行:
  
 
<br><br>
 
<br><br>
 +
 +
== 串口输出 ==
 +
 +
<source lang=bash>
 +
scandone
 +
f r0, scandone
 +
SC_STATUS_FIND_CHANNEL
 +
 +
TYPE: AIRKISS
 +
T|sniffer on ch:8
 +
T|PHONE MAC: 38 48 4c 69 33 75
 +
T|AP MAC  : e0 46 9a 8b 34 4e
 +
T|Head Len : 74
 +
 +
SC_STATUS_GETTING_SSID_PSWD
 +
SC_TYPE:SC_TYPE_AIRKISS
 +
T|sync:wait
 +
T|retain data: 2
 +
T|all data: 22
 +
 +
T|sync:mgc end
 +
T|ssid len 11
 +
T|SSID: GAGA-comcat
 +
T|SCAN CRC SSID: 1
 +
T|index:2, remain:3
 +
T|password len: 10
 +
T|sync:pfx end
 +
T|seq:0
 +
T|seq:1
 +
T|seq:2
 +
T|pswd : 9510189510
 +
T|ssid : MaiKeLab-K1
 +
SC_STATUS_LINK
 +
Store the ssid and password into flash
 +
f r0, scandone
 +
state: 0 -> 2 (b0)
 +
state: 2 -> 3 (0)
 +
state: 3 -> 5 (10)
 +
add 0
 +
aid 9
 +
 +
connected with MaiKeLab-K1, channel 8
 +
dhcp client start...
 +
cnt
 +
ip:192.168.13.62,mask:255.255.255.0,gw:192.168.13.1
 +
SC_STATUS_LINK_OVER
 +
free heap size:50496
 +
pm open phy_2,type:2 0 0
 +
</source>
 +
 
<br><br>
 
<br><br>
 
<br><br>
 
<br><br>

2015年11月12日 (四) 16:53的版本

1 概述

所谓 SmartConfig 就是乐鑫(ESP8266 芯片厂家)为配置 WiFi SSID 和 Password 提供了一种快速配置技术

原有配置 WiFi 步骤:

  • 手机先从无线路由断开,连上设备的 WiFi 热点
  • 在 APP / WeChat 里输入设备需要连接的无线路由的 SSID 和 Password


SmartConfig 将其过程简化为无须断连无线路由,直接在 微信/APP 里输入 Password 即可,步骤大大简化,用户体验提升明显



2 快速尝试

下载 SDK:

# clone the whole sdk
$ git clone git://github.com/icamgo/noduino-sdk.git noduino-sdk

# fetch the toolchain of esp8266
$ cd noduino-sdk
$ git submodule init
$ git submodule update
$ cd toolchain
$ ./gen.py
# generate the toolchain (you need Python 2.7)


插上开发板,编译上传一步完成:

$ cd ../example/smart-config

$ make flash



3 串口输出

scandone
f r0, scandone
SC_STATUS_FIND_CHANNEL

TYPE: AIRKISS
T|sniffer on ch:8
T|PHONE MAC: 38 48 4c 69 33 75
T|AP MAC   : e0 46 9a 8b 34 4e
T|Head Len : 74

SC_STATUS_GETTING_SSID_PSWD
SC_TYPE:SC_TYPE_AIRKISS
T|sync:wait
T|retain data: 2
T|all data: 22

T|sync:mgc end
T|ssid len 11
T|SSID: GAGA-comcat
T|SCAN CRC SSID: 1
T|index:2, remain:3
T|password len: 10
T|sync:pfx end
T|seq:0
T|seq:1
T|seq:2
T|pswd : 9510189510
T|ssid : MaiKeLab-K1
SC_STATUS_LINK
Store the ssid and password into flash
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 9

connected with MaiKeLab-K1, channel 8
dhcp client start...
cnt 
ip:192.168.13.62,mask:255.255.255.0,gw:192.168.13.1
SC_STATUS_LINK_OVER
free heap size:50496
pm open phy_2,type:2 0 0



















个人工具
名字空间

变换
操作
导航
工具箱