-->
Page 5 of 8

Re: Device Discovery (UPnP, SSDP etc...)

PostPosted: Sun Sep 21, 2014 5:48 pm
by jonsmirl
They added DTLS after I was done working with COAP.

Here is an implementation:
http://tinydtls.sourceforge.net/

There may be another one inside of Contiki.

Re: Device Discovery (UPnP, SSDP etc...)

PostPosted: Tue Sep 23, 2014 7:14 am
by JDub
Cool, thanks!

Re: Device Discovery (UPnP, SSDP etc...)

PostPosted: Tue Feb 03, 2015 7:14 pm
by sfranzyshen
looks like a alternative to lwip lib ... bringing mdns and other mesh related advancements
http://www.esp8266.com/viewtopic.php?f=9&t=1495

Re: Device Discovery (UPnP, SSDP etc...)

PostPosted: Thu Mar 05, 2015 12:40 pm
by Demolitron
In SDK 0.9.5 there are now two IGMP functions to support multicast UDP: (*Sorry...This may be a bit of a thread hijack but this part is on topic.)

Code: Select allSin8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip)
Sin8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip)


I use JOIN like this...
Code: Select all    uPnP_Con.pCon = (struct espconn *) os_zalloc(sizeof (struct espconn));
    uPnP_Con.pCon->type = ESPCONN_UDP;
    uPnP_Con.pCon->state = ESPCONN_NONE;

    uPnP_Con.pCon->proto.udp = (esp_udp *) os_zalloc(sizeof (esp_udp));

    uPnP_Con.pCon->proto.udp->local_port = 1900;

    uPnP_Con.pCon->proto.udp->remote_port = 1900;
    uPnP_Con.pCon->proto.udp->remote_ip[0] = 239;
    uPnP_Con.pCon->proto.udp->remote_ip[1] = 255;
    uPnP_Con.pCon->proto.udp->remote_ip[2] = 255;
    uPnP_Con.pCon->proto.udp->remote_ip[3] = 250;

    uPnP_Con.pCon->reverse = NULL;

    espconn_regist_recvcb(uPnP_Con.pCon, slip_uPnP_OnRecieve);   
    espconn_regist_sentcb(uPnP_Con.pCon, slip_uPnP_OnSendComplete);
    espconn_create(uPnP_Con.pCon);

    IP4_ADDR(&uPnP_MulticastIP.ip, 239, 255, 255, 250);
    espconn_igmp_join(&LocalIP.ip, &uPnP_MulticastIP.ip); 


At that point uPnP request come flying in on the "slip_uPnP_OnRecieve" callback with great success!

However, after that I have a problem when sending multicast packets... It seems that the espconn takes the last incoming UDP packet's source IP address and uses that as the RemoteIP for subsequent transmissions. That makes life suck... Before, when using 0.9.3 I could send multicast packets just fine, but had no way to Rx them.

Anyone else seeing this? Anyone else have a hint or solution?

Thanks!