当前位置:网站首页>Esp32 stores the distribution network information +led displays the distribution network status + press the key to clear the distribution network information (source code attached)
Esp32 stores the distribution network information +led displays the distribution network status + press the key to clear the distribution network information (source code attached)
2022-07-02 11:44:00 【hwd00001】
List of articles
- 1. Nonvolatile Repository (NVS)( Copy the contents of knowledge points Diye article )
- 2. increase LED Indicates the status and key redistribution
- 3. Will store 、LED、 Keys integrated into smart_config Routine
- 4. The hardware of this example IO explain
- 5. After clearing the distribution network information, redistribute log Information
This article refers to the masterpieces of many netizens ,
1. Diye 《ESP32 Store distribution network information , Power on and restart can automatically reconnect the previously configured wireless network 》, Describe nonvolatile storage in detail (NVS) Operation process of .
2.Mr_VitaminC 《ESP32-C3 wifi Wechat distribution network + Press the key to clear +LED state 》
The complete code of this article :
link :https://pan.baidu.com/s/1AoM0qvQTV_527_pJ9oNNXg?pwd=mafo
Extraction code :mafo
Code cloud :https://gitee.com/huangweide001/esp32_test/tree/master/smart_config
csdn download
1. Nonvolatile Repository (NVS)( Copy the contents of knowledge points Diye article )
Nonvolatile storage (NVS) The library is mainly used in flash Store data in key value format .NVS Best for storing smaller data , Not string or binary large objects (BLOB) And so on . To store large BLOB Or string , Consider using... Based on wear equalization library FAT file system .
We mainly understand the following NVS Use of interfaces ,NVS The interface is similar to operating files on a computer :
- initialization
call “nvs_flash_init();”, If it fails, call “nvs_flash_erase()” erase NVS, Then initialize again .
- Open a watch
First declare the handle :“nvs_handle my_handle; ”. Then read and write the key values in the table , You need to enter the handle of the table where the key value is .
nvs_open(“List”, NVS_READWRITE, &my_handle);
This API The first parameter is a string , It can be called table name . The second is the mode of reading and writing , Optional read-write or read-only , The third is the handle to the currently open table .
- Read and write the table
read :nvs_get_i8(my_handle, “nvs_i8”, &nvs_i8);
Reading and writing different data types need to call different API, Allied API Yes :“nvs_get_i16”,“nvs_get_u32” wait
Formal aspect , The first is the handle to the table , The second is the key value , The third is the pointer to the corresponding variable , Such as “nvs_i8” It's a “int8_t” Variable of type .
Write :nvs_set_i8(my_handle, “nvs_i8”, nvs_i8);
It's almost like reading , Note that the third parameter becomes the corresponding variable , Instead of pointers to variables .
- Submit and close documents
Submit ( preservation ):nvs_commit(my_handle);
close :nvs_close(my_handle);
The specific operation process of reading and writing files
How to write a file
Open file (nvs_open), Writing documents (nvs_set_xxx), Save the file (nvs_commit), Close file (nvs_close)
Read file operation
Open file (nvs_open), Read the file (nvs_get_xxx), Close file (nvs_close)
The official website provides detailed explanations in Chinese , Please click on [ Nonvolatile storage (NVS)] see !
---------------------------------- Copying is over ---------------------------------------------
I save and read here ID and password Use the following function , Binary block read / write .
esp_err_t nvs_set_blob(nvs_handle_t handle, const char* key, const void* value, size_t length);
esp_err_t nvs_get_blob(nvs_handle_t handle, const char* key, void* out_value, size_t* length);
Let's see. wifi The structure of distribution network information ( What we need is the front 96 Bytes ):
typedef struct {
uint8_t ssid[32]; /**< SSID of target AP. */
uint8_t password[64]; /**< Password of target AP. */
wifi_scan_method_t scan_method; /**< do all channel scan or fast scan */
......
} wifi_sta_config_t;
On the basis of Di ye, it is modified to 3 An independent function ( Detailed comments are made in the code ):
typedef enum {
wifi_unconfiged = 0,
wifi_configed = 0xAA,
}wifi_info_storage_t;
#define ID_AND_PWD_LEN (32+64)
/********************************************** * * Function name :clearWifiConfigFlag * * Function description : Clear the distribution mark , If you run this function , Can cooperate with esp_restart(), Reset the system . Redistribution * * -- Mainly to replace nvs_flash_erase() function , This function erases all data , It is not right . * *******************************************/
void clearWifiConfigFlag(void)
{
nvs_handle my_handle;
// 0. open
nvs_open("WIFI_CONFIG", NVS_READWRITE, &my_handle);
// 1. Write mark 0x00, Clear the distribution mark
nvs_set_u8(my_handle, "WifiConfigFlag", wifi_unconfiged);
// 2. Submit And save the contents of the table
ESP_ERROR_CHECK(nvs_commit(my_handle));
// 3. close nvs sign out
nvs_close(my_handle);
}
// preservation wifi Configuration parameter structure variable wifi_config To nvs
static void saveWifiConfig(wifi_config_t *wifi_config)
{
nvs_handle my_handle;
// 0. open
nvs_open("WIFI_CONFIG", NVS_READWRITE, &my_handle);
// 1. Write mark 0xaa, Indicates that the network has been configured
nvs_set_u8(my_handle, "WifiConfigFlag", wifi_configed);
// 2. write in AP ID and AP password
ESP_ERROR_CHECK(nvs_set_blob(my_handle, "wifi_config", wifi_config, ID_AND_PWD_LEN));
// 3. Submit And save the contents of the table
ESP_ERROR_CHECK(nvs_commit(my_handle));
// 4. close nvs sign out
nvs_close(my_handle);
}
// from nvs Read from wifi Configure to a given sta_config Structural variable
static esp_err_t readWifiConfig(wifi_config_t *sta_config)
{
nvs_handle my_handle;
unsigned char u8WifiConfigVal;
// 0. open
nvs_open("WIFI_CONFIG", NVS_READWRITE, &my_handle);
// 1. Read flag bit , And decide
nvs_get_u8(my_handle, "WifiConfigFlag", &u8WifiConfigVal);
if(u8WifiConfigVal != wifi_configed){
// 1.1 No network , close nvs, Return error code
ESP_LOGI(TAG, "no wifi config,read fail!");
nvs_close(my_handle);
return ESP_FAIL;
}else{
// 1.2 Go to the next step
ESP_LOGI(TAG, "wifi configed ,read ok!");
}
// 2. Read the last distribution network ID,password
uint32_t len = ID_AND_PWD_LEN;
esp_err_t err = nvs_get_blob(my_handle, "wifi_config", sta_config, &len);
ESP_LOGI(TAG, "readout SSID:%s", sta_config->sta.ssid);
ESP_LOGI(TAG, "readout PASSWORD:%s", sta_config->sta.password);
// 3. close nvs sign out
nvs_close(my_handle);
return err;
}
2. increase LED Indicates the status and key redistribution
The content of these two netizens is similar , Anyway, the world's articles are copied , I don't know if heroes think alike .
2.1LED Indicates the status of networking
State the following :
- Waiting for distribution network ,1Hz flashing ;
- Distributing network ,5Hz flashing ;
- The distribution network is completed , Changliang .
The principle is to use timer interrupt , Change the state of the lamp every time you interrupt :
1、 Waiting for the distribution network , Timer 500ms Break once ;
2、 While distributing the network , Timer 100ms Break once ;
3、 The distribution network is completed , Delete timer ,LED Changliang .
The following code is mainly copied from Mr_VitaminC:
//--------------- smartconfig_led.c ---------------//
#define WIFI_STATUS_LED_GPIO 2
static const char* TAG = "WIFI_STATUS_LED";
static esp_timer_handle_t smartconfig_led_soft_timer;
// The light flashes in the timer callback
static void periodled_timer_callback(void* arg)
{
static uint8_t s_LEDToggle = 0;
s_LEDToggle = ~s_LEDToggle;
if(s_LEDToggle)
{
gpio_set_level(WIFI_STATUS_LED_GPIO, 0);
}
else
{
gpio_set_level(WIFI_STATUS_LED_GPIO, 1);
}
}
static void handle_smartconfig_led_status(Wifi_Status_t WifiState)
{
static uint8_t s_WifiDisconnectNotice;
switch(WifiState)
{
case WIFI_DISCONNECT:
// Create and start the software timer without connecting to the Internet , And make sure to create it only once , Otherwise, it will report a mistake
if(s_WifiDisconnectNotice == 0)
{
esp_timer_create_args_t periodled_timer_args = {
.callback = &periodled_timer_callback,
/* name is optional, but may help identify the timer when debugging */
.name = "periodled"
};
ESP_ERROR_CHECK(esp_timer_create(&periodled_timer_args, &smartconfig_led_soft_timer));
ESP_ERROR_CHECK(esp_timer_start_periodic(smartconfig_led_soft_timer, ConnectStatusInterval));
s_WifiDisconnectNotice = 1;
}
break;
case WIFI_CONNECTING:
// When networking LED Flash
if(s_WifiDisconnectNotice == 1)
{
ESP_ERROR_CHECK(esp_timer_stop(smartconfig_led_soft_timer));
}
ESP_LOGI(TAG,"Delegate wifi is connecting\n");
ESP_ERROR_CHECK(esp_timer_start_periodic(smartconfig_led_soft_timer, DisconnectStatusInterval));
break;
case WIFI_CONNECTED:
// After connecting to the Internet LED Changliang , And log off the software timer , Reduce consumption
gpio_set_level(WIFI_STATUS_LED_GPIO, 1);
if(s_WifiDisconnectNotice == 1)
{
ESP_ERROR_CHECK(esp_timer_stop(smartconfig_led_soft_timer));
ESP_ERROR_CHECK(esp_timer_delete(smartconfig_led_soft_timer));
s_WifiDisconnectNotice = 0;
}
ESP_LOGI(TAG,"Delegate wifi is connected\n");
break;
default:
break;
}
}
//LED Pin initialization
void wifi_status_led_init(void)
{
gpio_config_t smartconfig_IO_conf;
smartconfig_IO_conf.intr_type = GPIO_PIN_INTR_DISABLE;
smartconfig_IO_conf.mode = GPIO_MODE_OUTPUT;
smartconfig_IO_conf.pin_bit_mask = 1 << WIFI_STATUS_LED_GPIO;
smartconfig_IO_conf.pull_down_en = 0;
smartconfig_IO_conf.pull_up_en = 0;
gpio_config(&smartconfig_IO_conf);
gpio_set_level(WIFI_STATUS_LED_GPIO, 1);
delegate_wifi_disconnect_status();
}
// Notify that the network is not connected
void delegate_wifi_disconnect_status(void)
{
ESP_LOGI(TAG,"Delegate wifi is disconnect\n");
handle_smartconfig_led_status(WIFI_DISCONNECT);
}
// Notify that the network is connected
void delegate_wifi_connected_status(void)
{
ESP_LOGI(TAG,"Delegate wifi has connected\n");
handle_smartconfig_led_status(WIFI_CONNECTED);
}
// Notify that the network is connecting
void delegate_wifi_connecting_status(void)
{
ESP_LOGI(TAG,"Delegate wifi is connecting\n");
handle_smartconfig_led_status(WIFI_CONNECTING);
}
<smartconfig_led.h>
//--------------- smartconfig_led.h ---------------//
#ifndef __SMARTCONFIG_LED_H__
#define __SMARTCONFIG_LED_H__
#ifdef __cplusplus
extern "C" {
#endif
#define ConnectStatusInterval 1000000 // Unit is us
#define DisconnectStatusInterval 100000
typedef enum{
WIFI_DISCONNECT = 1,
WIFI_CONNECTING,
WIFI_CONNECTED,
}Wifi_Status_t;
void smartconfig_button_init();
void wifi_status_led_init(void);
void delegate_wifi_disconnect_status(void);
void delegate_wifi_connected_status(void);
void delegate_wifi_connecting_status(void);
void clearWifiConfigFlag(void);
#ifdef __cplusplus
}
#endif
#endif
2.2 Press the key to clear the distribution network information , And restart the system , Distribution network again
If there is no network , When powered on, it will enter the automatic distribution network ; If the network has been configured , another wifi Environmental Science , Need to redistribute the network , You can perform this operation .
The specific process is :
- Press and hold the key for more than 1 second , Release the button ;
- Clear the distribution mark ,clearWifiConfigFlag();
- Restart the system ,esp_restart();
The following code is mainly copied from Mr_VitaminC:
typedef enum {
KEY_SHORT_PRESS = 1,
KEY_LONG_PRESS =2,
} alink_key_t;
#define GPIO_LED_IO 2
#define GPIO_LED_PIN_SEL 1ULL<<GPIO_LED_IO
#define GPIO_KEY_IO 0
#define GPIO_KEY_PIN_SEL 1ULL<<GPIO_KEY_IO
static const char *TAG = "smartconfig_example";
static xQueueHandle gpio_evt_queue = NULL;
// Get system time
static int64_t get_time(){
struct timeval tv_now;
gettimeofday(&tv_now, NULL);
int64_t time_us = (int64_t)tv_now.tv_sec * 1000000L + (int64_t)tv_now.tv_usec;
return time_us;
}
// Key interrupt handling function
static void IRAM_ATTR gpio_isr_handler(void* arg)
{
uint32_t gpio_num = (uint32_t) arg;
xQueueSendFromISR(gpio_evt_queue, &gpio_num, NULL);
}
// Task processing
static void led_task(void* arg)
{
uint32_t io_num;
BaseType_t press_key = pdFALSE;
BaseType_t lift_key = pdFALSE;
int backup_time = 0;
for(;;) {
if(xQueueReceive(gpio_evt_queue, &io_num, portMAX_DELAY)) {
// printf("GPIO[%d] intr, val: %d\n", io_num, gpio_get_level(io_num));
// Record the time when the user pressed the key
if (gpio_get_level(io_num) == 0) {
press_key = pdTRUE;
backup_time = get_time();
// If at present GPIO The level of the port has been recorded as pressing , Then start subtracting the time point when the key was last pressed
} else if (press_key) {
// Record the lifting time
lift_key = pdTRUE;
backup_time = get_time() - backup_time;
}
// Press the flag bit and press the key to pop up the flag bit 1 When
if (press_key & lift_key) {
press_key = pdFALSE;
lift_key = pdFALSE;
// Greater than 1 Seconds is long press
if (backup_time > 1000000) {
printf(" Long press ... \r\n");
// Press and hold the key , Clear the distribution network information and restart
clearWifiConfigFlag();
//ESP_ERROR_CHECK(nvs_flash_erase()); There is no need to clear all the data here
ESP_LOGI(TAG,"Set Restart now.\n");
esp_restart();
} else {
printf(" Short press ... \r\n");
}
}
}
}
}
void smartconfig_button_init(void)
{
// Key interrupt configuration
gpio_config_t io_conf;
io_conf.intr_type = GPIO_INTR_ANYEDGE;
io_conf.pin_bit_mask = GPIO_KEY_PIN_SEL;
io_conf.mode = GPIO_MODE_INPUT;
io_conf.pull_up_en = 1;
gpio_config(&io_conf);
// Create a message queue to handle pin interrupt events
gpio_evt_queue = xQueueCreate(10, sizeof(uint32_t));
// Create tasks
xTaskCreate(led_task, "led_task", 2048, NULL, 10, NULL);
// The first processor core installs interrupt handlers
gpio_install_isr_service(0);
// Add interrupt handling function
gpio_isr_handler_add(GPIO_KEY_IO, gpio_isr_handler, (void*) GPIO_KEY_IO);
printf("Minimum free heap size: %d bytes\n", esp_get_minimum_free_heap_size());
}
3. Will store 、LED、 Keys integrated into smart_config Routine
The official routine is not saved ID and password, Enter the intelligent distribution network as soon as it is powered on ; Now we have the function of saving , When the power is on , Determine whether you need to enter the intelligent distribution network :
static void initialise_wifi(void)
{
......
if(ESP_OK == readWifiConfig(&wifi_config))
{
// 1. The network has been configured , Directly AP
wifi_config.sta .threshold.authmode = WIFI_AUTH_WPA2_PSK;
/* Set up WiFi The working mode of the system is STA */
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
/* Set up WiFi Connection parameters , Mainly ssid and password */
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config));
/* start-up WIFI The driver */
ESP_ERROR_CHECK(esp_wifi_start());
/* start-up WiFi Connect to AP*/
ESP_ERROR_CHECK(esp_wifi_connect());
} else {
// 2. No network , Enter the intelligent distribution network
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
ESP_ERROR_CHECK( esp_wifi_start() );
xTaskCreate(smartconfig_example_task, "smartconfig_example_task", 4096, NULL, 3, NULL);
}
}
stay wifi In the event mechanism of ,esp_wifi_start() It will trigger a WIFI_EVENT_STA_START event , Then create smartconfig_example_task Mission ; Because we have distributed the network , There are also calls esp_wifi_start(), But at this time, you cannot enter the intelligent distribution network , So delete this part of the code .
LED The code of state change is described in the comments .
static void event_handler(void* arg, esp_event_base_t event_base,
int32_t event_id, void* event_data)
{
// if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
// xTaskCreate(smartconfig_example_task, "smartconfig_example_task", 4096, NULL, 3, NULL);
// } else
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
esp_wifi_connect();
xEventGroupClearBits(s_wifi_event_group, CONNECTED_BIT);
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
// 1. Successful connection ,LED Changliang
xEventGroupSetBits(s_wifi_event_group, CONNECTED_BIT);
delegate_wifi_connected_status();
} else if (event_base == SC_EVENT && event_id == SC_EVENT_SCAN_DONE) {
ESP_LOGI(TAG, "Scan done");
} else if (event_base == SC_EVENT && event_id == SC_EVENT_FOUND_CHANNEL) {
// 2. Ready to connect ,LED With 5Hz flashing
ESP_LOGI(TAG, "Found channel");
delegate_wifi_connecting_status();
} else if (event_base == SC_EVENT && event_id == SC_EVENT_GOT_SSID_PSWD) {
ESP_LOGI(TAG, "Got SSID and password");
//wifi_config_t wifi_config;
smartconfig_event_got_ssid_pswd_t *evt = (smartconfig_event_got_ssid_pswd_t *)event_data;
uint8_t ssid[33] = {
0 };
uint8_t password[65] = {
0 };
uint8_t rvd_data[33] = {
0 };
bzero(&wifi_config, sizeof(wifi_config_t));
memcpy(wifi_config.sta.ssid, evt->ssid, sizeof(wifi_config.sta.ssid));
memcpy(wifi_config.sta.password, evt->password, sizeof(wifi_config.sta.password));
wifi_config.sta.bssid_set = evt->bssid_set;
if (wifi_config.sta.bssid_set == true) {
memcpy(wifi_config.sta.bssid, evt->bssid, sizeof(wifi_config.sta.bssid));
}
memcpy(ssid, evt->ssid, sizeof(evt->ssid));
memcpy(password, evt->password, sizeof(evt->password));
ESP_LOGI(TAG, "SSID:%s", ssid);
ESP_LOGI(TAG, "PASSWORD:%s", password);
if (evt->type == SC_TYPE_ESPTOUCH_V2) {
ESP_ERROR_CHECK( esp_smartconfig_get_rvd_data(rvd_data, sizeof(rvd_data)) );
ESP_LOGI(TAG, "RVD_DATA:");
for (int i=0; i<33; i++) {
printf("%02x ", rvd_data[i]);
}
printf("\n");
}
ESP_ERROR_CHECK( esp_wifi_disconnect() );
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) );
esp_wifi_connect();
// 3. Run here , It can be saved id,password. But if the password is wrong , Still not connected to the Internet .
saveWifiConfig(&wifi_config);
} else if (event_base == SC_EVENT && event_id == SC_EVENT_SEND_ACK_DONE) {
xEventGroupSetBits(s_wifi_event_group, ESPTOUCH_DONE_BIT);
}
}
4. The hardware of this example IO explain
LED – IO2
Key – IO0
5. After clearing the distribution network information, redistribute log Information
L2: The first 2 That's ok , Receive the message of releasing after long pressing the key , Clear the distribution network and restart ;
L69: The first 69 That's ok , Enter the main function ,LED With 1Hz flashing ;
L96: The first 96 That's ok , In function readWifiConfig It is judged that there is no distribution network information , To redistribute the network ;
L111-L113: The first 111,112,113 That's ok , Start to receive the information of distribution network software , Prepare the distribution network ,LED With 5Hz flashing ;
L141,L142: The first 141,142 That's ok , obtain ip Address success , Indicates that the distribution network is successful ,LED Changliang .
[0;32mI (48953) smartconfig_example: Set Restart now.
[0m
I (48953) wifi:state: run -> init (0)
I (48953) wifi:pm stop, total sleep time: 24157576 us / 25528420 us
I (48953) wifi:new:<11,0>, old:<11,0>, ap:<255,255>, sta:<11,0>, prof:1
W (48963) wifi:hmac tx: ifx0 stop, discard
I (48993) wifi:flush txq
I (48993) wifi:stop sw txq
I (48993) wifi:lmac stop hw txq
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6608
load:0x40078000,len:14788
ho 0 tail 12 room 4
load:0x40080400,len:3792
entry 0x40080694
[0;32mI (29) boot: ESP-IDF v4.4.1 2nd stage bootloader[0m
[0;32mI (29) boot: compile time 08:42:02[0m
[0;32mI (29) boot: chip revision: 1[0m
[0;32mI (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0[0m
[0;32mI (39) boot.esp32: SPI Speed : 40MHz[0m
[0;32mI (43) boot.esp32: SPI Mode : DIO[0m
[0;32mI (48) boot.esp32: SPI Flash Size : 4MB[0m
[0;32mI (52) boot: Enabling RNG early entropy source...[0m
[0;32mI (58) boot: Partition Table:[0m
[0;32mI (61) boot: ## Label Usage Type ST Offset Length[0m
[0;32mI (69) boot: 0 nvs WiFi data 01 02 00009000 00006000[0m
[0;32mI (76) boot: 1 phy_init RF data 01 01 0000f000 00001000[0m
[0;32mI (84) boot: 2 factory factory app 00 00 00010000 00100000[0m
[0;32mI (91) boot: End of partition table[0m
[0;32mI (95) boot_comm: chip revision: 1, min. application chip revision: 0[0m
[0;32mI (102) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=16230h ( 90672) map[0m
[0;32mI (144) esp_image: segment 1: paddr=00026258 vaddr=3ffb0000 size=0385ch ( 14428) load[0m
[0;32mI (150) esp_image: segment 2: paddr=00029abc vaddr=40080000 size=0655ch ( 25948) load[0m
[0;32mI (161) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=79d8ch (499084) map[0m
[08:01:39.132] closed ←◆[0;32mI (342) esp_image: segment 4: paddr=000a9db4 vaddr=4008655c size=0df44h ( 57156) load[0m
[0;32mI (365) esp_image: segment 5: paddr=000b7d00 vaddr=50000000 size=00010h ( 16) load[0m
[0;32mI (375) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (376) boot: Disabling RNG early entropy source...[0m
[0;32mI (388) cpu_start: Pro cpu up.[0m
[0;32mI (388) cpu_start: Starting app cpu, entry point is 0x40081190[0m
[0;32mI (374) cpu_start: App cpu up.[0m
[0;32mI (402) cpu_start: Pro cpu start user code[0m
[0;32mI (402) cpu_start: cpu freq: 160000000[0m
[0;32mI (402) cpu_start: Application information:[0m
[0;32mI (407) cpu_start: Project name: smart_config[0m
[0;32mI (412) cpu_start: App version: 1[0m
[0;32mI (416) cpu_start: Compile time: Jun 28 2022 08:41:40[0m
[0;32mI (423) cpu_start: ELF file SHA256: 932de1cf28244c8c...[0m
[0;32mI (429) cpu_start: ESP-IDF: v4.4.1[0m
[0;32mI (434) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (441) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
[0;32mI (447) heap_init: At 3FFB77A8 len 00028858 (162 KiB): DRAM[0m
[0;32mI (453) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
[0;32mI (459) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
[0;32mI (466) heap_init: At 400944A0 len 0000BB60 (46 KiB): IRAM[0m
[0;32mI (473) spi_flash: detected chip: generic[0m
[0;32mI (477) spi_flash: flash io: dio[0m
[0;32mI (482) cpu_start: Starting scheduler on PRO CPU.[0m
[0;32mI (0) cpu_start: Starting scheduler on APP CPU.[0m
[0;32mI (551) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [0m
[0;32mI (551) WIFI_STATUS_LED: Delegate wifi is disconnect
[0m
[0;32mI (561) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 [0m
Minimum free heap size: 271476 bytes
I (581) wifi:wifi driver task: 3ffc106c, prio:23, stack:6656, core=0
[0;32mI (581) system_api: Base MAC address is not set[0m
[0;32mI (581) system_api: read default base MAC address from EFUSE[0m
I (601) wifi:wifi firmware version: 63017e0
I (601) wifi:wifi certification version: v7.0
I (601) wifi:config NVS flash: enabled
I (601) wifi:config nano formating: disabled
I (611) wifi:Init data frame dynamic rx buffer num: 32
I (611) wifi:Init management frame dynamic rx buffer num: 32
I (621) wifi:Init management short buffer num: 32
I (621) wifi:Init dynamic tx buffer num: 32
I (621) wifi:Init static rx buffer size: 1600
I (631) wifi:Init static rx buffer num: 10
I (631) wifi:Init dynamic rx buffer num: 32
[0;32mI (641) wifi_init: rx ba win: 6[0m
[0;32mI (641) wifi_init: tcpip mbox: 32[0m
[0;32mI (641) wifi_init: udp mbox: 6[0m
[0;32mI (651) wifi_init: tcp mbox: 6[0m
[0;32mI (651) wifi_init: tcp tx win: 5744[0m
[0;32mI (661) wifi_init: tcp rx win: 5744[0m
[0;32mI (661) wifi_init: tcp mss: 1440[0m
[0;32mI (661) wifi_init: WiFi IRAM OP enabled[0m
[0;32mI (671) wifi_init: WiFi RX IRAM OP enabled[0m
[0;32mI (671) smartconfig_example: no wifi config,read fail![0m
[0;32mI (681) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07[0m
[08:01:39.558] closed ←◆I (791) wifi:mode : sta (94:b9:7e:d5:42:cc)
I (801) wifi:enable tsf
[08:01:39.607] closed ←◆I (851) smartconfig: SC version: V3.0.1
[08:01:43.708] closed ←◆I (4941) wifi:ic_enable_sniffer
I (4951) smartconfig: Start to find channel...
[0;32mI (4951) smartconfig_example: Scan done[0m
[08:11:15.848] closed ←◆I (576991) smartconfig: TYPE: AIRKISS
I (576991) smartconfig: T|PHONE MAC: c4:06:83:49:a5:da
I (576991) smartconfig: T|AP MAC:06:ca:18:76:50:77
I (576991) smartconfig: Found channel on 11-0. Start to get ssid and password...
[0;32mI (577001) smartconfig_example: Found channel[0m
[0;32mI (577001) WIFI_STATUS_LED: Delegate wifi is connecting
[0m
[0;32mI (577011) WIFI_STATUS_LED: Delegate wifi is connecting
[0m
[08:11:18.783] closed ←◆I (579921) smartconfig: T|pswd: 12346789
I (579921) smartconfig: T|ssid: vivohyc
I (579921) wifi:ic_disable_sniffer
[0;32mI (579921) smartconfig_example: Got SSID and password[0m
[0;32mI (579931) smartconfig_example: SSID:vivohyc[0m
[0;32mI (579931) smartconfig_example: PASSWORD:12346789[0m
[08:11:18.934] closed ←◆I (580071) wifi:new:<11,0>, old:<11,0>, ap:<255,255>, sta:<11,0>, prof:1
[08:11:20.083] closed ←◆I (581221) wifi:state: init -> auth (b0)
I (581231) wifi:state: auth -> assoc (0)
I (581251) wifi:state: assoc -> run (10)
[08:11:20.136] closed ←◆I (581271) wifi:connected with vivohyc, aid = 2, channel 11, BW20, bssid = 06:ca:18:76:50:77
I (581271) wifi:security: WPA2-PSK, phy: bgn, rssi: -46
I (581301) wifi:pm start, type: 1
I (581301) wifi:AP's beacon interval = 102400 us, DTIM period = 2
[08:11:20.928] closed ←◆[0;32mI (582071) esp_netif_handlers: sta ip: 192.168.102.174, mask: 255.255.255.0, gw: 192.168.102.137[0m
[0;32mI (582071) WIFI_STATUS_LED: Delegate wifi has connected
[0m
[0;32mI (582
[08:11:20.960] closed ←◆071) smartconfig_example: WiFi Connected to ap[0m
[0;32mI (582071) WIFI_STATUS_LED: Delegate wifi is connected
[0m
[08:11:23.940] closed ←◆[0;32mI (585081) smartconfig_example: smartconfig over[0m
边栏推荐
- The selected cells in Excel form have the selection effect of cross shading
- deepTools对ChIP-seq数据可视化
- Order by injection
- CTF record
- 念念不忘,必有回响 | 悬镜诚邀您参与OpenSCA用户有奖调研
- PYQT5+openCV项目实战:微循环仪图片、视频记录和人工对比软件(附源码)
- Writing contract test cases based on hardhat
- Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting
- mysql链表数据存储查询排序问题
- Xiao Sha's pain (double pointer
猜你喜欢

【IDEA】使用插件一键逆向生成代码

HOW TO CREATE A BEAUTIFUL INTERACTIVE HEATMAP IN R

MySQL linked list data storage query sorting problem

GGPlot Examples Best Reference

Develop scalable contracts based on hardhat and openzeppelin (II)

RPA进阶(二)Uipath应用实践

Map set assignment to database

C#多维数组的属性获取方法及操作注意

vant tabs组件选中第一个下划线位置异常

从攻击面视角,看信创零信任方案实践
随机推荐
Verilog and VHDL signed and unsigned number correlation operations
Astparser parsing class files with enum enumeration methods
Summary of data export methods in powerbi
Webauthn - official development document
Principle of scalable contract delegatecall
Homer预测motif
deepTools对ChIP-seq数据可视化
【云原生】2.5 Kubernetes 核心实战(下)
GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R
JS——每次调用从数组里面随机取一个数,且不能与上一次为同一个
C#基于当前时间,获取唯一识别号(ID)的方法
【多线程】主线程等待子线程执行完毕在执行并获取执行结果的方式记录(有注解代码无坑)
PX4 Position_ Control RC_ Remoter import
在连接mysql数据库的时候一直报错
RPA进阶(二)Uipath应用实践
原生方法合并word
bedtools使用教程
Complement (Mathematical Simulation
Cluster Analysis in R Simplified and Enhanced
Skills of PLC recorder in quickly monitoring multiple PLC bits