Hi,
I have a STM32F407 that i was running multicast on with no issues, i have converted over to OS5 and i am currently unable to send or receive any multicast traffic. Can anyone provide any feedback or know why this would not be working. Code is as follows:
void Multicast(){
UDPSocket Multicast_Server(ð0);
Multicast_Server.bind("5007"); Bind to port 5007
if (Multicast_Server.join_multicast_group("224.1.1.1") != 0) {
Serial0.printf("Error joining the multicast group\r\n");
while (true) {}
}
SocketAddress Multicast_Client;
char Multicast_Buffer[1024];
while(true){
char out_buffer2[] = "Multicast Data etc etc";
Multicast_Server.sendto(Multicast_Client, out_buffer2, sizeof(out_buffer2));
Serial0.printf("Waiting for Multicast Packet\r\n");
int n = Multicast_Server.recvfrom(&Multicast_Client, Multicast_Buffer, sizeof(Multicast_Buffer));
Serial0.printf("Packet Received is :%s %s\r\n", Multicast_Client.get_ip_address(), Multicast_Buffer);
}
}
Hi,
I have a STM32F407 that i was running multicast on with no issues, i have converted over to OS5 and i am currently unable to send or receive any multicast traffic. Can anyone provide any feedback or know why this would not be working. Code is as follows:
void Multicast(){ UDPSocket Multicast_Server(ð0); Multicast_Server.bind("5007"); Bind to port 5007 if (Multicast_Server.join_multicast_group("224.1.1.1") != 0) { Serial0.printf("Error joining the multicast group\r\n"); while (true) {} }
SocketAddress Multicast_Client; char Multicast_Buffer[1024]; while(true){ char out_buffer2[] = "Multicast Data etc etc"; Multicast_Server.sendto(Multicast_Client, out_buffer2, sizeof(out_buffer2)); Serial0.printf("Waiting for Multicast Packet\r\n"); int n = Multicast_Server.recvfrom(&Multicast_Client, Multicast_Buffer, sizeof(Multicast_Buffer)); Serial0.printf("Packet Received is :%s %s\r\n", Multicast_Client.get_ip_address(), Multicast_Buffer); } }