[0;32mI (1128) cpu_start: App cpu up.[0m
[0;32mI (1141) heap_alloc_caps: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (1163) heap_alloc_caps: At 3FFAE2A0 len 00001D60 (7 KiB): DRAM[0m
[0;32mI (1184) heap_alloc_caps: At 3FFB7A88 len 00028578 (161 KiB): DRAM[0m
[0;32mI (1205) heap_alloc_caps: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM[0m
[0;32mI (1226) heap_alloc_caps: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
[0;32mI (1248) heap_alloc_caps: At 40093160 len 0000CEA0 (51 KiB): IRAM[0m
[0;32mI (1269) cpu_start: Pro cpu start user code[0m
[0;32mI (1326) cpu_start: Starting scheduler on PRO CPU.[0m
[0;32mI (1331) cpu_start: Starting scheduler on APP CPU.[0m
[0;32mI (1361) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
[0;32mI (1361) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
ESP_ERROR_CHECK failed: esp_err_t 0xb at 0x400df5e8
file: "C:/esp32-tutorial/12_accesspoint/main/main.c" line 168
func: app_main
expression: esp_wifi_set_config(WIFI_IF_AP, &ap_config)
Backtrace: 0x4008687c:0x3ffb88f0 0x40086bf9:0x3ffb8910 0x400df5e8:0x3ffb8930 0x400d08aa:0x3ffb8a00
Rebooting...
ets Jun 8 2016 00:22:57
就酱紫一直重启
最近编辑记录 coolesp32 (2017-09-29 15:05:52)
离线
// Main application
void app_main()
{
// disable the default wifi logging
esp_log_level_set("wifi", ESP_LOG_NONE);
// create the event group to handle wifi events
event_group = xEventGroupCreate();
// initialize the tcp stack
tcpip_adapter_init();
// stop DHCP server
ESP_ERROR_CHECK(tcpip_adapter_dhcps_stop(TCPIP_ADAPTER_IF_AP));
// assign a static IP to the network interface
tcpip_adapter_ip_info_t info;
memset(&info, 0, sizeof(info));
IP4_ADDR(&info.ip, 192, 168, 10, 1);
IP4_ADDR(&info.gw, 192, 168, 10, 1);
IP4_ADDR(&info.netmask, 255, 255, 255, 0);
ESP_ERROR_CHECK(tcpip_adapter_set_ip_info(TCPIP_ADAPTER_IF_AP, &info));
// start the DHCP server
ESP_ERROR_CHECK(tcpip_adapter_dhcps_start(TCPIP_ADAPTER_IF_AP));
// initialize the wifi event handler
ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL));
// initialize the wifi stack in AccessPoint mode with config in RAM
wifi_init_config_t wifi_init_config = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&wifi_init_config));
ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM));
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP));
// configure the wifi connection and start the interface
wifi_config_t ap_config = {
.ap = {
.ssid = CONFIG_AP_SSID,
.password = CONFIG_AP_PASSWORD,
.ssid_len = 0,
.channel = CONFIG_AP_CHANNEL,
.authmode = CONFIG_AP_AUTHMODE,
.ssid_hidden = CONFIG_AP_SSID_HIDDEN,
.max_connection = CONFIG_AP_MAX_CONNECTIONS,
.beacon_interval = CONFIG_AP_BEACON_INTERVAL,
},
};
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &ap_config));
// start the wifi interface
ESP_ERROR_CHECK(esp_wifi_start());
printf("Starting access point, SSID=%s\n", CONFIG_AP_SSID);
// start the main task
xTaskCreate(&monitor_task, "monitor_task", 2048, NULL, 5, NULL);
xTaskCreate(&station_list_task, "station_list_task", 2048, NULL, 5, NULL);
}
离线