Tools for UPnP running on Linux/MONO

After many requests, I again attempted to get the Developer Tools for UPnP Technologies working on Linux. Some have noted that it already almost worked, the user interface would show up but no device would get discovered. Well, tonight I found a way to get around the problem and get SSDP working correctly on my Ubuntu 10.04 machine! Below are the first screen shots of Device Sniffer and Device Spy running correctly on Linux. I don't have a Linux package (.deb or .rpm) yet with the binaries, but I hope at some point I will also have that packaged up. So, tonight I uploaded new versions of v0.0.23 with the Linux fixes. People with Linux will need to extract the binaries from the .MSI or get the source and compile it with MonoDevelop which is pretty easy.

In case someone cares... the problem was that I normally bind a different socket to each local interface and join the SSDP multicast group. After much trial and error I noticed that if I bind to ANY, it worked and I started receiving multicast traffic, but bind to a specific interface and I would not.

Now, I MUST know the specific local interface on which I received the multicast packet so, binding to ANY is not an option. I then noticed that you can specify an interface in the multicast join, so I tried creating a bunch of sockets all with ANY bind, but each with a multicast join on a separate local interface. That worked!

I had to change the code because normally when I receive traffic, I look at the client.localendpoint to give me to local interface then traffic came on. Since all sockets are now bind to ANY, I have to carry the localendpoint separately. This was an easy fix and the result is impressive. The main tools Device Sniffer, Device Spy and Network Light all work perfectly.

Enjoy!
Ylian
opentools.homeip.net


Categories:
For more complete information about compiler optimizations, see our Optimization Notice.