Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmartConfig is not working on Android #19

Closed
XuanTung95 opened this issue Nov 13, 2023 · 2 comments
Closed

SmartConfig is not working on Android #19

XuanTung95 opened this issue Nov 13, 2023 · 2 comments

Comments

@XuanTung95
Copy link

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?

@XuanTung95
Copy link
Author

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.

@abobija
Copy link
Owner

abobija commented Nov 15, 2023

Thanks @XuanTung95,
only the length of Uint8List(blocks[_blockIndex++]) is actually important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants