Debug output says wifi connected, but WiFi.status() keeps returning 7
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- cpp
- Domaine
- embedded-iot, networking
Piste de recherche
Commencez par le sketch setup() et reproduisez le comportement réseau signalé tout en comparant la sortie interne « connected with CASAS » à WiFi.status(). Suivez les transitions des états de connexion et DHCP affichées dans le journal série ; la tâche est terminée lorsque vous avez identifié si le message de débogage, la valeur d’état ou une déconnexion immédiate est incohérent(e).
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
This seems to happen randomly (but often) on some networks. I'm seeing this on a particular wifi network almost systematically (but not quite) while the same code on the same board had worked for ages on other networks.
This is my code (simplified):
void setup() {
String client_ssid = "mySSID";
String clien_password = "mypassword";
WiFi.mode(WIFI_STA);
WiFi.begin(client_ssid.c_str(), client_password.c_str());
for (int i=0; i<20; i++) {
Serial.println("Trying to connect to Wifi '%s' with password '%s'\n", client_ssid.c_str(), client_password.c_str());
delay(1000)
if (WiFi.status()==WL_CONNECTED) {
Serial.println("...connected succesfully\n");
// Here I would normally do stuff...
return;
}
}
Serial.println("Cannot connect to WiFi!\n");
return;
}
fpm close 3
mode : sta(80:7d:3a:3c:e2:1d)
add if0
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
scandone
state: 0 -> 2 (b0)
Trying to connect to Wifi 'CASAS' with password '******'
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 17
cnt
connected with CASAS, channel 6
dhcp client start...
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
pm open,type:2 0
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Trying to connect to Wifi 'CASAS' with password '******'
Cannot connect to WiFi!
Note where it says "Connected to ... channel 6": that's not from my println()s, that's some internal output.
It was able to connect once or twice on the very same network, which is working fine and the password is correct, obviously.
I'm reporting it here because there's internal debug output that says "connected" and yet status() is returning WL_DISCONNECTED, so that's an inconsistency that is obviously in software. Either the debug output that says "connected" is bogus, or status() is returning the wrong value (or it connects and immediately loses connection, and there's no debug output for that which would be a bug too - but that seems pretty unlikely).
- Langage dominant
- C++
- Étoiles
- 16.7k
- Forks
- 13k
- Merge moyen
- 6 j 2 h
- PR mergées (30 j)
- 1
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de esp8266/Arduino
-
Typo in Scan Class DocumentationPeut-être pris @MukundaKatta l’a pris il y a 204 jours. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 65/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
-
[compiler Warnings]: Compile with `-Wconversion` and `-Wsign-conversion` brings up many WarningsOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Toutes les issues de esp8266/Arduino
Issues similaires
-
Difficulté 1/5 1-3 heures Accessibilité débutants 68/100
eic/TimeframeBuilder#102 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
-
error not reported I/O low priority rt_lib
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
Les mainteneurs répondent en général sous 1 jour
-
[XLA] hlo/pass/README.md says passes implement Run; since the NVI change they implement RunImplOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 91/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
objectionary/game-of-life#78 ·