So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By BobAGI
#64420 I am completely new here, got wind of the ESP8266 only this morning and I have searched the net to find out if my use case can be implemented with a module using this chip..
What I would like to know is if the following can be done with an ESP8266 module:

1) It shall implement an Access Point to which a PC or Smartphone can connect to using WPA protocol
2) The module shall have a serial port available for communication via the WiFi network (like a port server)
3) A connected client should be able to connect to a TCP port on the AP device to communicate with the serial port
4) It shall be possible to transfer binary data to the device connected to the AP serial port (both directions)
5) Data transfer rate on the serial line must be at least 38400 baud

We are trying to replace an existing solution using a not so good WiFi adapter, which resets the AP function at certain times. One such time is when the remote client disconnects from the TCP port serving the serial line, then the whole AP resets!
I hope this chip can help out here.

We use Microchip PIC24 controllers for our embedded work and we have limited experience in creating low-level TCP/IP functions in firmware so we need as much ready-made as possible.
User avatar
By BobAGI
#64470 Thanks, I did so and have a follow-up question:
The page linked to discusses the "Serial Bridge" and it seems like it works as follows:
1) It connects the ESP serial port to TCP port 23 (TELNET) on the network side.
2) Data received from the serial side are sent out to a connected client via WiFi
3) Data sent to the ESP WiFi unit on port 23 are sent on to the serial port on ESP

So far OK, but I would like to know if there are TELNET command intercepts implemented because our use case involves a purely binary protocol, so each byte sent in both direction must be forwarded without change. Any kind of "protocol interference" would kill our use of this function.
Is this not happening?

And can this system be used on an AdaFruit HUZZAH ESP8266 breakout board https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/overview? This board is what I can lay my hands on...

Greatly appreciate any help here since I am a complete novice regarding the ESP8266 use.
User avatar
By alex_g
#64601 Hi BoB,

You might also want to have a look at the NodeMCU firmware solution.
This provides a Lua scripting interface to a whole bunch of libraries on the ESP8266, including the "net" and "wifi" and "uart" libraries, which, from the spec you give, I think might cover your needs:
http://nodemcu.readthedocs.io/en/master/

If you scroll down on the right sidebar you can see descriptions of all the functionality offered, which should help you decide quite easily.

Since you state that you don't wan't to mess too much with low-level stuff, this may be just the thing for you. You can use TCP and UDP and you are not in any way bound by Telnet protocols, I don't think.

Further, this stuff works on just about all ESP8266 products, so even a humble, sub $2, ESP-01 might do for you, never mind something as well supported as an aftermarket hobbyist's board, like Adafruit or whatever.