Open
Description
When serializing command arguments, the software that communicates the WiFi password to the WiFi USB bridge doesn't escape these three special characters that the firmware on the other side interprets. As a result, that firmware mis-parses passwords that contain them and fails to connect.
Sample code, which never successfully connects:
#include <WiFiS3.h>
// #include "Modem.h"
void setup() {
Serial.begin(9600);
Serial.println("Starting wifi");
// modem.begin();
// modem.debug(Serial, 2);
int status = WL_IDLE_STATUS;
while(status != WL_CONNECTED) {
status = WiFi.begin("my_ssid", "goofy\"password");
Serial.print("status = ");
Serial.println(status);
delay(2000);
}
Serial.println("Connected!");
while(1);
}
void loop() {
// put your main code here, to run repeatedly:
}
SSID and password serialized out with no escaping here:
Relevant debugging output from the modem class (thanks to whoever put that in there!):
REQUEST: AT+BEGINSTA=my_ssid,goofy"password
Parser code in the firmware that's interpreting the double quote:
It's possible to work around this by adding extra escaping in the string in the sketch, e.g.
status = WiFi.begin("my_ssid", "goofy\\\"password");
Which results in this going over the wire, successfully connecting.
REQUEST: AT+BEGINSTA=my_ssid,goofy\"password
Additional context
Additional reports
Metadata
Metadata
Assignees
Labels
Related to content of the project itselfRelated to content of the project itselfPerceived defect in any part of projectPerceived defect in any part of project