Sunday, July 25, 2010

(GSoC) And god said: "Let there be an Internet Gateway"

Hi, all.

Last week I said to you that HUPnP did not recognize UPnP internet gateway devices in the network. Now I think I can say it used to not recognize. :-)

Seems like Tuomo's patch fixed the problem and now the Solid UPnP backend is able to "see" my wireless router and finally invoke the UPnP actions available on it (like to do some port redirect and toggle the internet access, for instance). I have made some tests and seems like the action invocations are working well from the HControlPoint instance in the UPnPDeviceManager. Now it's time to refine the API and add more operations, probably.

However, "the world is cruel". This week Nikhil and Bart pointed to me and Kevin some problems with the media server stuff. Besides some mistakes on the HUPnP use from my part, seems like there is something wrong with the creation of the UPnPDeviceManager. According to him, due to the use of a QThreadStorage on the backends manager, a new HControlPoint is created for every thread using Solid, causing some inconsistent results. The expected behavior is only one control point across Solid stack (frontend -> iface -> backend). I'm working on the backend part, but the Solid thread-affinity stuff I prefer to let the more experts metalworkers to decide what's better.

Another thing Nikhil opened my eyes is about that I'm not running KDE trunk (I'm using that script development strategy from Techbase). I know, it's a blasphemy and I will build and use the SVN trunk ASAP. My unit tests are not enough and I need to do real system tests.

Well, I really hope this week to get the backend working fine to go into the little desktop integrations and the debugging app using an UPnP framework developed by some fellows here in the lab, called BRisa. I have to run a little bit with the schedule.

See ya.

Sunday, July 18, 2010

No, I'm not dead ;-)

It's been a while, right? Sorry for that. I'll try to post here once per week from now on, I swear.

Well, since my last post some things happened. Let's see... I've got a motorcycle. And I've got a motorcycle accident. My left arm is not so good but I will survive :-). I've began to write my master thesis, too. But I'm not here to talk about me, but about my GSoC project.

The midterm is gone now and Kevin granted me a "passed" status :-D. This is a motivation, indeed. About the work: I've implemented the media server (Solid::Backends::UPnP::UPnPMediaServer) and internet gateway (Solid::Backends::UPnP::InternetGateway) classes. The media server implements the Solid::DeviceInterface::StorageAccess interface, with the idea of treat UPnP media servers as remote folders or something like that. Actually, you can think in a media server as a remote pendrive, with some media there. The internet gateway (could be a router, an ADSL modem, etc.) implements an interface made by me to these kind of devices, so it can and will be improved with the time, since the actual API is pretty bounded with the UPnP forum specifications, and it is exactly what we can avoid in Solid (flexibility is the law).

I've made some unit tests with the media server and seems like the things are fine. Actually, Nikhil's work in Amarok will tell what we could improve on that part. Using the HUPnP library, the backend is able to detect UPnP devices available on the network, as you can see here.

The IGD tests are kind of stuck, because HUPnP has some problems in detecting UPnP internet gateway devices. I've been trying to test with two wireless routers, but without success so far. I'm in touch with Tuomo (library's author and maintainer) and in this afternoon we spent a good time debugging HUPnP and talking about heavy metal :-p. Looks like he figured out what is going on and will patch the library ASAP.

The next steps now is keep working in the IGD issue and in parallel work at the device notifier integration (at least with media servers). I'm having some difficulties in understanding the device notifier code, but nothing that we can't ask, right? :-)

Well, that's it for now. Next Sunday I'm back here. With a good arm. I guess...

Cheers.