     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"]);


bool setup_with_appkey_and_devid(const char *appkey, const char *devid) {
  uint8_t buf[BUFSIZE];
  bool rc = false;

  if (appkey == NULL) return false;


    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(url, root["c"]);
