From d20c343329cac8d15c904c79bc45e69eb84f2d47 Mon Sep 17 00:00:00 2001 From: dannybackx Date: Tue, 1 Nov 2016 08:53:56 +0100 Subject: [PATCH] Add MAC address as remarked in the code review --- cmd/handlers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/handlers.c b/cmd/handlers.c index 2b98239..db2826c 100644 --- a/cmd/handlers.c +++ b/cmd/handlers.c @@ -197,11 +197,14 @@ cmdGetWifiInfo(CmdPacket *cmd) { struct ip_info info; wifi_get_ip_info(0, &info); + uint8_t mac[6]; + wifi_get_macaddr(0, mac); - cmdResponseStart(CMD_RESP_CB, callback, 3); + cmdResponseStart(CMD_RESP_CB, callback, 4); cmdResponseBody(&info.ip.addr, sizeof(info.ip.addr)); cmdResponseBody(&info.netmask.addr, sizeof(info.netmask.addr)); cmdResponseBody(&info.gw.addr, sizeof(info.gw.addr)); + cmdResponseBody(mac, sizeof(mac)); cmdResponseEnd(); }