     char *p = (char *)buf + 3;
     if (len == strlen(p)) {
       Serial.println(p);
+      StaticJsonBuffer<JSON_BUFSIZE> jsonBuffer;
       JsonObject& root = jsonBuffer.parseObject(p);
       if (root.success()) {
         strcpy(username, root["u"]);


const char *g_appkey = "56a0a88c4407a3cd028ac2fe";
const char *g_topic = "office";
const char *g_devid = "plug";

#define BUFSIZE 128

uint8_t mac[] = {0xb0, 0x5a, 0xda, 0x3a, 0x2e, 0x7e};


  Serial.begin(57600);
  Serial.println("init..");

  pinMode(PIN_CONTROL, OUTPUT);
  digitalWrite(PIN_CONTROL, HIGH);
  init_ethernet();

  //TODO: if we can't get reg info and tick info
