-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Bug]: WiFi only works for a couple of seconds after reconnecting #3029
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Category
WiFi
Hardware
T-Beam
Firmware Version
Description
Follow up to #2796
After flashing artifact from #3026 WiFi is now reconnecting correctly after some time, but it only does work for a couple of seconds. I verified this by pinging the device, also DNS resolution fails when connecting to the MQTT server as can be seen from the serial log:
DEBUG | 12:05:58 50540 [Power] Battery: usbPower=1, isCharging=0, batMv=4182, batPct=100
INFO | 12:06:11 50553 [mqtt] Using non-TLS-encrypted session
INFO | 12:06:11 50553 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[50556820][I][WiFiClient.cpp:253] connect(): select returned due to timeout 3000 ms for fd 52
ERROR | 12:06:14 50556 [mqtt] Failed to contact MQTT server directly (1/5)...
DEBUG | 12:06:18 50560 [Power] Battery: usbPower=1, isCharging=0, batMv=4182, batPct=100
---SNIP---
DEBUG | 12:08:35 50697 [Power] Battery: usbPower=1, isCharging=0, batMv=4183, batPct=100
INFO | 12:08:45 50707 [mqtt] Using non-TLS-encrypted session
INFO | 12:08:45 50707 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[50721932][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 12:08:59 50721 [mqtt] Failed to contact MQTT server directly (5/5)...
DEBUG | 12:08:59 50721 [Power] Battery: usbPower=1, isCharging=0, batMv=4182, batPct=100
INFO | 12:08:59 50721 [WifiConnect] Reconnecting to WiFi access point Takbir
[50721980][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[50721984][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 8 - ASSOC_LEAVE
DEBUG | 12:08:59 50721 [WifiConnect] WiFi-Event 5: Disconnected from WiFi access point
WARN | 12:08:59 50722 [WifiConnect] WiFi lost connection. Reason: 8
[50727751][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
DEBUG | 12:09:05 50727 [WebServerThread] WiFi-Event 4: Connected to access point
[50735300][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[50735301][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.35, MASK: 255.255.255.0, GW: 192.168.1.1
DEBUG | 12:09:12 50735 WiFi-Event 7: Obtained IP address: 192.168.1.35
INFO | 12:09:12 50735 Using non-TLS-encrypted session
INFO | 12:09:12 50735 Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: xxxxxxx
INFO | 12:09:13 50735 MQTT connected
This is the approximate ping section belonging to the above serial log
From 192.168.1.3 icmp_seq=252 Destination Host Unreachable
From 192.168.1.3 icmp_seq=253 Destination Host Unreachable
From 192.168.1.3 icmp_seq=254 Destination Host Unreachable
64 bytes from 192.168.1.35: icmp_seq=255 ttl=255 time=2505 ms
64 bytes from 192.168.1.35: icmp_seq=256 ttl=255 time=1483 ms
64 bytes from 192.168.1.35: icmp_seq=257 ttl=255 time=459 ms
64 bytes from 192.168.1.35: icmp_seq=258 ttl=255 time=6.48 ms
From 192.168.1.3 icmp_seq=266 Destination Host Unreachable
From 192.168.1.3 icmp_seq=267 Destination Host Unreachable
From 192.168.1.3 icmp_seq=268 Destination Host Unreachable
Relevant log output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working