-1

I am working on wifi based LED project which involves various ESP to be connected to router. Basically grouping of ESP has to be done. The android app sends HTTP command to IP address which is given by router to the ESPs, the IP are not static and expires after some time. Now my question is how can mobile app can get the IP of all the ESP connected to router?

Does using HTTP protocol complicates the process? Shall I switch to multicast UDP? or use UnPn Protocol for scanning (Sounds complicated though).

Please help!

closed as off-topic by Majenko, rebatoma, Dat Ha, jfpoilpret, KIIV Nov 28 '16 at 8:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Arduino, within the scope defined in the help center." – Majenko, rebatoma, Dat Ha, jfpoilpret, KIIV
If this question can be reworded to fit the rules in the help center, please edit the question.

  • HTTP is a 1:1 connection. If you want 1:many you need a different protocol. Multicast UDP is possibly the best way to go - then the ESPs subscribe to the multicast address and you don't care what their IPs are. – Majenko Nov 27 '16 at 11:13
  • So how exactly UDP works? The packets sent to multiple ESPs at once reaches at the same time? For example I am sending value of RED led 254 to 6 ESP, all 6 ESP will glow to RED at once? – Embedded Geek Nov 27 '16 at 11:25
  • 1
  • 1
    This may also help: esp8266.com/viewtopic.php?f=29&t=2464 - it's wonderful what you find on Google... – Majenko Nov 27 '16 at 11:32
  • 1
    Not from me. nc (NetCat) may be available in homebrew, or it may not. You'll have to look for yourself. Or ask Google, which contrary to popular belief, isn't my name. – Majenko Nov 27 '16 at 11:49
0

The best protocol for these kind of applications is MQTT.

Read more here

  • MQTT has delay. I need instant response within milliseconds – Embedded Geek Nov 27 '16 at 15:58
0

You can go with UDP Multicast.

0

Yes, Multicast is the only option.

  • Can you back up your answer with some explanations please? – Nick Gammon Nov 27 '16 at 22:04

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