Skip to content

esp32s2: wifi: fix several debug-build errors #3689

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

Merged
merged 1 commit into from
Nov 17, 2020

Conversation

jepler
Copy link

@jepler jepler commented Nov 13, 2020

Closes #3688

With this change, I don't get the ESP_ERROR_CHECK failed repeatedly running code that imports wifi. (I'm not getting a successful connection but that's probably my own fault, such as a secrets problem)

Closes adafruit#3688

With this change, I don't get the ESP_ERROR_CHECK failed repeatedly
running code that imports wifi.  (I'm not getting a successful connection
but that's probably my own fault, such as a secrets problem)
@jepler
Copy link
Author

jepler commented Nov 13, 2020

Testing performed: In a debug build on kaluga, repeatedly ran a test program which does import wifi:

import ipaddress
import ssl
import wifi
import socketpool
#import adafruit_requests

# URLs to fetch from
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
JSON_QUOTES_URL = "https://www.adafruit.com/api/quotes.php"
JSON_STARS_URL = "https://api.github.com/repos/adafruit/circuitpython"

# Get wifi details and more from a secrets.py file
try:
    from secrets import secrets
except ImportError:
    print("WiFi secrets are kept in secrets.py, please add them there!")
    raise

print("ESP32-S2 WebClient Test")

print("My MAC addr:", [hex(i) for i in wifi.radio.mac_address])

print("Avaliable WiFi networks:")
for network in wifi.radio.start_scanning_networks():
    print("\t%s\t\tRSSI: %d\tChannel: %d" % (str(network.ssid, "utf-8"),
            network.rssi, network.channel))
wifi.radio.stop_scanning_networks()

print("Connecting to %s"%secrets["ssid"])
wifi.radio.connect(secrets["ssid"], secrets["password"])
#...

There's more code after "..." but for probably unrelated reasons my wifi connection doesn't actually succeed.

@jepler
Copy link
Author

jepler commented Nov 13, 2020

With this something else is still wrong with my debug builds -- adding DEBUG=1 to the Make environment AND making the following changes in sdkconfig-debug.defaults:

+CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG=y
+CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y
+CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y

... leads to non-working wifi

@tannewt
Copy link
Member

tannewt commented Nov 16, 2020

So... do you want to merge it or not?

@jepler
Copy link
Author

jepler commented Nov 17, 2020

I don't think it's causing the wifi failures I saw with the additional debug flags enabled, so yeah, I'd like to see it merged.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks!

@tannewt tannewt merged commit e2b5ae2 into adafruit:main Nov 17, 2020
@jepler jepler deleted the issue-3688 branch November 3, 2021 21:10
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

Successfully merging this pull request may close these issues.

esp32s2 debug build errors in wifi_reset
2 participants