dbus

Connect to DBus signal – Correct syntax – PySide6

Connect to DBus signal – Correct syntax – PySide6 Question: can you help me with the correct syntax to connect to a DBus signal? This is one of my many tries which at least runs and matches the signature in the docs: from PySide6 import QtDBus from PySide6.QtCore import Q from PySide6.QtWidgets import QMainWindow class …

Total answers: 2

Receiving Audio Data (and Metadata) from IPhone over Bluetooth Python

Receiving Audio Data (and Metadata) from IPhone over Bluetooth Python Question: I’m trying to write a Python script to retrieve audio data from my IPhone to my Raspberry Pi over bluetooth. Currently, I’m able to get audio to come out of my Pi’s speakers just by navigating to Settings > Bluetooth on my phone and …

Total answers: 1

NoReply Exception in DBUS communication

NoReply Exception in DBUS communication Question: I’m working on an asynchronous communication script that will act as a middleman between a react native app and another agent. To do this I used python with DBUS to implement the communication between the two. To implement this we created two processes one for the BLE and one …

Total answers: 2

Connecting to user dbus as root

Connecting to user dbus as root Question: If we open a python interpreter normally and enter the following: import dbus bus = dbus.SessionBus() bus.list_names() We see all the services on the user’s session dbus. Now suppose we wanted to do some root-only things in the same script to determine information to pass through dbus, so …

Total answers: 3

How to monitor usb devices insertion?

How to monitor usb devices insertion? Question: I am trying to monitor for USB devices when they get plugged in. A couple of test scripts fail that I am pretty sure should have worked. import pyudev context = pyudev.Context() monitor = pyudev.Monitor.from_netlink(context) monitor.filter_by(subsystem=’usb’) for device in iter(monitor.poll, None): if device.action == ‘add’: print(‘{} connected’.format(device)) ^^Does …

Total answers: 2