Hi,
I'm looking into an issue with listening to UDP broadcasts on a Netduino 3 (Wifi). If I run the 4.3.2.0 firmware on the board I get the data packets I'm expecting. If I upgrade to 4.3.2.1 (or later) the UDP broadcasts aren't being received (with no code changes between deployments).
The associated code is summarised below.
public UdpSocket(string serverAddress, int port)
{
m_Client = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
m_Endpoint = new IPEndPoint(IPAddress.Parse(serverAddress), port);
}
public void Open()
{
m_Client.Bind(new IPEndPoint(IPAddress.Any, m_Endpoint.Port));
}
public bool CheckForIncomingData()
{
bool hasPayload = m_Client.Poll(PeekTimeoutInMilliseconds, SelectMode.SelectRead);
return hasPayload;
}
The CheckForIncomingData() detects incoming packets and indicates whether an associated message handling routine should commence - based on Poll() returning true (4.3.2.0) if data has been received. On 4.3.2.1 and higher Poll() always returns false.
Any suggestions?
Thanks,
Jason.