Dbus doesn't answer on Hello, manual connection
Kristoffer Lundén
kristoffer.lunden at gmail.com
Sun Mar 4 14:04:20 PST 2007
Hello,
On 3/4/07, Arnaud Cornet <arnaud.cornet at gmail.com> wrote:
> I am using strace (with the -s switch) to see what happens between a
> client and the server. With dbus-send, or dbus-example
> (http://dbus.freedesktop.org/doc/dbus/dbus-example.c) and grepping for
> read and write, we get very readable results.
>
Not familiar with strace, though I've heard of it, of course. I will
have to play with this too, thanks for the tip! =)
> Kristoffer, I have started a ruby implementation of the dbus protocol
> too, I already have a dbus signature parser, and a parser for DBus
> messages, I also implemented a message marshaller that seems to work so
> far.
>
Awesome. I have a somewhat messy test implementation that can connect
via UNIX sockets (abstract and normal) as well as TCP, handles
EXTERNAL and DBUS_COOKIE_SHA1, and can put together a message and get
a reply (only Hello tested, so far, as I haven't gotten around to
parsing the reply =)).
My next steps would be, in no real order:
* Parse and create messages without hard-coding
* Start hashing out a Rubyish API
* Refactor better into classes and modules
* Writing a good test suite =)
My goals are to:
1. connect to and query/control DBus aware applications (Rhytmbox,
notofications, what have you) in an easy and rubyish way, and
2. export objects from ruby apps in an easy and rubyish way
I'd love to collaborate on this, if you are interested.
> It seems there are a few diversions between the spec and the dbus C
> implementation: there is the protocol number which is 1 and not 0. There
> is also the message signature which is not yyyyuua(bv) but rather
> yyyyuua(bbv). I have no idea what the second byte in the struct means.
> It seems to be always set to 1.
>
The 1 is the length of the SIGNATURE of the VARIANT, it will always be
1, but it's correct according to the spec...
-- Kristoffer
> Cheers,
> --
> Arnaud Cornet
>
--
Kristoffer Lundén
✉ kristoffer.lunden at gmail.com
✉ kristoffer.lunden at gamemaker.nu
http://www.gamemaker.nu/
☎ 0704 48 98 77
More information about the dbus
mailing list