Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

UDP Broadcast receive on ND 3 (Wifi)


  • Please log in to reply
No replies to this topic

#1 ukkiwisurfer

ukkiwisurfer

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • LocationLondon

Posted 23 October 2015 - 09:14 PM

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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.