Update: Vote here - http://netmf.codeple...m/workitem/1166
We are very close with the recent changes in the Framework, but UDP Broadcast is still not working. Please vote so we can get this resolved before .NET Microframework 4.2 gets released!
I just Tested RC1 and receiving UDP Broadcasts (needed by NetBios) still doesn't work. I wrote my own simplified test to just listen for UDP Broadcasts. Below is a link to a video that shows the Netbios messages in Wireshark and the test code that shows how the Emulator works and the NetduinoPlus does not. A few things to notice in the video, the Netduino network lights flash showing that it is getting the Netbios messages. Also, you can see in Wireshark that the browser is emitting the Netbios name broadcasts. Netduino just seems to ignore them. But, if you send a directed message to the N+, it works (not shown). So Listening for UDP messages from a specific IP works, but Listening for UDP Broadcast messages is received and ignored by the firmware.
Here is the video (I recommend full-screen 720P viewing):
http://www.youtube.com/watch?v=0z28CSwE6rU
Here is the Test code:
public class Program { public static void Main() { // While this is running on the NetduinoPlus, navigate to http://netduino (on a machine on the same subnet) using (var serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)) { EndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 137); serverSocket.Bind(remoteEndPoint); while (true) { if (serverSocket.Poll(-1, SelectMode.SelectRead)) { var inBuffer = new byte[serverSocket.Available]; int count = serverSocket.ReceiveFrom(inBuffer, ref remoteEndPoint); if (count > 0) Debug.Print("SUCCESS! We see a Netbios name request! "); } } } } }
Also, if you look in Wireshark, there are LLMNR (Link-Local Multicast Name Resolution) messages sent along-side the Netbios messages which might also allow for name resolution, but I don't believe UDP Multicast is supported in .NET MF. There are bits and pieces of multicast support in the API, but no obvious way to make it work.
-Valkyrie-MT