uart_init(BIT_RATE_115200, BIT_RATE_115200); os_delay_us(100); #ifdef PLATFORM_DEBUG ets_uart_printf("ESP8266 platform starting...\r\n"); #endif struct softap_config apConfig; struct ip_info ipinfo; char ssid[33]; char password[33]; char ma
时间: 2024-04-13 13:27:30 浏览: 78
c地址[6] = {0x00,0x00,0x00,0x00,0x00,0x00}; char macAddress[20]; wifi_set_opmode(SOFTAP_MODE); wifi_softap_get_config(&apConfig); wifi_get_macaddr(SOFTAP_IF, c地址); os_sprintf(macAddress, "%02X:%02X:%02X:%02X:%02X:%02X", c地址[0], c地址[1], c地址[2], c地址[3], c地址[4], c地址[5]); os_memcpy(apConfig.ssid, ssid, 32); os_memcpy(apConfig.password, password, 64); wifi_softap_set_config(&apConfig); wifi_get_ip_info(SOFTAP_IF, &ipinfo); os_delay_us(100); #ifdef PLATFORM_DEBUG ets_uart_printf("ESP8266 platform started\r\n"); ets_uart_printf("MAC Address: %s\r\n", macAddress); ets_uart_printf("IP Address: %d.%d.%d.%d\r\n", IP2STR(&ipinfo.ip)); #endif }
阅读全文