README.md
1 # smartconfig Example 2 3 This example shows how ESP32 connects to a target AP with ESPTOUCH. 4 5 ## How to use example 6 7 ### Hardware Required 8 9 Download ESPTOUCH APP from app store: 10 [Android source code](https://github.com/EspressifApp/EsptouchForAndroid) 11 [iOS source code](https://github.com/EspressifApp/EsptouchForIOS) is available. 12 13 ### Configure the project 14 15 ``` 16 idf.py menuconfig 17 ``` 18 19 ### Build and Flash 20 21 Build the project and flash it to the board, then run monitor tool to view serial output: 22 23 ``` 24 idf.py -p PORT flash monitor 25 ``` 26 27 (To exit the serial monitor, type ``Ctrl-]``.) 28 29 See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. 30 31 ## Example output 32 33 * Make sure your phone connect to the target AP (2.4GHz). 34 * Open ESPTOUCH app and input password. There will be success message after few sec. 35 36 Here is an example of smartconfig console output. 37 ``` 38 I (372) wifi: mode : sta (24:0a:c4:00:44:86) 39 I (422) smartconfig: SC version: V2.6.6 40 I (3802) wifi: ic_enable_sniffer 41 I (3802) sc: SC_STATUS_FIND_CHANNEL 42 I (234592) smartconfig: TYPE: ESPTOUCH 43 I (234592) smartconfig: T|PHONE MAC:68:3e:34:88:59:bf 44 I (234592) smartconfig: T|AP MAC:a4:56:02:47:30:07 45 I (234592) sc: SC_STATUS_GETTING_SSID_PSWD 46 I (239922) smartconfig: T|pswd: 123456789 47 I (239922) smartconfig: T|ssid: IOT_DEMO_TEST 48 I (239922) smartconfig: T|bssid: a4:56:02:47:30:07 49 I (239922) wifi: ic_disable_sniffer 50 I (239922) sc: SC_STATUS_LINK 51 I (239932) sc: SSID:IOT_DEMO_TEST 52 I (239932) sc: PASSWORD:123456789 53 I (240062) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1 54 I (241042) wifi: state: init -> auth (b0) 55 I (241042) wifi: state: auth -> assoc (0) 56 I (241052) wifi: state: assoc -> run (10) 57 I (241102) wifi: connected with IOT_DEMO_TEST, channel 1 58 I (244892) event: ip: 192.168.0.152, mask: 255.255.255.0, gw: 192.168.0.1 59 I (244892) sc: WiFi Connected to ap 60 I (247952) sc: SC_STATUS_LINK_OVER 61 I (247952) sc: Phone ip: 192.168.0.31 62 I (247952) sc: smartconfig over 63 ```