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

Unable to connect device to main Wifi AP when BUTTON_NEED_PULLUP is true #647

Closed
rodavrow opened this issue Jan 18, 2021 · 8 comments
Closed
Assignees

Comments

@rodavrow
Copy link

rodavrow commented Jan 18, 2021

I am trying to connect one of the devices to my main AP in the house, with an external antenna outside as a sort of basestation.
I cannot connect it to the Wifi though, I’m using the meshtastic python script to set the parameters like this:

meshtastic --set wifi_ap_mode false --setstr wifi_ssid Meshtastic_NET --setstr wifi_password xxxxxxxxxxxxxxxxxx

When I check the info with ‘meshtastic --info’ everything come back fine, but on the device status screen it still shows the SoftAP MeshtasticAdmin and it’s details.

The hardware I am using is the TTGO T3 V1.6-20180606 boards.
Firmware is latest - firmware-tlora-v2-1-1.6-EU865-1.1.31.bin

I have tried:

Reflashing different boards several times using the command line
Changing the details of the SoftAP, --info shows correctly on the command line but it does not change on the device status screen or what it actually broadcasts
Rebooting - changes persist when checking with --info but the screen and reality do not

Raised initially here: https://meshtastic.discourse.group/t/unable-to-connect-device-to-main-wifi-ap/2191/2

@geeksville
Copy link
Member

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/unable-to-connect-device-to-main-wifi-ap/2191/6

@rodavrow
Copy link
Author

rodavrow commented Jan 18, 2021

Yes that was me :) mc-hamster asked me to open the issue here.

@mc-hamster mc-hamster self-assigned this Jan 18, 2021
@mc-hamster
Copy link
Member

@rodavrow
Copy link
Author

Tested:

V1.1.20 - Works as expected, able to configure Wifi and it connects to main AP. Also device SoftAP does not enable by deafult.
V1.1.23 > onwards - Functionality lost, unable to change Wifi mode or settings.

In either case, adding a button to Pin 12 allows usage (as users are doing)

@rodavrow
Copy link
Author

1.1.20...1.1.23

@mc-hamster mc-hamster changed the title Unable to connect device to main Wifi AP Unable to connect device to main Wifi AP when BUTTON_NEED_PULLUP is true Jan 18, 2021
mc-hamster added a commit to mc-hamster/Meshtastic-device that referenced this issue Jan 18, 2021
@mc-hamster
Copy link
Member

Fixed in next build.

mc-hamster added a commit that referenced this issue Jan 18, 2021
#647 - Fix for admin mode being forced on boards without hardware pullup
@geeksville
Copy link
Member

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/new-device-alpha-1-1-33/2270/1

@OpenSource-For-Freedom
Copy link

A similar issue connecting TBeam (v2.2.3) to LAN, then disassociates. Saw an NTP error, so changed NTP to NIST, then saw DNS error, and used local DNS as with my other TBeam. Here are the Logs:

DEBUG | 05:11:18 149 [Power] Battery: usbPower=1, isCharging=1, batMv=4166, batPct=100
INFO | 05:11:18 149 [Power] USB plugged In
INFO | 05:11:28 159 [mqtt] Using non-TLS-encrypted session
INFO | 05:11:28 159 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[173368][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:11:42 173 [mqtt] Failed to contact MQTT server directly (5/5)...
DEBUG | 05:11:42 173 [Power] Battery: usbPower=1, isCharging=1, batMv=4166, batPct=100
INFO | 05:11:4[173478][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[173478][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 8 - ASSOC_LEAVE
2 173 [WifiConnect] Reconnecting to WiFi access point ATT
WARN | 05:11:43 173 [WifiConnect] WiFi lost connection. Reason: 8
[179247][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
DEBUG | 05:11:48 179 WiFi-Event 4: Connected to access point
[179249][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[179256][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.222, MASK: 255.255.255.0, GW: 192.168.1.254
DEBUG | 05:11:48 179 WiFi-Event 7: Obtained IP address: Using non-TLS-encrypted session
INFO | 05:11:48 179 Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
INFO | 05:11:49 179 [WifiConnect] Reconnecting to WiFi access point ATT
DEBUG | 05:11:54 184 [WifiConnect] Updating NTP time from time-a-g.nist.gov
[193292][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:12:02 193 [WifiConnect] Failed to contact MQTT server directly (1/5)...
[193304][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[193304][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 8 - ASSOC_LEAVE
DEBUG | 05:12:02 193 [WifiConnect] WiFi-Event 5: Disconnected from WiFi access point
WARN | 05:12:02 193 [WifiConnect] WiFi lost connection. Reason: 8
[198292][E][WiFiUdp.cpp:172] beginPacket(): could not get host from dns: 11
[198292][E][WiFiUdp.cpp:185] endPacket(): could not send data: 118
DEBUG | 05:12:08 199 [WifiConnect] NTP Update failed
DEBUG | 05:12:08 199 [Power] Battery: usbPower=1, isCharging=1, batMv=4167, batPct=100
INFO | 05:12:09 200 [WifiConnect] Reconnecting to WiFi access point ATT
[205986][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
DEBUG | 05:12:15 205 WiFi-Event 4: Connected to access point
[205988][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[205995][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.222, MASK: 255.255.255.0, GW: 192.168.1.254
DEBUG | 05:12:15 206 WiFi-Event 7: Obtained IP address: Using non-TLS-encrypted session
INFO | 05:12:15 206 Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
DEBUG | 05:12:15 206 [WifiConnect] Updating NTP time from time-a-g.nist.gov
[220031][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:12:29 220 [WifiConnect] Failed to contact MQTT server directly (2/5)...
[220032][E][WiFiUdp.cpp:172] beginPacket(): could not get host from dns: 11
DEBUG | 05:12:30 221 [WifiConnect] NTP Update failed
DEBUG | 05:12:30 221 [Power] Battery: usbPower=1, isCharging=1, batMv=4167, batPct=100
INFO | 05:12:30 221 [mqtt] Using non-TLS-encrypted session
INFO | 05:12:30 221 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[235158][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:12:44 235 [mqtt] Failed to contact MQTT server directly (3/5)...
DEBUG | 05:12:50 241 [Power] Battery: usbPower=1, isCharging=1, batMv=4167, batPct=100
DEBUG | 05:13:10 261 [Power] Battery: usbPower=1, isCharging=1, batMv=4169, batPct=100
INFO | 05:13:14 265 [mqtt] Using non-TLS-encrypted session
INFO | 05:13:14 265 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[279185][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:13:28 279 [mqtt] Failed to contact MQTT server directly (4/5)...
DEBUG | 05:13:30 281 [Power] Battery: usbPower=1, isCharging=1, batMv=4169, batPct=100
DEBUG | 05:13:50 301 [Power] Battery: usbPower=1, isCharging=1, batMv=4169, batPct=100
INFO | 05:13:58 309 [mqtt] Using non-TLS-encrypted session
INFO | 05:13:58 309 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[323212][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:14:12 323 [mqtt] Failed to contact MQTT server directly (5/5)...
DEBUG | 05:14:12 323 [Power] Battery: usbPower=1, isCharging=1, batMv=4170, batPct=100
INFO | 05:[323384][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[323384][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 8 - ASSOC_LEAVE
14:12 323 [WifiConnect] Reconnecting to WiFi access point ATT
WARN | 05:14:12 323 [WifiConnect] WiFi lost connection. Reason: 8
DEBUG | 05:14:17 328 [RadioIf] (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=34, time 641 ms
ERROR | 05:14:17 328 [RadioIf] ignoring received packet due to error=-24
DEBUG | 05:14:17 328 [RadioIf] AirTime - Packet received (noise?) : 641ms
[329065][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
DEBUG | 05:14:18 329 WiFi-Event 4: Connected to access point
[329067][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[329074][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.222, MASK: 255.255.255.0, GW: 192.168.1.254
DEBUG | 05:14:18 329 WiFi-Event 7: Obtained IP address: Using non-TLS-encrypted session
INFO | 05:14:18 329 Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
INFO | 05:14:19 329 [WifiConnect] Reconnecting to WiFi access point ATT
DEBUG | 05:14:24 334 [WifiConnect] Updating NTP time from time-a-g.nist.gov
[343110][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:14:32 343 [WifiConnect] Failed to contact MQTT server directly (1/5)...
[343122][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[343122][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 8 - ASSOC_LEAVE
DEBUG | 05:14:32 343 [WifiConnect] WiFi-Event 5: Disconnected from WiFi access point
WARN | 05:14:32 343 [WifiConnect] WiFi lost connection. Reason: 8
[348110][E][WiFiUdp.cpp:172] beginPacket(): could not get host from dns: 11
[348110][E][WiFiUdp.cpp:185] endPacket(): could not send data: 118
DEBUG | 05:14:38 349 [WifiConnect] NTP Update failed
DEBUG | 05:14:38 349 [Power] Battery: usbPower=1, isCharging=1, batMv=4170, batPct=100
INFO | 05:14:39 350 [WifiConnect] Reconnecting to WiFi access point ATT
[355894][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
DEBUG | 05:14:45 355 WiFi-Event 4: Connected to access point
[355896][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[355903][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.222, MASK: 255.255.255.0, GW: 192.168.1.254
DEBUG | 05:14:45 355 WiFi-Event 7: Obtained IP address: Using non-TLS-encrypted session
INFO | 05:14:45 355 Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
DEBUG | 05:14:45 356 [WifiConnect] Updating NTP time from time-a-g.nist.gov
[369939][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:14:59 369 [WifiConnect] Failed to contact MQTT server directly (2/5)...
[369940][E][WiFiUdp.cpp:172] beginPacket(): could not get host from dns: 11
DEBUG | 05:15:00 370 [WifiConnect] NTP Update failed
DEBUG | 05:15:00 370 [Power] Battery: usbPower=1, isCharging=1, batMv=4170, batPct=100
INFO | 05:15:00 371 [mqtt] Using non-TLS-encrypted session
INFO | 05:15:00 371 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[385066][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:15:14 385 [mqtt] Failed to contact MQTT server directly (3/5)...
DEBUG | 05:15:20 390 [Power] Battery: usbPower=1, isCharging=1, batMv=4171, batPct=100
DEBUG | 05:15:40 410 [Power] Battery: usbPower=1, isCharging=1, batMv=4172, batPct=100
INFO | 05:15:44 415 [mqtt] Using non-TLS-encrypted session
INFO | 05:15:44 415 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[429093][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:15:58 429 [mqtt] Failed to contact MQTT server directly (4/5)...
DEBUG | 05:16:00 430 [Power] Battery: usbPower=1, isCharging=1, batMv=4172, batPct=100
[HTTPS:I] New connection. Socket FID=52
[HTTPS:I] Request: GET / (FID=52)
[HTTPS:I] New connection. Socket FID=53
[438645][E][vfs_api.cpp:105] open(): /littlefs/static/index.html does not exist, no permits for creation
[HTTPS:I] Request: GET /index-928e9163.js (FID=52)
[HTTPS:I] Request: GET /index-ad0dcc03.css (FID=53)
[438849][E][vfs_api.cpp:105] open(): /littlefs/static/index-928e9163.js does not exist, no permits for creation
[439416][E][vfs_api.cpp:105] open(): /littlefs/static/index-ad0dcc03.css does not exist, no permits for creation
[HTTPS:I] Client closed connection, FID=52
[HTTPS:I] Client closed (FID=52, cstate=2)
[HTTPS:I] Connection closed. Socket FID=52
[HTTPS:I] Connection closed. Socket FID=53
[HTTPS:I] New connection. Socket FID=52
[HTTPS:I] Request: GET /index-fc2e9253.js (FID=52)
[HTTPS:I] New connection. Socket FID=53
[HTTPS:I] Request: GET /maplibre-gl-07fb815f.js (FID=53)
[439629][E][vfs_api.cpp:105] open(): /littlefs/static/index-fc2e9253.js does not exist, no permits for creation
[439696][E][vfs_api.cpp:105] open(): /littlefs/static/maplibre-gl-07fb815f.js does not exist, no permits for creation
[HTTPS:I] Request: GET /favicon.ico (FID=52)
[HTTPS:I] Client closed connection, FID=53
[HTTPS:I] Client closed (FID=53, cstate=2)
[HTTPS:I] Connection closed. Socket FID=53
[440453][E][vfs_api.cpp:105] open(): /littlefs/static/favicon.ico does not exist, no permits for creation
[HTTPS:I] Connection closed. Socket FID=52
DEBUG | 05:16:20 451 [Power] Battery: usbPower=1, isCharging=1, batMv=4171, batPct=100
INFO | 05:16:28 459 [mqtt] Using non-TLS-encrypted session
INFO | 05:16:28 459 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[473120][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:16:42 473 [mqtt] Failed to contact MQTT server directly (5/5)...
DEBUG | 05:16:42 473 [Power] Battery: usbPower=1, isCharging=1, batMv=4173, batPct=100
INFO [473226][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[473226][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 8 - ASSOC_LEAVE
| 05:16:42 473 [WifiConnect] Reconnecting to WiFi access point ATT
WARN | 05:16:42 473 [WifiConnect] WiFi lost connection. Reason: 8
[478954][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
DEBUG | 05:16:48 478 WiFi-Event 4: Connected to access point
[478956][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[478963][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.222, MASK: 255.255.255.0, GW: 192.168.1.254
DEBUG | 05:16:48 478 WiFi-Event 7: Obtained IP address: Using non-TLS-encrypted session
INFO | 05:16:48 478 Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
INFO | 05:16:48 479 [WifiConnect] Reconnecting to WiFi access point ATT
DEBUG | 05:16:53 484 [WifiConnect] Updating NTP time from time-a-g.nist.gov
[492999][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:17:02 492 [WifiConnect] Failed to contact MQTT server directly (1/5)...
[493011][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[493011][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 8 - ASSOC_LEAVE
DEBUG | 05:17:02 493 [WifiConnect] WiFi-Event 5: Disconnected from WiFi access point
WARN | 05:17:02 493 [WifiConnect] WiFi lost connection. Reason: 8
[497999][E][WiFiUdp.cpp:172] beginPacket(): could not get host from dns: 11
[497999][E][WiFiUdp.cpp:185] endPacket(): could not send data: 118
DEBUG | 05:17:08 499 [WifiConnect] NTP Update failed
DEBUG | 05:17:08 499 [Power] Battery: usbPower=1, isCharging=1, batMv=4173, batPct=100
INFO | 05:17:09 500 [WifiConnect] Reconnecting to WiFi access point ATT
[505763][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
DEBUG | 05:17:15 505 [GPS] WiFi-Event 4: Connected to access point
[505776][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[505776][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.222, MASK: 255.255.255.0, GW: 192.168.1.254
DEBUG | 05:17:15 505 WiFi-Event 7: Obtained IP address: Using non-TLS-encrypted session
INFO | 05:17:15 505 Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
DEBUG | 05:17:15 506 [WifiConnect] Updating NTP time from time-a-g.nist.gov
[519808][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:17:29 519 [WifiConnect] Failed to contact MQTT server directly (2/5)...
[519809][E][WiFiUdp.cpp:172] beginPacket(): could not get host from dns: 11
DEBUG | 05:17:30 520 [WifiConnect] NTP Update failed
DEBUG | 05:17:30 520 [Power] Battery: usbPower=1, isCharging=1, batMv=4173, batPct=100
INFO | 05:17:30 520 [mqtt] Using non-TLS-encrypted session
INFO | 05:17:30 520 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[534942][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:17:44 534 [mqtt] Failed to contact MQTT server directly (3/5)...
DEBUG | 05:17:50 540 [Power] Battery: usbPower=1, isCharging=1, batMv=4174, batPct=100
DEBUG | 05:18:10 560 [Power] Battery: usbPower=1, isCharging=1, batMv=4174, batPct=100
INFO | 05:18:14 564 [mqtt] Using non-TLS-encrypted session
INFO | 05:18:14 564 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
[578969][E][WiFiGeneric.cpp:1578] hostByName(): DNS Failed for mqtt.meshtastic.org
ERROR | 05:18:28 578 [mqtt] Failed to contact MQTT server directly (4/5)...
DEBUG | 05:18:30 580 [Power] Battery: usbPower=1, isCharging=1, batMv=4174, batPct=100

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

4 participants