     } else if (data.startsWith("AT+CWJAP=")) {
       String ssidPwd = data.substring(9);
       int i = ssidPwd.indexOf(",");
-      ssidPwd.substring(0, i).toCharArray(cred.ssid, sizeof(cred.token));
-      ssidPwd.substring(i+1).toCharArray(cred.password, sizeof(cred.password));
+      unquote(ssidPwd.substring(0, i)).toCharArray(cred.ssid, sizeof(cred.token));
+      if (i != -1) {
+        unquote(ssidPwd.substring(i+1)).toCharArray(cred.password, sizeof(cred.password));
+      } else {
+        cred.password[0] = '\0';
+      }
       Serial.println("!I ssid: " + String(cred.ssid));
       Serial.println("!I password: " + String(cred.password));
       if (wifiConnect()) {
        EEPROM.put(0, cred);
-       EEPROM.commit();        
+       EEPROM.commit();
+       Serial.println("OK");
       }
     } else {
        Serial.println("!E usage:");

       "Host: " + host + "\r\n" +
       "User-Agent: Chiplet\r\n" +
       "Connection: close\r\n";
}

void loop() {

  char ssid[32];
  char password[32];
} cred;
const int maxWifiConnectAttemps = 20;

String buffer;

