0

I'm currently designing an IoT device that connects to a home network and an app to communicate over said network. I'm trying to find a way to reliably connect to the IoT device/ make the IoT device easily discoverable. I've had a few ideas on how I could do this:

  1. Local DNS. - however, not all routers support this so this may be a "try and if it doesn't work do something else"

  2. Send packets to the entire range of IPs on the network on a specified port, wait for a correct response. - This would be fine for smaller networks, but for places like universities and offices where the network is huge, it would be very slow. Also, this could throw red flags to network analyzers.

  3. Use SSDP (Simple Service Discovery Protocol). - This seems like the best option I've come across, however I've seen that some people are blocking the multicast address for the protocol due to the possibility of DDoS attacks which wouldn't allow it to work. Also, I'm not sure if this would work on all routers.

If there are any other solutions/ any arguments for/against the three options I've presented please let me know!

4
  • 2
    I assume an Internet-of-Things device would be designed in a way that it assumes an internet connection is always available? In which case, could you have the device attempt to connect to a known, public internet server/URL and identify itself to that server? (for security you could also install a certificate on the device and only allow connections to your public internet server from devices with a valid certificate). Commented May 20, 2020 at 18:25
  • Ethernet broadcast? E.g. LLDP (edit: actually not LLDP because switches won't forward LLDP, but something like LLDP)
    – user20574
    Commented Jul 23, 2020 at 20:37
  • 1
    mDNS would be the typical approach? But if you want to support discovery in networks of networks (i.e. not just within a single LAN) any broadcast-based solution will likely be blocked by the routers in between, and you will need something like a DNS server.
    – amon
    Commented Jan 17, 2021 at 15:38
  • DHCP based discovery has worked for years in home networks. Dns is just an interface to get the ip. Most Devices get registered in DHCP as part of network config.
    – Max N
    Commented Oct 14, 2021 at 17:17

1 Answer 1

2

Solution 1

Most home networks have DHCP on their Router to get ip of other Devices.

For example IoT Devices(tech1) and smartphone(mobile1). Both gets configured on first connection to the network with the DHCP Infos(inclusing dns settings) and the DHCP server generate dynamic dns entry( think ddns.org for local networks) from those data and let other Devices connect to their "resolver" hosted on the Router, which will send back the ip address of the device in question, tech1 asks for phone1 and vice versa. Dns as an interface will solve the problem of finding the device after its network address has changed. Same Name but different ip, no problem just connect to New ip and everything is back working.

Solution 2

Setup a wifi access point on the IoT device and connect directly to it, configure the device to then use a closeby wifi Hotspots and let it then connect to it.

I personally would do solution 2 as it solves the bootstrapping and discovery problem by directly connecting to it instead of a relay point like a wifi Router, which will then run as solution 1 descripts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.