diff --git a/firmware/0x00000.bin b/firmware/0x00000.bin index ef105d7..ad3aa25 100644 Binary files a/firmware/0x00000.bin and b/firmware/0x00000.bin differ diff --git a/firmware/0x10000.bin b/firmware/0x10000.bin index 4e45892..d84606d 100644 Binary files a/firmware/0x10000.bin and b/firmware/0x10000.bin differ diff --git a/user/user_config.h b/user/user_config.h index 331238a..7deef6b 100644 --- a/user/user_config.h +++ b/user/user_config.h @@ -1,7 +1,7 @@ #ifndef _USER_CONFIG_ #define _USER_CONFIG_ -#define ESPERPASS_VERSION "V0.0.4" +#define ESPERPASS_VERSION "V0.0.5" #define WIFI_SSID "ssid" #define WIFI_PASSWORD "password" diff --git a/user/user_main.c b/user/user_main.c index ccffcd1..046e1d0 100644 --- a/user/user_main.c +++ b/user/user_main.c @@ -501,17 +501,19 @@ console_handle_command(struct espconn *pespconn) IP2STR(&config.my_gw)); to_console(response); + uint8_t current_mac[6]; + wifi_get_macaddr(SOFTAP_IF, current_mac); os_sprintf(response, "STA MAC: %02x:%02x:%02x:%02x:%02x:%02x\r\nAP MAC: %02x:%02x:%02x:%02x:%02x:%02x\r\n", config.STA_MAC_address[0], config.STA_MAC_address[1], config.STA_MAC_address[2], config.STA_MAC_address[3], config.STA_MAC_address[4], config.STA_MAC_address[5], - config.mac_list[config.current_mac_address][0], - config.mac_list[config.current_mac_address][1], - config.mac_list[config.current_mac_address][2], - config.mac_list[config.current_mac_address][3], - config.mac_list[config.current_mac_address][4], - config.mac_list[config.current_mac_address][5]); + current_mac[0], + current_mac[1], + current_mac[2], + current_mac[3], + current_mac[4], + current_mac[5]); to_console(response); os_sprintf(response, "STA hostname: %s\r\n", config.sta_hostname); to_console(response); @@ -1072,6 +1074,21 @@ console_handle_command(struct espconn *pespconn) goto command_handled; } + if (strcmp(tokens[1], "ap_mac") == 0) + { + uint8_t new_ap_mac[6]; + if (!parse_mac(new_ap_mac, tokens[2])) + { + os_sprintf(response, INVALID_ARG); + } + else + { + wifi_set_macaddr(SOFTAP_IF, new_ap_mac); + os_sprintf(response, "AP MAC set\r\n"); + } + goto command_handled; + } + if (strcmp(tokens[1],"sta_mac") == 0) { if (!parse_mac(config.STA_MAC_address, tokens[2]))