Need Help in Dbus

Matthias Huber matthias.huber at wollishausen.de
Tue Oct 20 13:56:12 CEST 2009


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


What am i doing wrong ?




More information about the devel mailing list