ESP32 Smartconfig

来自Jack's Lab
跳转到: 导航, 搜索

目录

1 Overview

Quantum-7-1024.jpg



2 Quick Start

In Linux:

2.1 Install ESP-IDF

$ sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial
$ wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-59.tar.gz
$ mkdir -p toolchain
$ tar zxf xtensa-esp32-elf-linux32-1.22.0-59.tar.gz -C toolchain
$ export PATH=$PATH:`pwd`/toolchain/xtensa-esp32-elf/bin
$
$ git clone --recursive git://github.com/icamgo/esp-idf.git
$ export IDF_PATH=`pwd`/esp-idf



2.2 Compile & Upload

$ cd esp-idf/examples/07_smartconfig
$ make menuconfig
$ make flash



2.3 Test Smartconfig

Make sure that your phone is connected to your WiFi router.

Scan the QR code in WeChat


Maike-wifi-ctrl-2233-all-en.jpg


Coming to below page:

MK-Noduino-MJYUN-NFF-1.jpg


Click "Connecting Network" button:

MK-Noduino-MJYUN-NFF-2-en.jpg


Enter WiFi password then click "Connect" to complete WiFi connection. (NOTE, this network connection model only apply to 2.4G router)


The uart will output:

$ picocom -b 115200 /dev/ttyUSB2

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
......
......
Welcome to Noduino Quantum
Smartconfig is comming... 
SC version: V2.6.2
[sc_system_init_done,466]
[sc_wifi_scan_done,297] STATUS:0
[sc_system_init_done,466]
[sc_wifi_scan_done,297] STATUS:0
ic_enable_sniffer
[sc_wifi_scan_done,435] STATUS:0
SC_STATUS_FIND_CHANNEL
TYPE: AIRKISS
T|PHONE MAC: 38 48 40 22 33 70
T|AP MAC   : e0 46 90 28 32 09
SC_STATUS_GETTING_SSID_PSWD
SC_TYPE:SC_TYPE_AIRKISS
T|pswd : 999111000
T|ssid : BaiHeSmartYard
ic_disable_sniffer
SC_STATUS_LINK
n:6 0, o:1 0, ap:255 255, sta:6 0, prof:1
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0

connected with GAGA-comcat, channel 6
I (54376) event: ip: 192.168.10.141, mask: 255.255.255.0, gw: 192.168.10.1
SC_STATUS_LINK_OVER



3 Reference

For more information please refer to













个人工具
名字空间

变换
操作
导航
工具箱