You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is my code: Future connectToWifi(String ssid) async {
try {
var details = await WiFiForIoTPlugin.connect(ssid,
security: NetworkSecurity.NONE, joinOnce: true);
print('details are $details');
if (details) {
print('connected sucessfuly');
} else {
print('failed to connect');
}
} catch (e) {
print('fialed to connect $e');
}
}these are messages in debug console:D/ConnectivityManager(11147): NetworkCallback was already unregistered
I/flutter (11147): details are false
I/flutter (11147): failed to connect
The text was updated successfully, but these errors were encountered:
We encounter the exact same issue. The very first time it always fails to connect. Retrying after that always succeeds. Haven't look into the source, but is 100% reproducable, so shouldn't be hard to fix (but currently don't have the time to look into it). By the way, this is the connect with "withInternet" set to false and "joinOnce" set to true, using WPA and specifying a bssid.
this is my code: Future connectToWifi(String ssid) async {
try {
var details = await WiFiForIoTPlugin.connect(ssid,
security: NetworkSecurity.NONE, joinOnce: true);
print('details are $details');
if (details) {
print('connected sucessfuly');
} else {
print('failed to connect');
}
} catch (e) {
print('fialed to connect $e');
}
}these are messages in debug console:D/ConnectivityManager(11147): NetworkCallback was already unregistered
I/flutter (11147): details are false
I/flutter (11147): failed to connect
The text was updated successfully, but these errors were encountered: