Attracted by virtual constructs

October 13, 2009

UPnP devices coming to the network:/ kioslave

Filed under: KDE, Network, UPnP — by frinring @ 9:48 pm

Since the Coherence/KDE sprint (Spain, 26 °C, sun), where work was done for some UPnP bindings for KDE, a week has passed (Germany, 4 °C, rain/hail). Besides the weather some other things have changed that week, too, but for the good :)

While on Day 1 of the sprint I already managed to have first UPnP devices show up in the network:/ kioslave, it was done with hacky prototype code, to have some things working to start from. Day 2 didn’t change much in that regard.

The days since then Frank Scholz, the main developer of Coherence, has been very supportive and has continued adding needed features to the D-Bus API, and I have hammered a little more onto the code for the UPnP backend to the network:/ kioslave. To much success! UPnP devices are now coming and going in the network:/ listing, matching the real devices’ behaviour, with proper name and type.

All that is missing to my full pleasure is the usage of each UPnP device’s custom icon (So if you know how to set custom icons (i.e. not by name, but delivered from remote, cmp. favicons) for UDSEntries in a kioslave, please tell me!). And forwarding to the presentation url of the UPnP device, if available, but that looks like it needs some discussions with the KIO developers, because of the “abuse” of KIO for the network:/ kioslave.

No screenshot today, if you are interested please try it yourself:
The UPnP backend for the network:/ kioslave is based on the utility libkupnp which cares for the wrapping of the D-Bus connection to Coherence. So fetch both
libkupnp at
http://websvn.kde.org/trunk/playground/network/kupnp/
and the UPnP backend at
http://websvn.kde.org/branches/work/network-kioslave/adding-upnp-backend/
and compile as usual.

You also need a current version (>=#1440) from trunk of Coherence:

svn co https://coherence.beebits.net/svn/trunk/Coherence
sudo python ./setup.py install

(No idea how to install Coherence to a user-only prefix, hints welcome!)

If you are interested in Bart's work on UPnP support for Amarok, do not miss his last blog entry (which seems to have missed planet KDE).

The coming weeks I will see if libkupnp can be extended to be useful for other code interacting with UPnP devices (at least from a UPnP control point's view). For a start I will try a InternetGatewayDevice proxy class, which could be used by programs wanting NAT traversal (Konversation and KTorrent already have some custom implementation, but this could help others). Next would be a MediaServer proxy class, perhaps that could simplify Bart's upnp:/ kioslave.

October 9, 2009

Coherence/KDE sprint Day 2

Filed under: KDE, Network, UPnP — by frinring @ 2:12 pm

Exactly one week already has passed since I arrived in Barcelona for the Coherence/KDE sprint, and almost four days since I left again, so before it is out-of-date here a short summary of Day 2 (see also Day 1 for some introduction):

Everyone continued hacking on his stuff, e.g. Bart on his kioslave for UPnP MediaCollections, to be used especially by Amarok, and me on the UPnP backend for the network:/ kioslave. Which also involved discussions with Frank about shaping the D-Bus API of Coherence to our needs a little. And how to merge best the UPnP device/service model and objects into the network classes model of the base library of the network:/ kioslave, along with the ones from DNSSD and Co. This merging needs more thoughts definitely.

Lunch was cared for by our host Edward Hervey from Collabora Multimedia leading us to another non-tourist restaurant with good food and local atmosphere.

Other stuff that day was done was demoing the things now working, like the Coherence plugin for the Spykee robot delivering pictures from its built-in webcam via UPnP. Or things that have been working for a while, like each one playing his favourite songs via UPnP on Frank’s computer, in a kind of battle style. Including controlling the volume from remote.

Zaheer, Konqui and me looking what Frank does that makes him wear the K-scarf this way

Zaheer, Konqui and me looking what Frank does that makes him wear the K-scarf this way

In some way Coherence is to UPnP what Avahi is to DNS-SD, a demon wrapping the specific system and making it accessible via D-Bus. Just that Coherence does a lot more, as UPnP is not only about discovery of services, but also of types of devices and the interfaces/services they implement and how to access them.

As the developers of Coherence are using GNOME-centric desktops the current desktop integration is basically done for GNOME programs, like Totem, Rhythmbox, and Nautilus.

Let’s hope KDE-Libs based programs can catch up to these :) This was the very purpose of this sprint, and it gave a good foundation. It just left us with quite some work to do. Especially Bart might appreciate help with his kioslave, as he is short on time. So if you want Amarok to as well access other UPnP MediaCollections as well as export it’s own collection as such in the next time, get in contact with him.

I think I might be able to get the integration into the network:/ kioslave done in October (promises, what promises?). Surely there will be the need for feedback. So please stay tuned, more detailed info about approach and progress to follow…

October 4, 2009

Coherence/KDE sprint Day 1

Filed under: KDE, Network, UPnP — by frinring @ 10:30 am

Big splash for yesterday evening: “Breakthrough in the hotel!”

Barcelona, wonderful city. Crowded with a lot of people, enjoying the life style and atmosphere. This weekend there are six people more, but here for hard work, to do some collaboration on UPnP support in FLOSS software. So is there a better place to stay at then the Collabora Multimedia office here in Barcelona?

Together with Bart Cerneels, from the Amarok crowd and to most of us known as the great organizer of Akademy 2008, I am here to write code to connect to the UPnP world, by using Coherence. If you haven’t already heard of Coherence before, it is an well developed UPnP-enabling framework, written in Python and accessible via D-Bus by any other program, hiding the UPnP complexity both to the providers and the consumers of UPnP services.
So e.g. Amarok could easily offer access to its own media collections for any UPnP capable client on the network as well as access those of others, at the same time control any other player in the network (MediaRenderer in UPnP terms).
And it is also a comfortable way to add a UPnP backend to the network:/ kioslave, so the UPnP-only devices and their services are also listed there. I was hoping someone else was going to do this, but, well, scratch your itch…

Still it feels like boring work to do compared to what some others sitting at the table with us are doing: There is Philippe Normand who is working on tubing UPnP over the intertubes with the Mirabeau plugin to Coherence. And there is Zaheer Abbas Merali, who is wrapping standard UPnP services around little next-generation-mars^W indoor robots, so you can access the robot with any standard UPnP client (like the PS3, PSP or XBox). Then there is Sebastian Pölsterl who works to build a UPnP supporting personal video recorder (PVR) based on his DVB-Daemon.
Last but not least with us are Frank Scholz, the founder and main developer of Coherence, and Benjamin Kampmann, official vice-president of marketing for Coherence.

I had a quick start with the code Adriaan de Groot had written at the first Coherence/KDE sprint in Paris this spring. Still I had nothing to show when we left the office in the evening. But when most of us went to spend much money to watch 22 men catch a single ball, just to kick it away again, Bart and I waited for them in the hotel, typing even more code and then, the breakthrough, at least for me:

And it comes with congrats to Ahmed Moustaf! His computer was the first to appear in the network:/ kioslave by being feeded from the Coherence-driven UPnP backend. Sitting in the hotel room I had no longer all the devices available like we have with us in the Collabora office, but another friendly, although unknown person had his computer broadcasting his UPnP services, so there was content. You won’t see from the documenting screenshot it is from the UPnP, as that is one of the targets of the network:/ kioslave, hiding all the unneeded technical details from the user. And his computer disappeared soon after when I wanted to screenshot some UPnP only listing, was it because we started to browse his media collection and he found out?* ;) So just believe it :)
First device in network:/ kioslave delivered by the UPnP backend

*Because if there is one thing which seems to suck with UPnP it is the lack of any access control built into the system. Everybody can access everything. Well, hopefully soon KDE programs can, too :)

Powered by WordPress.com