Bug #663

Multicast server is not responding on sensor network

Added by Hammel about 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:12 Aug 2018
Priority:ImmediateDue date:
Assignee:Hammel% Done:


Target version:Iron Man - 0.5.0
Severity:01 - Critical


imlightsw is sending multicast announcement on sensor network but piboxd does not appear to be responding. I need to run debug on piboxd to see if it ever sees the request and, if it does, what happens when it tries to respond.

Associated revisions

Revision 6611af2c
Added by Hammel about 3 years ago

RM #663: Extend multicast server to add available interfaces that are IPv4, not loopback and configured instead of just
IPADDR_ANY which only grabs the first one it finds (or maybe a random one, who knows).


#1 Updated by Hammel about 3 years ago

  • Project changed from Iron Man to Monitor
  • Category deleted (Monitor)

#2 Updated by Hammel about 3 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

It seems to me that specifying INADDR_ANY for the interface to add to the multicast group will tell the kernel to "pick" an interface as opposed to "pick all" interfaces. In order to add all interfaces (or at least the ones we want here) we need to

  • call getifaddr to get a list of interfaces
  • iterate through the list of interfaces
    • If type is INET and entry->ifa_name != "lo0" and entry->ifa_addr != NULL
      • struct sockaddr *foo = entry->ifa_addr
      • in_addr ip_addr = ((sockaddr_in)foo).sin_addr;


    if (setsockopt(sd,IPPROTO_IP,IP_ADD_MEMBERSHIP,&mreq,sizeof(mreq)) < 0)

This way each interface is specifically added to the group.

#3 Updated by Hammel about 3 years ago

Apparently, IBM agrees with me.

And here's an example of testing if each interface is a wireless interface or not.

#4 Updated by Hammel about 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 10 to 100

Implemented and tested on hardware. This fixes the problem of the monitor's piboxd not seeing the node's multicast request. Now it sees it.

Changes committed and pushed.

Closing issue.

Also available in: Atom PDF