I am getting response from hue when I send the following packet from my PC.
sprintf(wrbuf,"%s","M-SEARCH* HTTP/1.0\r\n HOST: 239.255.255.250:1900\r\n MAN: \"ssdp:discover\"\r\n MX: 4\r\n ST: libhue:idl\r\n\r\n");
sendto(sd,&wrbuf,sizeof(wrbuf),0,(struct sockaddr *)&serv,(socklen_t)len);
the response is as below.
recived: HTTP/1.1 200 OK
CACHE-CONTROL: max-age=100
EXT:
LOCATION: "ipofhue:80/description.xml"
SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/0.1
ST: upnp:rootdevice
USN: uuid:2f402f80-da50-11e1-9b23-0017880a6643::upnp:rootdevice
though if send the same packet from my openWRT router, I am not getting any response from hue.
my PC IP is 10.10.10.130, hue IP is 10.10.10.109 & my router br-lan IP is 10.10.10.254. I don't think I need to run miniupnpd from my router, because if I run it starts responding from router, I just need reply from upnp server which is running on hue hub which is I am not getting.
openwrt tool chain donot allow the M-SEARCH packet to reach wan port.it just ignore the the packet .kernel log says The IGMP message was from myself. Ignoring. Feb 4 06:18:55 user.info sysinit: The source address 172.22.xx.xx for group 239.255.255.250, is not in any valid net for upstream VIF. –