Post topics, source code that relate to the Arduino Platform

User avatar
By Michael Phillips
#31117 I have been struggling for a couple of weeks with this one. I am building a (yet another) irrigation controller using the 8266. On startup it tries to log into my network. When it fails it starts an AP and presents a web page to collect the SSID & PW. I then test them by trying to connect to the network in the usual manner (wifi.begin(ssid,pw) and check if we are connected. In either case I want to present second page indicating success or failure. On success it tells the user what IP address to look for or, on failure, that something is misspelled and to try again. On success it would then reset and offer the irrigation control web page on your home network.

1 - It works occasionally! Once in a while the second page is displayed but not often.
2 - I see that opmode is 2 before I try the wifi.begin and 3 afterwards
3 - Execution clearly continues through the client.print code to present the web page but nothing appears on my mobile
device.
4 - My mobile device shows that it is waiting to receive a new page and I am still connected to the AP but it hangs there
Launch_AP.doc
Launch_AP.doc
Launch_AP.doc
with the progress bar showing that it received something but not enough.
5 – If I comment out the wifi.begin statement, the second page is displayed without a problem every time.
6 – I have tried disconnecting and reconnecting the AP without success.
WiFi.disconnect();
delay(100);
WiFi.mode(WIFI_AP);
WiFi.softAP( AP_ssid );

7 – I do have the mdns server running but only my mobile iOS device seems to support it. Not my Android or Chrome on my desktop.

(I haven't figured out how to post my code here so I attached it)
Launch_AP.doc

Thanks for your help,
Michael
You do not have the required permissions to view the files attached to this post.