Statistics: Posted by gustavo — Fri Oct 14, 2016 5:51 pm
Code:
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");
}
}
Statistics: Posted by raspberrypidmx — Thu Oct 06, 2016 11:09 pm
Statistics: Posted by gustavo — Tue Sep 06, 2016 6:28 pm