Questions tagged [gdbus]

Tool for working with D-Bus objects

Simple tool for working with D-Bus objects: More info: manual

102 questions
17
votes
3 answers

Sample program for GDbus signals

I am new to GDbus programming. I need to implement a simple Dbus send-receive message (Signals) using Dbus Glib. I tried to google some sample programs, but couldn't find. Can anyone post any such sample program or point me to some sample program…
user6325262
  • 171
  • 1
  • 1
  • 4
11
votes
2 answers

set/get property using dbus-send

I have made below sample xml and need some help in forming dbus-send command to set/get propoerty "Status". I know how to call methods, but not able to read/write property using dbus-send. xml:
Prashant Gaur
  • 135
  • 1
  • 1
  • 5
8
votes
1 answer

Connecting to systemd DBUS signals using gdbus-codegen

I am not able to receive systemd DBus signals when using gdbus-codegen generated manager proxy. But I am able to successfully call methods provided by systemd over DBus. I searched online and looked these links without much success. There aren't…
VJ-
  • 211
  • 2
  • 7
7
votes
1 answer

Using gdbus to start a systemd service

I've created a new systemd service that I would like to be able to active via a dbus call. The service simply executes a shell script. I've defined the service…
RandomUser
  • 4,140
  • 17
  • 58
  • 94
6
votes
2 answers

BlueZ 5.30: D-Bus GATT API - Simply Discover and Connect to a BLE device in C

With the last release of BlueZ (5.30) the highlight was the completion of the GATT D-Bus apis. My goal is to programmatically (in C), as a BLE client: scan for ble devices (which I can do with the hci layer) Connect to an advertising BLE device Get…
s2c97
  • 61
  • 1
  • 1
  • 4
6
votes
4 answers

Sending a byte array (type `ay`) over D-Bus using GDBus

I am trying to a byte array over D-Bus using the GDBus bindings. Can you please let me know how I can achive that. I tried googling but didnt help. Byte array contains a image file so cannot be converted to charbytearray Any help is appriciated
user3148743
  • 63
  • 1
  • 1
  • 5
4
votes
1 answer

Migration from dbus to GDbus in Python 3

I have tried to write a service file in python using GDbus. But I could not find a good tutorial, only if i want to use C. Since I want to include GDbus in an existing Python code i have no idea how to do that. It was possible for me to write a…
4
votes
1 answer

How to validate a D-Bus property when using gdbus-codegen skeleton

I'm creating a service on D-Bus using gdbus and gdbus-codegen. Introspection is this:
anorm
  • 2,255
  • 1
  • 19
  • 38
4
votes
1 answer

getting results from g_variant_new ()

I'm learning how to play with this g_variant_new() and it's really confusing me. I've read the https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-new but I can't understand it easily. I have a code: #define MM_DBUS_SERVICE…
Arn
  • 600
  • 1
  • 6
  • 22
4
votes
2 answers

GLIB usage without mainloop

I have a problem using Glib. I want to subscribe to a dbus signal without launching the mainloop with g_main_loop_run. I create the connection to the correct bus and call the function g_dbus_connection_signal_subscribe. I replaced the call to…
amenophiks
  • 73
  • 2
  • 6
3
votes
1 answer

Possible to reuse my GCancellable instance?

Before triggering a proxy-call via gdbus, I want to cancel any possible pending calls on this dbus method. My first attempt was like that: // in the "member" list of my widget GCancellable *my_cancellable; // in the init method of my…
Alex
  • 1,602
  • 20
  • 33
3
votes
1 answer

How to make D-Bus server side call as asynchronous?

For my project , I am using DBUS as IPC to interact between QT application ( Client Side ) and my service daemon (Server-Side - GIO / GDBUS ). At client side , methods are invoked asynchronously using QDBusPendingCallWatcher. However at server side…
nja
  • 67
  • 2
  • 13
3
votes
2 answers

Basic BLE client with D-Bus BlueZ

I'm working with (everybody's favourite) BlueZ 5.40 compiled and run with experimental features and I need to scan for LE devices, pair and connect to one and read/write a characteristic via the D-Bus API. I have studied sources of hcitool, gatttool…
mmatous
  • 482
  • 6
  • 16
3
votes
1 answer

dbus call in C from shell dbus-send

I have a dbus-send call: dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 "/org/freedesktop/ModemManager1/Modem/0" org.freedesktop.DBus.Properties.Get string:org.freedesktop.ModemManager1.Modem string:"SignalQuality" And I would…
Arn
  • 600
  • 1
  • 6
  • 22
3
votes
1 answer

Unable to iterate a GVariant with array type using iterator

I am trying to call a remote method over DBus using GDBus. My problem is that the method call is successful, but the return value from the method, available as a GVariant contains an array as its element. When I try to iterate through it using an…
1
2 3 4 5 6 7