- Esp8266 Wifi Virtual Serial Port
- Transparent Esp8266 Wifi-to-serial Bridge
- Esp8266 Wifi Serial Port
- Esp8266 Wifi Serial Monitor
- Esp8266 Serial To Wifi Bridge
The WeMos D1 Mini is an inexpensive ESP8266-based WiFi board that is low-profile but just as powerful as any NodeMCU or ESP8266-based microcontroller. The D1 Mini is incredibly versatile because it is inexpensive, WiFi-enabled, and fully compatible with the Arduino platform. In this tutorial, the ES. With the popularity of Wifi IoT devices, there is an increasing demand for low-cost and easy-to-use WiFi modules. ESP8266 is a new player in this field: it’s tiny (25mm x 15mm), with simple pin connections (standard 2×4 pin headers), using serial TX/RX to send and receive Ethernet buffers, and similarly, using serial commands to query and change configurations of the WiFi module. Jan 05, 2019 In Station Mode (STA), the ESP8266 WiFi Module will be connected to a WiFi Network that is already setup by an Access Point, like a WiFi Router. Soft Access Point (AP) The second mode of operation is Access Point (AP) Mode. In this mode, the ESP8266 NodeMCU acts as an access point and provide WiFi Network to other stations (like mobile or laptop).
Is it possible to have the serial port on the air like wireless mice and keyboards? Of course, it can be done using lovely WiFi module ESP8266, and by using WiFi you have not to make a dongle yourself and also you can have a serial port over the internet. Wow, I just wanted a wireless serial port, now I also have a serial port over the web. Apr 26, 2018 A simple guide to sending data from one ESP8266 to another over Wi-Fi using an ad-hoc, device to device network, without using a wifi router. The ESP8266WebServer library allows you run an ESP8266 as a basic webserver and access point. The ESP8266 WiFi Module is a self contained SOC with integrated TCP/IP protocol stack that can give any microcontroller access to your WiFi network. The ESP8266 is capable of either hosting an application or offloading all Wi-Fi networking functions from another application processor.
The esp-link firmware connects a micro-controller to the internet using an ESP8266 Wifi module.It implements a number of features:
- transparent bridge between Wifi and serial, useful for debugging or inputting into a uC
- flash-programming attached Arduino/AVR microcontrollers andLPC800-series and other ARM microcontrollers via Wifi
- built-in stk500v1 programmer for AVR uC's: program using HTTP upload of hex file
- outbound REST HTTP requests from the attached micro-controller to the internet
- MQTT client pub/sub from the attached micro-controller to the internet
- serve custom web pages containing data that is dynamically pulled from the attached uC andthat contain buttons and fields that are transmitted to the attached uC (feature notfully ready yet)
The firmware includes a tiny HTTP server based onesphttpdwith a simple web interface, many thanks to Jeroen Domburg for making it available!The REST and MQTT functionality are loosely based on espduinobut significantly rewritten and no longer protocol compatible, thanks to tuanpmt for theinspiration!
The following people contributed significant functionality to esp-link:brunnels (espduino integration),cskarai (custom dynamic web pages),beegee-tokyo (lots of code documentation),susisstrolch (syslog feature),bc547 and katast (misc contributions).Esp-link is the work of many contributors!
Note that http://github.com/jeelabs/esp-link is the original esp-link software which hasnotably been forked by arduino.org as Esp-Link and shippedwith the initial Arduino Uno Wifi. The JeeLabs esp-link has evolved significantly since thefork and added cool new features as well as bug fixes.
Quick links
In this document: goals, uses, eye candy,getting-started, serial-bridge, contact.
Separate documents:
- hardware configuration, serial flashing
- troubleshooting, LED indicators
- building esp-link, over-the-air flashing
For quick support and questions chat ator (a little slower) open a github issue.
Releases & Downloads
Esp-link uses semantic versioning. The main change between versions 1.x and 2.x was theaddition of MQTT and outbound REST requests from the attached uC. The main change between 2.xand 3.x will be the addition of custom web pages (this is not ready yet).
- The master branch is currently unstable as we integrate a number of new features to getto version 3.0. Please use v2.2.3 unless you want to hack up the latest code!This being said, the older functionality seems to work fine on master, YMMV...
- V2.2.3 is the most recent release.It has a built-in stk500v1 programmer (for AVRs), work on all modules, and supports mDNS,sNTP, and syslog. It is built using the Espressif SDK 1.5.4.
- V2.1.7 is the previous release.
- See all releases.
Esp-link goals
The goal of the esp-link project is to create an advanced Wifi co-processor. Esp-link assumes thatthere is a 'main processor' (also referred to as 'attached uController') and that esp-link's roleis to facilitate communication over Wifi. This means that esp-link does not just connect TCP/UDPsockets through to the attached uC, rather it implements mostly higher-level functionality tooffload the attached uC, which often has much less flash and memory than esp-link.
Where esp-link is a bit unusual is that it's not reallyjust a Wifi interface or a slave co-processor. In some sense it's the master, because the mainprocessor can be reset, controlled and reprogrammed through esp-link. The three main areas offunctionality in esp-link are:
- reprogramming and debugging the attached uC
- letting the attached uC make outbound communication and offloading the protocol processing
- forwarding inbound communication and offloading the protocol processing
The goal of the project is also to remain focused on the above mission. In particular, esp-linkis not a platform for stand-alone applications and it does not support connecting sensors oractuators directly to it. A few users have taken esp-link as a starting point for doing thesethings and that's great, but there's also value in keeping the mainline esp-link projectfocused on a clear mission.
Esp8266 Wifi Virtual Serial Port
Esp-link uses
The simplest use of esp-link is as a transparent serial to wifi bridge. You can flash an attacheduC over wifi and you can watch the uC's serial debug output by connecting to port 23 or lookingat the uC Console web page.
The next level is to use the outbound connectivity of esp-link in the uC code. For example, theuC can use REST requests to services like thingspeak.com to send sensor values that then getstored and plotted by the external service.The uC can also use REST requests to retrieve simple configurationinformation or push other forms of notifications. (MQTT functionality is forthcoming.)
An additional option is to add code to esp-link to customize it and put all the communicationcode into esp-link and only keep simple sensor/actuator control in the attached uC. In thismode the attached uC sends custom commands to esp-link with sensor/acturator info andregisters a set of callbacks with esp-link that control sensors/actuators. This way, customcommands in esp-link can receive MQTT messages, make simple callbacks into the uC to get sensorvalues or change actuators, and then respond back with MQTT. The way this is architected is thatthe attached uC registers callbacks at start-up such that the code in the esp doesn't need toknow which exact sensors/actuators the attached uC has, it learns that through the initialcallback registration.
Eye Candy
These screen shots show the Home page, the Wifi configuration page, the console for theattached microcontroller, and the pin assignments card:
Getting Started
Transparent Esp8266 Wifi-to-serial Bridge
To get started you need to:
Esp8266 Wifi Serial Port
- prepare your esp8266 module for serial flashing
- download the latest esp-link release image (you can build your own later)
- flash the firmware
- configure the Wifi in esp-link for your network
You can then attach a uC and upload a sketch:
- attach a uC (e.g. arduino) to your esp8266 module
- connect via the serial port to see a pre-loaded sketch running
- upload a fresh version of the sketch
From there, more advanced steps are:
- write a sketch that uses MQTT to communicate, or that makes outbound REST requests
- create some web pages and write a sketch that populates data in them or reacts to buttonsand forms
- make changes or enhancements to esp-link and build your own firmware
Serial bridge
In order to connect through the esp-link to a microcontroller use port 23. For example,on linux you can use nc esp-hostname 23
or telnet esp-hostname 23
.
Esp8266 Wifi Serial Monitor
The connections on port 23 and 2323 have a 5 minute inactivity timeout. This is standard withEspressif's SDK and esp-link does not change it. The reason is that due to memory limitations only afew connections can be open (4 per port) and it's easy for connections to get 'lost' staying openforever, for example, due to wifi disconnects. That could easily make it impossible to connect toesp-link due to connection exhaustion. Something smarter is most likely possible...
Note that multiple connections to port 23 and 2323 can be made simultaneously. Esp-link willintermix characters received on all these connections onto the serial TX and it willbroadcast incoming characters from the serial RX to all connections. Use with caution!
If you are using esp-link to connect to the console of a linux system, such as an rPi, youwill most likely see what you typed being echoed twice. If you are on a linux system usetelnet and issue a mode char
command (in telnet, hit the escape char ^]
and type mode char
at the prompt). If you are using putty on Windows, open the connection settings andin the terminal settings set both local echo
and local line editing
to off
.
Contact
Esp8266 Serial To Wifi Bridge
If you find problems with esp-link, please create a github issue. If you have a question, pleaseuse the gitter chat link at the top of this page.