I am attempting to create a wireless sensor network using ESP8266 devices and the Sming framework. Most of the code I have currently got comes from the basic WiFi example. I have been able to establish connections between up to 3 devices and do not foresee any problems connecting more.
I would like to have a sink node to which all the other devices send their data. This sink node could either be one of the ESP8266 devices or for example my smartphone with a WiFi hotspot. Sending a message from one device to a sink node could take multiple hops.
My problem lies with how I am going to have the devices communicate with each other. I am not looking for any specific routing algorithms or anything like that. I would like to know how I can have the ESP8266 devices communicate with each other using the WiFi link they have established. Do I need to use the TcpClient
and TcpServer
classes from the Sming framework?
When a device connects with another device, I seem to be unable to retrieve the IP address of that other device.