-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WiFi on AP mode stopped working (forever?) after softAPdisconnect() #9110
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
Comments
where in the example sketch do I call |
any updates @acautomacaoecontrole? |
I got exactly same problem with Lilygo esp32s3 T-display. Not sure if WiFi.softAPdisconnect() was executed, as I was using WiFiMmanager library. But now it is not possible to run module in AP mode no matter what (2x modules). Third module (which was not used during the project) runs totally OK. No flash erase/code reload works. |
Hello, networking was refactored for 3.0.0 version. Will you be able to retest in on newest version? |
I am experiencing the same issue on Arduino 3.0.1. The device has been working just fine, using the wifimanager library and the arduino framework 2+, up until the point where I tried V3.0.0 and things went south. I went as far as erasing flash and flashing the WiFiAccessPoint example with no success. Logs don't show any error either.
|
@sle118 I can not reproduce this with your exact settings and code. AP working fine on my end. |
@me-no-dev Since I was more familiar with the esp-idf framework than the Arduino framework (which controls a bit too much of the underlying sdkconfig to get to the bottom of issues), I went ahead and flashed the esp-idf softAP example which gave me a better clue as to what was going on and I give it to you in hope that this also applies to others hitting the same problem.
I was having this gibberish serial output and I just couldn't figure out until flashing the esp-idf example which clearly showed there was a crystal speed mismatch. Once the crystal speed was set to "autodetect", problem went away and the softAP started working again. I am unsure how I can select the proper crystal speed on the Arduino platform, but I guess I have to fiddle around to know. Other than that, the esp-idf example is working just fine. These settings are key for my board:
Edit: Something that just works using the esp-idf Edit 2: |
@sle118 ouch... bad news. We could not keep the crystal to auto in Arduino for other reasons (I can not recall now, but something crucial stopped working) so we dropped support for 26MHz crystals. I only know of one board that uses it (red sparkfun esp32 board) |
@acautomacaoecontrole can this issue be closed? |
Hello, Due to the overwhelming volume of issues currently being addressed, we have decided to close the previously received tickets. If you still require assistance or if the issue persists, please don't hesitate to reopen the ticket. Thanks. |
Board
Generic development board with a ESP-WROOM-32
Device Description
Brandless generic Development board and development board with ESP32 module adapter.
Hardware Configuration
Not aplicable
Version
latest master (checkout manually)
IDE Name
PlatformIO and Arduino
Operating System
Widows 8.1
Flash frequency
40MHz
PSRAM enabled
no
Upload speed
921600
Description
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
PACKAGES:
Dependency Graph
|-- WiFi @ 2.0.0
Building in release mode
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 13.0% (used 42508 bytes from 327680 bytes)
Flash: [===== ] 54.9% (used 719889 bytes from 1310720 bytes)
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
esptool.py v4.5.1
Chip is ESP32-D0WDQ6 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
Hi!
I've been working on a Wi-Fi AP project and doing several changes to experiment results and after using softAPdisconnect(), I've noticed ESP32 was not transmitting anymore, even after resetting, turning it off and on and erasing flash.
At a initial moment, I could not realize that this problem happened after using softAPdisconnect().
I've removed little by little the last changes but nothing made the AP work again.
So, I've taken a second ESP32 module and the AP project came back to life. I spared the first ESP32 for a later investigation.
Back to the development of the AP project, at certain moment I included again softAPdisconnect() and the previous problem arose again. This time I could realize that it was related to this function, but I have no clue why, even after checking WiFiAP.cpp to understand what this fucttion does.
Again, a new ESP32 module was taken and the AP functions again. This time softAPdisconnect() was removed.
I do not know if what caused the problem was either softAPdisconnect( true ) or softAPdisconnect( false ). Both?
I've spending A LOT of time trying to recover those 2 ESP32 modules in order to be used as AP again. All failed till now. As a station (client), it works.
BTW, Functions "enableSTA(true)", "WiFi.mode( WIFI_MODE_STA )", "esp_wifi_set_mode( mode )" ("mode" previously set to "WIFI_MODE_STA") do not change mode value. It's always "WIFI_MODE_NULL", according to the result of "esp_wifi_get_mode( &mode )". It ALWAYS returns "ESP_OK" and put the "WIFI_MODE_NULL" value on "mode" variable.
Notice: this constant return of "WIFI_MODE_NULL" happens even on a ESP32 module that is AP operative.
So, the questions:
Sketch
Debug Message
Following printout is the same for the two groups of ESP32:
Wifigeneric.cpp and Wifista.cpp were modified to add some messages for tracking purpose:
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: