SmartConfig is not working on Android
XuanTung95 opened this issue · comments
I used ESP-32 WIFI + Bluetooth run on Arduino.
Code Arduino:
WiFi.mode(WIFI_AP_STA);
WiFi.beginSmartConfig();
//Wait for SmartConfig packet from mobile
Serial.println("Waiting for SmartConfig.");
while (!WiFi.smartConfigDone()) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("SmartConfig received.");
Code Flutter:
init() {
provisioner = Provisioner.espTouch();
provisioner.listen((response) {}, onError: (e) {});
}
onClick() async {
await provisioner.start(ProvisioningRequest.fromStrings(
ssid: "123 12345",
bssid: "c8:e7:d8:a6:80:d6",
password: "12345678",
));
}
There is no error in Android side but WiFi.smartConfigDone() in the Arduino is not working.
Do you know what did I do wrong?
Never mind, the problem is from another plugin "network_info_plus" which returns ssid as ""my_ssid"" instead of "my_ssid".
I close this ticket.
PS: I see that you send the Uint8List(blocks[_blockIndex++]) which are all 0 list but the Android native code of EsptouchForAndroid sends all 49 (char '1'). Maybe it's not important.
Thanks @XuanTung95,
only the length of Uint8List(blocks[_blockIndex++])
is actually important.