   }
   
   WiFi.macAddress(mac);
-  for(int i=0;i<sizeof(mac);i++) {
-    mac_string += String(mac[sizeof(mac)-1-i],HEX);
-    if(i<(sizeof(mac)-1))
-      mac_string += ":";
-  }
+  sprintf(mac_string,"%02x:%02x:%02x:%02x:%02x:%02x",mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]);
   
   printWifiStatus();
 

  if(frame) {
    aJson.addStringToObject(frame, "devicename", "TI-CC3200");
    aJson.addStringToObject(frame, "uuid", uuid);
    aJson.addStringToObject(frame, "mac", mac_string.c_str());
    aJson.addStringToObject(frame, "component", "cc3200gpio");
    aJson.addStringToObject(frame, "command","io");
    aJson.addBooleanToObject(frame, "switch", false);

  if(announce) {
    aJson.addStringToObject(announce, "devicename", "TI-CC3200");
    aJson.addStringToObject(announce, "uuid", uuid);
    aJson.addStringToObject(announce, "mac", mac_string);
    aJson.addStringToObject(announce, "manufacturer", "Texas Instrument");
    aJson.addStringToObject(announce, "author", "cossb");
    aJson.addStringToObject(announce, "component", "cc3200gpio");
