-->
Page 9 of 9

Re: P2P: ESP in AP mode and ESP in STA mode not working

PostPosted: Mon Feb 26, 2018 8:24 pm
by Craig54321
Martin, Thanks for the MyAPClient an Server. I got them to work and am now trying to learn from them. My aim is to get to the TCP communication. I'm trying to read an accelerometer in a high vibration environment (a tennis racket) transmit this data from the on-racket ESP8266-client to a ESP8266-server that sits on a bench and collects the data on a SD card. But for the moment, learning... your many posts and the Kolban book have been great help.

Is the statement "server.handleClient();" in the MyAPServer loop persistently called? It appears so. That would mean it is checked 125 or 500 times each blink. If so, that would look like a persistent connection I was looking for. Further, that would lead me to think that I could leave the client connection on full time during a data collection session. Would that be okay?

Re: P2P: ESP in AP mode and ESP in STA mode not working

PostPosted: Wed Feb 28, 2018 7:55 pm
by Craig54321
Maybe this is of use to others. Since I spent more time than I care to admit on this I thought I'd share
it for others to use or for more knowlegeble people to correct. In looking through the wealth of Arduino
example code and Martin's code (both true gifts) I couldn't find documentation on the programming
details. So I put my head down to DIY.

The details are in the attachment because I was loosing control of my tab's in this UI.

Hope it helps and please comment if I've got it wrong.

Re: P2P: ESP in AP mode and ESP in STA mode not working

PostPosted: Sat Jul 14, 2018 5:46 pm
by mugangamic
I believe this is very similar what i have faced.
Simple question that i need to understand better:
02 nodemcu + LDR + RELAY (without using mqtt).
Can i have 01 nodemcu (with LDR) working as a server and once ldr reach a certain value it send a command to trigger the client (nodemcu with relay)?
I have seen 01 nodemcu (with LDR) working as a client (get request) and nodemcu with relay as server. But as i did mentioned before i would like to have LDR connected to server and the server send commnd to trigger the client (nodemcu with relay).

Any suggestion regarding use a specific protocol or whatever subject i should have a look it would be very welcome.

Many thanks