- Sun Jan 22, 2017 8:19 am
I'm coming late to your problem, and not even attempting to dig back through your symptoms and assumptions, but instead will say what I would do to get a node working on the network - just bear in mind it's from memory.
I'm using Win7 with a usb wifi adapter. I have an isolated wifi router (no internet connection).
The very first thing to do is check that your wifi router can be connected to in your computers list of available wifi connections (don't allow to reconnect automatically).
Then check that your browser (I'm using firefox because it manages disconnections more gracefully than chrome) can connect to your wifi routers admin page. While you're there, check if DHCP server is enabled, and make note of its range of available IP addresses. Also make note of the default gateway address (cos that's where all network traffic is gonna get shoved to by default), then log off and disconnect wifi when done.
Having proved all the wifi is working, let's focus on the Esp_Basic node. When in doubt, go back to basics and start with a clean slate - cos it's all so quick and easy to do with Esp_Basic, and it removes all doubts and question marks.
V3 A65 is currently the latest, and very stable until overloaded, so run the flasher as administrator, set the top left Comm port and Flash Size as appropriate, click top right Connect and note the red square changes to green, set your esp into flash mode, then click the big Format Flash button.
It only takes a couple of seconds to pop up an OK window, but BEWARE and don't be tempted to immediately reboot the esp back into flash mode again, because I've noticed the esp's blue led gives a brief blink about 10 seconds after format completion, which means it was probably doing something pretty important during that time which would most likely have unwelcome consequences if interrupted.
So reformat, wait 12 seconds, then reboot the esp back into flash mode, then click the big Firmware Flash button to reflash the firmware.
Reflashing will take a lot longer, but when done will briefly do some internal housekeeping, then eventually trigger an automatic esp reboot up into the default AP mode with IP address 192.168.4.1, which can all be confirmed in the serial monitor window.
Browse to it, and confirm you are starting with a clean slate by checking your Edit window is empty, then paste in a simple blinky test script or something, and save it.
Now go to the Settings page and MAKE NOTE OF THE DEFAULT SETTINGS, including the check boxes and empty fields. It's obvious that once you start CHANGING ANY OF THE SETTINGS you will be altering the esps default behaviour, which may not be what you are expecting, so it's very important to be able to return to definite known defaults when things go wrong.
IMPORTANT CAVEAT: There is an important exception to returning to defaults, which is after you've had the esp connected to a wifi router (which is of course the main intention). You may find that the esp keeps persistently logging back on to a previously connected wifi router using 'gost' details even after you've changed Station Mode (Connect to router) Name field back to blank default. To prevent the persistent connections, enter some non-blank fake name in the Station Mode Name field, which will cause the esp to fail to connect and default back to AP mode.
You might need to enter the correct Name but enter an incorrect password to get the required failed connection result. When you've stopped the unwanted persistent connections you can return the Name and Pass fields back to their blank default.
So by now you should know that the Station Mode (Connect to router) Name and Pass fields are the connection details for connecting to a wifi router.
After you are logged on to a router you can browse to the esp's IP address, which you would either have entered manually in Settings, or will be a DHCP address from the router, which you can discover by reading the serial monitor messages during connection.
I would recommend not changing the AP mode (brocast out its own ap) Name unless you have good reason, cos this is your friendly AP welcome home whenever you are having connection problems. Win7 wifi connections windows also has the unfortunate habit of remembering all previous names of the available device and making them all available for connecting to each time... not just the latest assigned name.
A word of warning:
If your nodes have been assigned DHCP addresses by the wifi router, then those nodes are registered with that router which can put them in touch with each other.
If you assign IP addresses manually, then manual nodes aren't in the club and may be ignored by all.
To illustrate that, consider a couple of wifi nodes that you have manually assigned addresses to and which don't connect to a wifi router. Without a default gateway steering them to an all-seeing router, the nodes are effectively blind to anything else on the same subnet. To put your 2 nodes in touch with each other, you could manually set each nodes default gateway address to point to the other nodes IP address, causing them to speak to each other by default. It should be clear that if you start manually assigning things you need to know what you're doing else expect unwanted consequences, so better to let DHCP take care of things if possible.
I wouldn't recommend ticking the 'Run default.bas at startup' box unless your program is fully debugged and ready to be deployed, because it has the effect of automatically running the script and causing automatic wifi connection, making it difficult to break the cycle... which can be done by pressing the gpio00 flashing button straight after reconnection to prevent the script autorunning (don't just hold it in during reboot though, else the esp will go into flashing mode, and possibly corrupt the script).
Hopefully there will be something above which can help you resolve your problems.