/
ESP8266 as bridge

ESP8266 as bridge

This mode uses the ESP8266 to provide WIFI for a microcontroller as WIFI-TO-SERIAL BRIDGE.

Setup

  1. On the ESP8266 side the esp-link firmware is used
  2. On the Arduino / Similar side the OpenDevice + el-client library is used.

Hardware Connections

ArduinoESP8266
RX (0)TX
TX (1)RX


It is recommended to use an external power supply or converter to power the ESP8266


ESP-LINK Configuration

The communication between the ESP8266 and the server uses the MQTT protocol, for this we need:

  • Enable SLIP on Serial port
  • Enable MQTT
  • Disable DEBUG log
  • ClientID : ApiKey/ModuleName
  • Username: ApiKey
  • Password: x

Code

.....


Debug Information

You can enable debug information passing a second parameter.

#include <SoftwareSerial.h>
SoftwareSerial debugport(10,11); // RX, TX
EspLinkConnection conn(Serial, debugport);
// ...
Serial.begin(115200); // ESP-Link port (change to correct port)
debugport.begin(115200);

In Leonardo as it has two series, it does not need the SoftwareSerial

You can also see some debug information on the Esp-Link web console

References


Related content

Device Setup
Device Setup
More like this
Remote Updates (OTA)
Remote Updates (OTA)
More like this
SonOff Integration
SonOff Integration
More like this
Connecting Devices using MQTT
Connecting Devices using MQTT
More like this
MQTT
More like this
Setting-up the Server
Setting-up the Server
More like this