odeviced: Progress report

Guillaume Chereau charlie at openmoko.org
Wed May 28 09:32:22 CEST 2008


Hello Sudharshan !

Great project. It is cool to use Vala instead of C, specially when using
DBus.
I really like to see this in your code :

[DBus (name = "org.freesmartphone.Device")]
public class Service: Object {
...
}
And then think about all the code it would need to express the same
thing in C !

I like the plug-in architecture as well. Very promising !

Do we already have the org.freesmartphone.Device specification ?
Can we start to generate this and put it online ? (maybe with the
automatic script we discussed before on this list) 

Another thing : I don't know how difficult it should be, but would it be
possible to add a "simulated" option to some of the devices, so that we
can test the software on any computer ?

I would also be interested to compare the speed and memory usage with
the python implementation. Was the python code too slow ?

Cheers

- Charlie

On Tue, 2008-05-27 at 20:40 +0530, Sudharshan S wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello everyone,
> 
> First of all, I am Sudharshan and will be working on an odeviced
> implementation for this year's GSoC.
> 
> The implementation language will be a mixture of vala and C along with
> DBus. Here is the progress made so far. Of course this is really
> preliminary and will change in time,
> 
> 1.) Dynamic Plugin support through GModule. (Not using GTypeModules though)
> 2.) Configuration file support using GKeyfile, along with a preliminary
> dependency tracking for the plugins
> 3.) A set of methods exposed at org.freesmartphone.Device to manage
> plugins. As of now, only basic stuff like load() and get_device_name()
> are present..
> 4.) Wifi plugin completed with code stolen shamelessy from wifi.[c/h]
> present in neod and python-odeviced.
> 
> - -------------------------------------------------------------------
> Heres how running odeviced looks like now,
> 
> sudharsh at loki ~/Projects/odeviced $ sudo odeviced
> Starting ODeviced Server....
> ** (process:25609): DEBUG: service.vala:67: No of plugins loaded: 0
> ** Message: service.vala:69: Trying to load powercontrol
> In powercontrol
> ** Message: service.vala:95: Successfully loaded powercontrol
> 
> ** (process:25609): DEBUG: service.vala:67: No of plugins loaded: 1
> ** Message: service.vala:69: Trying to load wifi
> 	wifi has dependencies
> 	Dependency powercontrol already loaded
> 	Done handling dependencies
> ** Message: service.vala:95: Successfully loaded wifi
> 
> ** Message: service.vala:143: idle
> 
> Notice how odeviced handles dependencies for wifi
> - ------------------------------------------------------------------
> 
> The contents of the configuration file in /etc/odeviced.conf is as follows,
> 
> [odeviced]
> device_name=FreeRunner
> 
> [powercontrol]
> enable=1
> 
> [wifi]
> enable = 1
> # Just dummy stuff to test the service
> depends = powercontrol
> 
> - --------------------------------------------------------------------
> 
> Now lets see what the wifi plugin does. I am running odeviced on my
> laptop so my wlan interface is "wlan0". Lets check if its switched on.
> Since it a dbus service I can test it out from a python shell.
> 
> >>> proxy
> <ProxyObject wrapping <dbus._dbus.SystemBus (system) at 0x2aeba41d36b0>
> :1.79 /org/freesmartphone/Device/plugins/wifi at 0x2aeba64cae10>
> 
> >>> proxy.is_on("wlan0",
> dbus_interface="org.freesmartphone.Device.plugins.wifi")
> dbus.Boolean(True)
> 
> Lets check if "kitteh0" interface is on,
> 
> >>> proxy.is_on("kitteh0",
> dbus_interface="org.freesmartphone.Device.plugins.wifi")
> dbus.Boolean(False)
> 
> - ----------------------------------------------------------------------
> 
> The code, in case if anyone is interested is available here
> http://sudharsh.unixpod.com/odeviced-20080527.tar.bz2
> 
> It would be ubercool if someone tests this on the real device. I am
> curious to know the performance of the daemon in comparison to its elder
> python cousin.
> 
> I would be totally delighted to hear comments, suggestions, flames (ok..
> not flames) from the experienced people in here. Especially tips on
> improving the code as I am a novice when it comes to writing code.
> 
> That would be all..:D
> 
> Regards
> Sudharshan S
> blog : http://www.sudharsh.wordpress.com
> irc  : Sup3rkiddo @ freenode
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkg8JF8ACgkQSsRjJNRMc4kgjwCeNSOF34ko/gp0QH3okUFs5J66
> MgsAmwRsWv3I1Ut2u8nkCaTc0OxafhDC
> =4emO
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> smartphones-standards mailing list
> smartphones-standards at linuxtogo.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-standards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxtogo.org/pipermail/smartphones-standards/attachments/20080528/c610c63a/attachment.pgp>


More information about the smartphones-standards mailing list