Hi All
I'm running the above combination of AP (station) & STA (client) & receive the following:
Received from client0 (IP/Size/Data): 192.168.4.2 / 33 / Sending to AP from client1 25'C
Connected to WiFi.localIP 0.0.0.0 WiFi.softAPIP 192.168.4.1
Received from client0 (IP/Size/Data): 192.168.4.3 / 37 / Send millis from client2: 10314294
Connected to WiFi.localIP 0.0.0.0 WiFi.softAPIP 192.168.4.1
Received from client0 (IP/Size/Data): 192.168.4.2 / 33 / Sending to AP from client1 25'C
Connected to WiFi.localIP 0.0.0.0 WiFi.softAPIP 192.168.4.1
Received from client0 (IP/Size/Data): 192.168.4.3 / 37 / Send millis from client2: 10316295
Connected to WiFi.localIP 0.0.0.0 WiFi.softAPIP 192.168.4.1
I need to be able to identify & store the incoming data from each STA for processing by a mega2560 which has the ESP8266-12 AP attached but all my attempts have failed.
Is there a way to use the STA IP addresses as a pointer to the data so as to get:
Received from client1 (IP/Size/Data): 192.168.4.2 / 33 / Sending to AP from client1 25'C
Received from client2 (IP/Size/Data): 192.168.4.3 / 37 / Send millis from client2: 10314294
thereby identifying the source of the data as client1 or client2 not both as client0
I've tried strcmp(port.remoteIP(), "192.168.4.2") but that doesn't compile, with the error:
invalid user-defined conversion from 'IPAddress' to 'const char*' [-fpermissive]
I've attched the 3 sketches (1 AP & 2 STA) in the hope someone can help
MyAdafruitFeatherSTA_9-7-16_3.ino (2 KB)
MyAdafruitHuzzahSTA_9-7-16_3.ino (3.81 KB)
MyAdafruitFeatherAP_9-7-16_1.ino (2.4 KB)