Need Help in Dbus
Matthias Huber
matthias.huber at wollishausen.de
Tue Oct 20 20:28:33 CEST 2009
(Reposting from devel@, hoping that here is maybe one)
Hello List,
for my minimoko, i want to implement the battery status and network
status and therefore i want to listen on the dbus.
for not consuming too much resources, i'd like to do this in "pure c"
and with the lowlevel routines.
i found an example here: http://dbus.freedesktop.org/doc/dbus/dbus-example.c
in this example is a section "receive", which i want to use.
now i tried :
// add a rule for which messages we want to see
dbus_bus_add_match(conn,
"type='Event',interface='org.freesmartphone.Device.Input'", &err); //
see signals from the given interface
dbus_connection_flush(conn);
if (dbus_error_is_set(&err)) {
fprintf(stderr, "Match Error (%s)\n", err.message);
exit(1);
}
printf("Match rule sent\n");
but i only got:
Match rule sent
Got Signal with value :1.6
Got Signal with value org.freesmartphone.ousaged
I am trying any other combination of bus and interface / path, always
the same.
when i try another call, i get
root at om-gta02 ~ # dbus-test
Listening for signals
Using **pending_return in dbus_connection_send_with_reply_setup()
without pending_setup is deprecated and strongly discouraged
Using **pending_return in dbus_connection_send_with_reply_setup()
without pending_setup is deprecated and strongly discouraged
process 2609: type array 97 not a basic type
D-Bus not built with -rdynamic so unable to print a backtrace
Aborted
(this was a call to the dbus itself for listing its busses),
works with mdbus well, but not in my program.
What am i doing wrong ?
More information about the community
mailing list