Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By jtheires@netins.net
#27877 I was excited to find this example using Arduino sketch code (as opposed to lua script), and was happy to find that it compiles, loads and starts up on my esp8266-01 module. However, connecting to the AP fails on my iPhone 6 and laptop. I can see the "ESP" signal OK, but cannot connect. Although I am certain I have entered the correct password (using the default), I get the following error from IOS 8.4.1 at every attempt: "Incorrect password for "ESP" - then after some more (~3) attempts, I get "Unable to join the network "ESP." What am I missing here?
BTW, when I connect from a nearby laptop, I get "Windows was unable to connect to ESP," then it seems to connect briefly (but not long enough to access the admin.html page), and finally drops the connection to ESP.

OK - Update: After further investigation and discussion research, I changed my 300mA power supply to a 1.5A unit, regulated down to 3.3v DC. Now, I am able to connect and access admin.html - wahoo!

BTW, the documentation on your web page (http://www.john-lassen.de/index.php/pro ... -webconfig) states to connect to http://192.168.4.1/admin.html after connecting to the ESP AP, but I saw in the code this line:
config.IP[0] = 192;config.IP[1] = 168;config.IP[2] = 1;config.IP[3] = 100;
This kinda looks as if the AP is set to 192.168.1.100. I'm no network engineer, but which is correct?
User avatar
By danbicks
#27879
jtheires@netins.net wrote:I was excited to find this example using Arduino sketch code (as opposed to lua script), and was happy to find that it compiles, loads and starts up on my esp8266-01 module. However, connecting to the AP fails on my iPhone 6 and laptop. I can see the "ESP" signal OK, but cannot connect. Although I am certain I have entered the correct password (using the default), I get the following error from IOS 8.4.1 at every attempt: "Incorrect password for "ESP" - then after some more (~3) attempts, I get "Unable to join the network "ESP." What am I missing here?
BTW, when I connect from a nearby laptop, I get "Windows was unable to connect to ESP," then it seems to connect briefly (but not long enough to access the admin.html page), and finally drops the connection to ESP.

BTW, the documentation on your web page (http://www.john-lassen.de/index.php/pro ... -webconfig) states to connect to http://192.168.4.1/admin.html after connecting to the ESP AP, but I saw in the code this line:
config.IP[0] = 192;config.IP[1] = 168;config.IP[2] = 1;config.IP[3] = 100;
This kinda looks as if the AP is set to 192.168.1.100. I'm no network engineer, but which is correct?


The IP address "192.168.1.10. 100" is the Wlan IP once connected to home router. 192.168.4.1 is the AP ip address . I configure my wlan IP for this unit to 192.168.0.26, then once connected to my network I connect to the webserver by 192.168.0.26/admin.html Hope this helps

Dans
User avatar
By jtheires@netins.net
#27884 Thanks, Dans.
After further experimentation, I upgraded my esp power supply and now I'm able to connect to ESP signal and see the admin and other html pages.
My application will likely stay inside the local network (at least for the time being). My next step is integrating a servo driver and creating an html page to control it.
User avatar
By jtheires@netins.net
#28556 Has anyone build a working HTML form that you would share?
I'm attempting to turn a servo using a button on my example.h page, but the description at http://www.john-lassen.de/index.php/pro ... -webconfig is unclear to me, where it says "In the HTML Part, put a Form, like you do it in your normal way."
Which file are we to modify? I assume example.h in the PROGMEM section?
Should the HTML form be using GET or POST method? Does it matter?
What action should be specified for the form?

Once I have this figured out, can I manipulate my servo object from example.h, or must I pass the value back to the main sketch (ESP_WebConfig_Master) for processing? I assume I can just do it in example.h, since it's included in the main...