-->
Page 1 of 2

Controlling GPIO's of client esp's through server esp

PostPosted: Sun Sep 06, 2015 3:30 am
by Ashutosh choudhary
I have 3 Esp8266 and all are connected to each other. i.e.
1st esp as AP
2nd esp as StationAP (connected to 1st esp)
3rd esp as Station (connected to 2nd esp)

Is it possible to control GPIO's of 2nd/3rd esp from my main esp (1st)? If yes, then how?

Re: Controlling GPIO's of client esp's through server esp

PostPosted: Sun Sep 06, 2015 8:16 am
by martinayotte
With TCP Client/Server, you can establish a protocol to send commands to them.

Re: Controlling GPIO's of client esp's through server esp

PostPosted: Sun Sep 06, 2015 9:26 am
by Ashutosh choudhary
ok, first of all thanks for the reply....the problem is i'am able to send a string to my client, but how do I control the gpio's with that, should i decode the string (as in read every string and act accordingly) or their is a way around to directly send a command which operates gpio?

another issue...on the client side do i always need to keep the client active ( listen mode ) ?
or is it possible to wake up the client whenever required?
I know I can use time out but that also keeps the client active.....is it possible to only make it active whenever a server need to send a message?

Re: Controlling GPIO's of client esp's through server esp

PostPosted: Sun Sep 06, 2015 9:38 am
by martinayotte
I hope you don't try to make such thing with plain AT firmware, it will be a pain.
You need to do that with custom firmware which provide TCPServer/TCPClient functionalities.
Yes, this is usually done by parsing commands and acting accordingly.
Unfortunately, you're right, there is no way to have a TCPServer wake up until packet arrive, it needs to listen the port all the time, so no sleep mode is possible here.