G120 - DPWS and SSDP

Does anyone have experience with DPWS? I want to have my DPWS service respond to SSDP Probe requests such that it is listed in Windows Explorer (or uPnP Spy). AFAIK, DPWS doesn’t seem to respond to general Probe messages, only directed messages are honored with Probe Match responses. Is there a way to get DPWS to respond to generic Probe requests?

FYI, I have a working SSDP server implemented which ensures the device is listed in Windows Explorer, so if DPWS will not be able to help me out, I’ll merge the two and implement it myself, but that’s a lot of work :slight_smile:

Actually, DPWS is working just fine (after trying many different devices, the G120HDR works :-D) (using firmware and netmf 4.2)

DPWS uses a combination of SOAP-over-UDP and HTTP AFAIK. Not sure what the right answer to your question is :wink:

I’m guessing you hint at the initialize method of Device, which for me is:

Device.Initialize(new WS2007HttpBinding(new HttpTransportBindingConfig(guid, 8084)), version);

The weird thing is, the Hello and Bye messages are SOAP-over-UDP, which didn’t work on Fez Panda II nor Netduino Plus 2, but does work on the G120. Any clue as to the SSDP discoverability by chance?

Well, I have a PoC with SSDP which is working. It uses UDP multicast:

            byte[] multicast = new byte[8]; // IPAddress.Any ==, initialized as last 4 bytes.
Array.Copy(IPAddress.Parse(SsdpServer._broadcastAddresses[0]).GetAddressBytes(), multicast, 4);

catch (SocketException se)

On other boards, SetSocketOption with Multicast fails with the caught SocketException. The G120 works :wink:

Thanks for the formatting tip. Can you explain why it would work on the G120 (as it does on ChipWorx I think), but not on the others, if the code is the same?

Left to mystery then :slight_smile: As long as it works, I’m happy!

I also have some UDP code that is working fine on a G120, but does not work on a COBRA I (EMX). Both using Firmware 4.2.7.
The difference might be that EMX ususes Builtin Ethernet and G120 ENC28.

That might be the case; this is my first time using the ENC28 and I’m quite happy DPWS is working. I’m currently working on getting SSDP code ported to work in conjunction with DPWS so my devices will be listed in Windows Explorer :slight_smile:

@ martijnh -

It is very strange however a good news if DPWS UDP works on G120, but it is in complete opposition with what some other have noticed on the forum, so I’m a little bit lost in confusion…

Maybe GHI could explain what it would work…but could not work :slight_smile:

Regarding, Chipworkx, it is normal that everything is fine, as this module only works on v4.1 that is not bugging on UDP…

I have created the whole UPNP STACK for NETMF it is working and requires a bit of code clean up, unfortunately I stopped working on it due to the udp issues with 4.2.

Windows explorer sees my device as a upnp already and I control it and all that good stuff :slight_smile:

And of course I’ll share the code once all is clean… :wink:

And of course if you don’t mind testing unfinished and unleaded code please let me know and I’ll upload it…

@ Jay Jay - I don’t mind testing unfinished code. I was thinking of implementing SSDP for mIP. And there is nothing I can’t do in mIP with UDP.

@ Jay Jay - I am currently implementing SSDP, my device show in Explorer as well and I’m currently implementing executing actions. I intend on sharing my code once complete; might be worthwhile combining our efforts? As I don’t see a method of responding privately, look me up in the GAL using my board alias :wink:

By the way, I might be doing something wrong (or right), but my device is running 4.2 and works just fine.

Hi martijnh,
The code works to an extent on 4.2 but not quite right, for instance if your NETMF IS a controller then it will not see all the broadcasts of the other UPNP devices, and that is important if you want to establish Master slave com between all your netmf devices using upnp…

I’ve tested my code on Spider 4.1 works as expected and on Mountaineer 4.2 works but to a limit. The code compiles and deploys on Panda :wink: which is important for me as those board can play the slave on the network, but not tested since I do not have the wiznet Ethernet module, but the code has the away to limit the connection to 4 or less sockets since that is the limit on the panda :slight_smile:

Edit: I’ve created a project on codeplex MFUPnP and in the process of finalizing the code… or should the project be named NetMFUPnP ?


Hi Jay Jay,

I think you’re way more into uPnP then I am :wink: I have much working, but might have missed some of the relationship elements you mention. Looking forward to investigating your implementation, which I’m currently unable to find on CodePlex. If you look me up in the GAL, we can also connect internally if you’d like.

I’m currently reflecting on using my uPnP implementation to support hybrid DPWS/WCF/uPnP.