-->
Page 1 of 2

Peer to Peer communication between ESP8266

PostPosted: Tue Oct 20, 2015 4:10 am
by trendchaster
Hello Everyone,
I want create a peer to peer network between 3 to 4 modules.Any idea how to do it?Any sort of links or pdf or any stuff that will get an idea for creating a network.

Re: Peer to Peer communication between ESP8266

PostPosted: Tue Oct 20, 2015 8:40 am
by tochinet
Interesting idea. Note however that TCP/IP is by definition a Client/Server paradigm, so peer-to-peer communication needs to be adapted to one of both options below :
- all nodes are clients, and there is one additional "gateway" or "hub" node that relays communication between them. This is used for both e-mail and MQTT for example. Disadvantages are that you have a SPOF and a two-hops channel.
- all nodes are both clients and server, and the application makes abstraction of that characteristic. Given the way the ESP API is defined, that could be a nice solution for you. I'd recommend a simple packet format and one "standard" UDP port everyone listens to. But you'll need to invent pretty much of it.

Re: Peer to Peer communication between ESP8266

PostPosted: Tue Oct 20, 2015 10:33 am
by River
Hello,

I'm novice with esp8266 and here, but to add my 2 cents you will need the SDK function called ESP-NOW.
But never tested it, I have a link written down here about this function:
http://bbs.espressif.com/viewtopic.php?t=689

Regards

Re: Peer to Peer communication between ESP8266

PostPosted: Wed Oct 21, 2015 12:06 am
by trendchaster
Hello tochinet,
Can you provide sample code for client/server using UDP and also can you explain in details.