-->
Page 2 of 77

Re: "universal I/O bridge"

PostPosted: Thu Jul 09, 2015 2:14 pm
by eriksl
This afternoon I decided to upgrade to the latest SDK, 1.2.0. The result was that it wasn't working anymore, no more WLAN connectivity. I followed the usual route of flashing an AT-style firmware, but still no WLAN connectivity. The system config area just wasn't recognised anymore (as seen from UART debug output). I don't know what Espressif exactly did, but is just not working.

So I moved the WLAN configuration (SSID, password) to my own config. That works and still works.

To get the proper values into the config, I added a "quick bootstrap" mode. When the ESP is started, you have 30 seconds to enter the SSID and the password over the UART. Enter the SSID (no spaces allowed!), then a space, then the password and then a linefeed (no carriage return! use ^J if necessary, instead of enter). The SSID and the password will be entered in the config, written to non-volatile storage and it will try to connect immediately as well. See the output to the UART for progress.

If you don't want the messages on the UART, set print_debug to 0 in the config. The quick bootstrap mode will continue to work, but in silence. After 30 seconds, the channel is completely transparent again.

Re: "universal I/O bridge"

PostPosted: Fri Jul 10, 2015 2:35 am
by omersiar
Bootstrap mode seems OK for most situation, what if i have always incoming messages (byte stream) from UART and ESP restarts for some reasons?

Re: "universal I/O bridge"

PostPosted: Fri Jul 10, 2015 2:42 am
by eriksl
That's something I'm trying to get my head around now. Open for proposals ;)

The thing is, you can't simply turn it off after one "round", because at te moment we're listening for the bootstrap line, we can't now if the information in the config is valid, so if you're going to be able to just connect to tcp port 24.

I was thinking of an obligatory "preamble", but that's never right, you can't pick any character or sequence of characters that will never arrive in normal mode. You'd arrive at something like a BREAK, but it isn't that simple to generate in all terminal emulators, I am not even sure it's supported by all USB converters.

I can make the bootstrap mode optional, but I don't see how one is going to get connected the first time, then...

Re: "universal I/O bridge"

PostPosted: Fri Jul 10, 2015 3:13 am
by omersiar
What if we use a pin to enter wifi config mode? esphttpd project uses a pin to restart module in AP mode (with clean config), so user can change the mode whatever he or she like (STA or AP). Your universal I/O bridge can be used as Home appliance controller, smart home hub, etc... very promising. Users may want it to use in STA mode, too.