I tried with an old module I had laying around.
I got the same issue no matter which CWMODE. But in the Stackoverflow post I linked to user urbanSoft (so all credit to him) writes:So I tried that by connecting it to my network using AT+CWJAP="myssid","mypassword" and after that CWLAP worked as expected.That AT+CWLAP returns an error without any prior connection is desired behaviour.
The doc states that "AT+CWLAP connects an ESP station to a targeted AP with the last Wi-Fi configuration."
Since there is no last Wi-Fi configuration an error is returned.
My module is really old with stock firmware. AT commands have changed and been added over the years so don't expect any and all examples you find on the internet to just work if they don't match the firmware.
Bookmarks