Chat freely about anything...

User avatar
By MikeBolton
#5389 Have just joined this forum and possess a ESP8266 (several in fact). Currently these are connected to the serial port of a PC so I can send and receive any AT commands and +IPD inputs for test purposes. We have a project that involves using the ESP, along with a microcontroller, as a service provider to multiple Smartphones running a common app. This app. along with the vast majority of WiFi devices that connect to a 'service' , use a service discovery mechanism to look for and attach to that particular service. This is pretty universally the Bonjour / Zeroconf protocol. I was amazed to find that a Forum search for 'zeroconf' gave NO hits at all. Has anyone implemented a service discovery scheme with an ESP8266? Is it even possible? It requires the ESP to accept a multicast enquiry to a specific IP (224.0.0.251 and port 5353) It is UDP. if I set the ESP using the AT commands to look on this IP / port, will it get anything - and can it reply with a multicast? The service name (which is a .local) is in the microcontroller so easy to send with AT commands - in principle at least.

If the ESP cannot partake in the (very common) service discovery, it is pretty useless. I'm sure it should be able to.

How many clients (phones) can I connect at the same time? Once the service has been connected, the transactions are then TCP/IP.

Regards

Mike Bolton
User avatar
By MikeBolton
#5553 Given that my (new) ESP8266 implements a DHCP server, much to my and others surprise, this suggests that it can listen on 255,255,255,255, port 68 and dole out IP addresses on demand. (firmware 0.9.4). In other words it can work in multicast / broadcast, at least in boot mode. If it can work in this mode, it should be able to work for a zeroconf multicast on 224.0.0.251 on port 5353? How many multicast ports can it have open at any one time?

Any thoughts?

Mike Bolton
User avatar
By MikeBolton
#33447 I am totally flabbergasted that there have been NO replies to my posts on this subject. Given that the ESP8266 is supposed to work in the IoT sphere, how can any 'device' use it if no client can find it? It is ridiculous that every device that needs to connect to a ESP8266 needs to know, and have typed in, the IP address of that particular ESP8266 and the TCP port to be used. (OK, this is how we are forced to do it at present). Imagine that there are thousands of ESP 'devices' out there and you have a Smartphone app. that runs these 'devices'. Without mDNS-SD, every such device will need either a different IP address and / or port or, even if they all have the same IP address etc. then only one can be used in a given range. If each has a different IP address, who decides on it and how will the user know what it is? With the (ubiquitous) 'service discovery' or Zeroconf mechanism the app (or client) only needs to ask 'who can provide this service' and the ESP will reply with its IP address and port. This is absolutely standard practice. Its absence from the ESP8266 makes it virtually useless for any 'standalone' scheme.

Mike Bolton
User avatar
By eduperez
#33488 I guest most people is using something along the lines of MQTT, where all devices use a central message broker to send and receive messages. Add some automation software (for example openHAB) on top of that, and you are done.

However, if you really need to establish direct connections with your nodes, I would configure the DHCP server in your network to assign a fixed IP address to each of them, and the DNS server to resolve specific names to those addresses.