Impossible to join multicast group on RTOS SDK 1.4.x

gustavo
Posts: 24
Joined: Thu Apr 28, 2016 6:01 pm

Impossible to join multicast group on RTOS SDK 1.4.x

Postby gustavo » Tue Sep 06, 2016 6:28 pm

I'm trying to use SSDP on the ESP8266 with the RTOS SDK.

I have tried both the 1.4.0 and the 1.4.2 (git 1.4.x branch) but I can't join any group.
I can't even catch any igmp packet from the esp.

I read this thread: viewtopic.php?t=1058 and it seems that at the time it wasn't possible to use multicast on the RTOS SDK.

Please advise.
Gustavo

gustavo
Posts: 24
Joined: Thu Apr 28, 2016 6:01 pm

Re: Impossible to join multicast group on RTOS SDK 1.4.x

Postby gustavo » Wed Sep 07, 2016 5:33 pm

It seems to be possible using the espconn api instead of the lwip socket api.

User avatar
raspberrypidmx
Posts: 15
Joined: Wed Apr 27, 2016 6:15 am
Contact:

Re: Impossible to join multicast group on RTOS SDK 1.4.x

Postby raspberrypidmx » Thu Oct 06, 2016 11:09 pm

Hi Gustavo,

It is possible. I have the following working code with RTOS SDK 1.4.2 :

Code: Select all

void ICACHE_FLASH_ATTR handle_udp_join_group(void) {
   printf("handle_udp_join_group\n");

   struct ip_addr ipgroup;
   struct ip_info local_ip;

   const WIFI_MODE mode = wifi_get_opmode();

   if (mode & STATION_MODE) {
      wifi_get_ip_info(STATION_IF, &local_ip);
   } else {
      wifi_get_ip_info(SOFTAP_IF, &local_ip);
   }

   ipaddr_aton("239.255.0.1", &ipgroup);

   const uint8_t iret = igmp_joingroup(&local_ip.ip,(struct ip_addr *)(&ipgroup));

   if (iret != ERR_OK) {
      printf("Could not join\n");
   }

}


The full code can be found here -> https://github.com/vanvught/rpidmx512/t ... os_sdk_rpi

gustavo
Posts: 24
Joined: Thu Apr 28, 2016 6:01 pm

Re: Impossible to join multicast group on RTOS SDK 1.4.x

Postby gustavo » Fri Oct 14, 2016 5:51 pm

I think I tried that at the time...
Either way I got it working with the espconn api.

Who is online

Users browsing this forum: No registered users and 4 guests