-->
Page 1 of 2

How to connect 2 ESP8266-01 via 2 AP's to send (alarm) data

PostPosted: Wed Mar 01, 2017 6:21 pm
by henkoegema
I want to send a signal from an ESP8266-01 ( + a motion detector) to another ESP8266-01 (+ a speaker).
The two ESP8266 are too far away to communicate directly.
So one ESP has to be connected to AP1(Access Point) and the other ESP has to be connected to AP2.
AP1 & AP2 are on the same LAN.


Can somebody point me to the right direction how start this project ? (using Arduino IDE)
http:// ..........??

I've searched Google and YouTube, but I do not see the wood for the trees. :roll:

Re: How to connect 2 ESP8266-01 via 2 AP's to send (alarm) d

PostPosted: Fri Mar 03, 2017 10:52 pm
by mrburnette
AP1 & AP2 are on the same LAN.


Lucky you, "same LAN" hopefully implies same subnet which means means no routing, your address range will be x.x.x.0-255

So, on the same subnet, let both ESP clients (each to different AP) DHCP once to the router and then log into the router as admin, configure the ESP MAC addresses as static DHCP. This will ensure that your LAN subnet addresses for your ESP8266's is a fixed address ... now the sensor module can send a message directly to the alarm module since the address does not change.

Ray

Re: How to connect 2 ESP8266-01 via 2 AP's to send (alarm) d

PostPosted: Wed Mar 08, 2017 2:31 pm
by henkoegema
mrburnette wrote:
AP1 & AP2 are on the same LAN.


Lucky you, "same LAN" hopefully implies same subnet which means means no routing, your address range will be x.x.x.0-255

So, on the same subnet, let both ESP clients (each to different AP) DHCP once to the router and then log into the router as admin, configure the ESP MAC addresses as static DHCP. This will ensure that your LAN subnet addresses for your ESP8266's is a fixed address ... now the sensor module can send a message directly to the alarm module since the address does not change.

Ray



Hi Ray.

To configure the ESP's is not my problem.

My problem is how to use the POST and GET commands (or client.print() ) to send and receive the value of a variable from one ESP to another ESP.

Do I need to use HTTP? (setting op a webserver?) . Or what is the best way ?

Re: How to connect 2 ESP8266-01 via 2 AP's to send (alarm) d

PostPosted: Wed Mar 08, 2017 7:35 pm
by Barnabybear
Hi, for the post / send have a look at:
http://www.diychristmas.org/vb1/showthr ... p-wireless
Post 2 for the sketch and post 4 for a walk through. Post 5 uses a PIR.

To recieve have a look at:
http://www.diychristmas.org/vb1/showthr ... less/page2
Post 2 for the sketch and posts 5 and 6 for a walk through.