Introduction: Accesspoint - Station Communication Between Two ESP8266 MCUs

Picture of Accesspoint - Station Communication Between Two ESP8266 MCUs

Hello Makers!

In my previous instructable I made a WiFi communication between two ESP8266 MCUs through a home WiFi router. As I saw from the comments there are Makers who would like to use ESP8266 MCUs far from the range of a router. So here is a bare minimum instructable about an accesspoint - station communication which don't needs WiFi network.

Step 1: What Do You Need.

Picture of What Do You Need.

Things you need:

  • 2 pcs ESP8266 based MCUs e.g. Wemos D1 mini
  • 2 pcs micro USB cables
  • and a PC with Arduino IDE

Step 2:

Everything you have to do:

  • Download the attached sketches
  • Open them in two independent Arduino IDEs
  • Upload them into two ESP8266 MCUs.

The AP has a fix IP address eliminating the IP conflict with your other projects.

The station uses this predefined IP to connect to the AP. The station triggers the AP with a message and the AP answers it.

Opening the serial monitors of each running Arduino IDEs you can see the flow of the messages and answers.

The built in LED flashes during the communication. It is only visualization you can eliminate flashing if you don't like it.

Step 3: How to Open Independent IDEs

How to start two independent Arduino IDEs?

  • At first click on the accesspoint_bare_01.ino. It will open the first Arduino IDE.
  • Connect the first MCU.
  • Set the new port appears in the Tools->Port menu to the first MCU.
  • Upload the sketch. It will be your accesspoint.
  • After that go back to the downloaded sketches and double click on station_bare_01.ino. It will open the second Arduino IDE.
  • Connect the second MCU.
  • Set the new port appears in the Tools->Port menu to the second MCU. (If your IDEs are independent then port will not change in the first IDE window.)
  • Uplod the sketch. It will be your station.


AsifI24 (author)2017-09-09

Thanks !!! worked form me.
Two node MCU's talking successfully.

Any one who needs help can contact me on

PalA1 (author)2017-09-01


I want to communicate between two nodemcu's via same hotspot.

first node is connected to ir sensor and second one at the other end is also connected to different ir sensor. When the first ir sensor is trip and after that the second one at the other end in the same way. I want to calculate the difference

in time and display on the server or on the app. The distance between two end is approx 100 feet.

karlt1 (author)2017-08-07

thank you so much it work perfectly

the access point send data to the station.

the station send data to the access point.