UDP Broadcast on WP8

    General discussion

  • So, the crappy WP7.1 SDK did not allow broadcast, but with the new API, it seems you can now bind, listen, and I guess, broadcast.

    So, I tried broadcasting a message but I get a SocketError "AccessDenied". Does anyone know how to broadcast on WP8, if it is possible ?

    Also, how do I emulate the WP Emulator being connected in WiFi to my local network ? I found something next to the debug launcher that lets you enable network simulation, but it doesn't seem to change anything on the emulator.

    Thursday, November 01, 2012 10:12 PM

All replies

  • Ok, so with Socket.ConnectAsync, it does work.

    Thursday, November 01, 2012 10:33 PM
  • I'm doing this on WP7.1, so I'm not sure why you say you can't?
    My problem is actually the opposite: What works on my Lumia 900 no longer works on my Lumia 920 - It doesn't receive any of the UDP broadcasts.

    Generally though UDP and the emulator is a no-go. You need a device to properly test this. I never got this to work with the emulator.


    Tuesday, November 06, 2012 5:57 AM
  • I just got a WP8 device and UDP broadcast is also not working for me, although it DID work for me in WP7.1.  Same code exactly.  I saw a post on Stackoverflow that may be related as well.  Looks like I am going to have to start over with respect to figuring out the tricks to make this API work right.  Always tough with a phone because you can't easily use wireshark to see what's really happening.  And, so far, I hate this Virtual switch stuff in Win8.


    Monday, December 10, 2012 5:08 AM
  • Use DatagramSocket instead.

    For the listners they can join the boradcast group using DatagramSocket.JoinMulticastGroup("GroupIPAddress") and the sending socket will be able to broadcast to this IPAddress.


    Mohamed Ali

    Thursday, December 13, 2012 9:47 PM
  • How do you do it on WP7.1 ? I'd be interested to know. Everything I tried didn't work.
    Monday, March 11, 2013 11:08 AM