|
Forum Index : Microcontroller and PC projects : ESP Basic wont connect to router
| Author | Message | ||||
| SteveA Regular Member Joined: 10/03/2017 Location: United KingdomPosts: 48 |
I have an ESP wifi module which I have flashed with ESP Basic 3.0 Alpha 69. I can connect to it directly in AP mode and edit, save and run programs, but it won't connect to my network (station mode). On the settings page, I've set Name to my router SSID and Pass to my WPA2 shared password. I use static IP addresses so I've entered one and set the subnet mask to 255.255.255.0 and I've set the gateway to the lan address of my router. But it won't connect, on the serial port I see it counting up to 12, then it says 'Failed Wifi Connect' followed by 'Creating WIFI access point' I've checked my router is broadcasting it's SSID (I normally turn this off), 2.5GHz is on and 5GHz is off. I've actually tried 3 routers, two run DD-WRT software and using the built in 'site survey' application I can see the ESP. Running a simple program on the ESP I can also see the router SSID, signal strength and MAC address. So I can't figure out what the problem is, has anyone here had a similar problem, or suggest what to try next? Before someone points me to the ESP basic forum, I thought I'd ask here first as the calibre of responses is much better! |
||||
| MikeO Senior Member Joined: 11/09/2011 Location: AustraliaPosts: 275 |
Hi, Have you tried NOT using a Fixed IP? See if that works first. Also make sure the SSID is set correctly , it is case sensitive. When you flashed it initially with the ESPbasic did you choose the correct size? 1-4 mb Is this a brand new ESP device or has it been programmed with other interpreters previously? like LUA ? Occasionally i have had weird issues and have resorted to flashing with something else first, like ESP-Link. I generally use the ESPtool.py flasher. Then start again with the ESPbasic. I have used dozens of these devices and generally they just work and when they don't its usually something I have done! Mike Codenquilts |
||||
| SteveA Regular Member Joined: 10/03/2017 Location: United KingdomPosts: 48 |
Thanks for the suggestions Mike, unfortunately they didn't help. As an experiment, I decided to try ESP-Link, and that behaves exactly the same way:- AP works, but won't connect to a network. This turns out to be a known problem with ESP-Link on some clone boards, so I am assuming it might also affect ESP-Basic. I bought what I thought was a genuine Wemos D1 mini pro, but looking at pictures its not! So I'm going to get some new modules to try. Rgds Steve |
||||
| SteveA Regular Member Joined: 10/03/2017 Location: United KingdomPosts: 48 |
Had another go getting it to connect today and found a solution. This worked for me after several attempts: 1) Reformat the flash using the official Espressive download tool. 2) Install basic using the esp_basic_flasher. 3) Turn ON dhcp on the router. 4) Reset the esp and wait for it to get an ip address. You might need to repeat this several times, eventually you will see this happen on the esp serial port. 5) Point your browser to the ip address, and enter the ip address into the static ip field on the setting screen, also enter the netmask (255.255.255.0) and your router (gateway address). Save everything. 6) Turn OFF dhcp on the router. 7) Reset the esp, it will now reconnect to the router using the static ip you entered. It should now remember your network and connect every time. I hope this helps others. A big thanks to MikeO for the initial suggestion. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |