Follow this journey of a new ESP user and help me find what is wrong. I will post a TL;DR version and a long version with more information. Anyone willing to help will be appreciated. Sorry if something is obvious. My friend just gave me this boards and I really trying to make it work. On the other hand, I am a very skilled programmer (C#, C++, Lua (I play world of warcraft), Java, etc).
Short Version:
Well, I tried many things and I cant make the ESP-01 connect on my wifi network. It just keep returning STA_CONNECTING.
Using ESP-01 and basic FTDI.
Long Version:
This is my setup: http://i.imgur.com/vb9ITD0.jpg
ESP-01 and FTDI. I also have a power supply, but the results are the same.
This is the setup using a power supply: http://i.imgur.com/WSHxVQC.jpg
I used this setup to Flash NodeMCU
ESP FTDI
------|------------
TX | RX
RX | TX
VCC | VCC (3.3v)
GND | GND
CH_PD | VCC (3.3v)
GPIO0 | GND (removed after flash)
I successfully uploaded a custom build from NodeMCU. I can just imagine it is working because the Flasher didn't show any errors and I can use normal commands like setphymode() or getap(). This commands are not working before the flash.
My build is a master build (not dev) integer with default libraries (wifi, http, file, etc).
After the flash, I removed the GPIO0 from GND.
Is this correct?
Well, when I connect with ESPlorer, this message appears on the screen: http://i.imgur.com/qnjoKIk.jpg
Besides, you can see that node.heap() and other things are working (???).
I uploaded this lua program to the ESP:
wifi.setmode(wifi.STATION)
wifi.setphymode(wifi.PHYMODE_G)
print("Mode is "..wifi.getmode())
print("PhyMode is "..wifi.getphymode())
wifi.sta.config("xxxxxxxx", "**********")
ssid, password, bssid_set, bssid=wifi.sta.getconfig()
print("\nCurrent Station configuration:\nSSID : "..ssid
.."\nPassword : "..password
.."\nBSSID_set : "..bssid_set
.."\nBSSID: "..bssid.."\n")
ssid, password, bssid_set, bssid=nil, nil, nil, nil
cont=1
tmr.alarm(1,2000, 1, function()
if wifi.sta.getip()==nil then
print("Wait for IP "..cont.."--> "..wifi.sta.status())
cont=cont+1
if cont>20 then tmr.stop(1) end
else
print("New IP address is "..wifi.sta.getip())
tmr.stop(1)
end
end)
Result: http://i.imgur.com/vNacYEH.jpg
As you can see, it appears to be working, it just can't connect by some reason.
SSID and Password are okay.
The getap() command also work because I can list all my neighborhood wifi names.
I dont know what more to say. This forum is my last try.
Thank you in advance. Appreciate any answer.