cost 69 ms
如何在禁用 BlueZ 插件“hog”時通過 GATT (HOG) 設備自動重新連接藍牙 HID

[英]How to Automatically Re-Connect Bluetooth HID over GATT (HOG) Device when BlueZ Plugin "hog" is Disabled

Linux 5.10,BlueZ 5.55 我有一個實現藍牙 LE 的遙控器。 如果我使用默認的藍牙守護進程,我可以使用 bluetoothctl 進行配對和信任。 如果連接在一段時間(或幾天)后丟失並且按下遙控器上的按鈕,守護程序會自動重新連接(因為設備已配對)。 這基本上就是我所需要的。 但 ...

DBus:連接在收到回復之前斷開

[英]DBus: Connection was disconnected before a reply was received

我想通過 org.freedesktop.Notifications 服務向 linux 的 window 經理發送通知。 在 d-feet 中這有效,但在 C 中,我收到錯誤消息“在收到回復之前連接已斷開” 編輯:我修復了段錯誤,但現在我在閱讀回復 arguments 時從 dbus 得到了一個更 ...

2023-01-26 21:59:37   1   24    c / dbus  
Linux上C++如何實現全局菜單支持?

[英]How to implement global menu support in C++ on Linux?

我正在 C++ 開發跨平台應用程序。我們有一個菜單,它使用 macOS 上的全局菜單。 我希望在所有擁有它的平台上使用系統提供的全局菜單。 KDE 有一個全局菜單,下面是一個顯示 VS Code 菜單的例子: 我如何在 C++ 中實現它? 我聽說這可以使用 dbus 來完成,但我不知道該怎么做, ...

Ubuntu 22.04 docker 安裝 HDP 2.6.5 出現錯誤“無法獲得 D-BUS 連接:沒有這樣的文件或目錄

[英]Ubuntu 22.04 docker install HDP 2.6.5 with error "failed to get D-BUS connection: No such file or directory

我已經下載並運行了 HDP 2.6.5 docker,但我一直在努力並收到此命令的以下錯誤: docker exec -t sandbox-hdp sh -c rm -rf /var/run/postgresql/*; systemctl 重新啟動 postgresql; 無法獲得 D-Bus ...

DBus:無法為我的用戶會話總線獲取匹配規則

[英]DBus : Can't get match rules for my user's session bus

我正在嘗試使用 dbus/tools/GetAllMatchRules.py 來獲取診斷信息。 當我以普通用戶身份在沒有參數的情況下運行它時,我得到“GetConnectionMatchRules 失敗:您是否啟用了 Stats 界面?” 我修改了 GetAllMatchRules 以打印特定的異常 ...

如何使用結構參數從 Qt 調用 D-Bus 接口

[英]How to call a D-Bus interface from Qt with struct argument

我正在嘗試向 polkit 請求授權,但我似乎無法找到如何提供結構作為參數。QDBusArgument subject; subject.beginStructure(); subject << "unix-process"; subject << QMap<QStri ...

通過藍牙從 iPhone 接收音頻數據(和元數據) Python

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

我正在嘗試編寫一個 Python 腳本來通過藍牙將音頻數據從我的 iPhone 檢索到我的 Raspberry Pi。 目前,我只需在手機上導航至“設置”>“藍牙”並選擇 Pi,即可讓音頻從 Pi 的揚聲器中傳出。 (我之前配對過)。 我已將 Pi 設備類型指定為Car Stereo ,因 ...

Gnome shell 擴展:沒有從 dbus 獲取所有屬性

[英]Gnome shell extension: not getting all properties from dbus

在我的筆記本電腦上: 返回一組屬性: 我正在嘗試修改 gnome shell 擴展名。 初始化擴展時,它會這樣做: ... 現有代碼訪問如下幾個屬性: 根據文檔,還有另一個屬性 EnergyRate ( https://upower.freedesktop.org/docs/UPower.html ...

連接到 DBus 中的受保護網絡時不會調用代理接口方法

[英]Agent interface methods won't be called when connecting to the protected network in DBus

我正在開發一個應用程序以使用 Connman DBus API 連接到安全的 WiFi 網絡。 我讀到我需要注冊一個實現 net.connman.Agent 接口的對象,以便 DBus 可以調用我的方法。 到目前為止,我已經能夠做一些非常接近我需要的事情,但是當我運行程序時,如果我以前從未連接到該網 ...

GLib - 獲取通過 D-Bus 返回的數組中的字符串數

[英]GLib - getting the number of strings in array returned over D-Bus

我通過 D-Bus 上的 function 調用獲得了一個字符串數組,如下所示。 然后我使用 GLib 來解析返回值。 下面的代碼大大簡化了。 我可以讀取使用g_variant_iter_loop和iterator返回的每個字符串。 我怎樣才能首先確定數組中返回了多少個字符串? 在讀取實際字符串之前 ...

如何使用 c api sd-bus 讀取 dbus 字典數組?

[英]How do I read a dbus array of dicts with the c api sd-bus?

我正在嘗試使用 sd-bus 讀取一個看起來像 a{sv} 的 dbus 數據結構,但是當我使用下面的代碼時,我只能讀取 8 個字典中的一個。#include <stdio.h> #include <stdlib.h> #include <systemd/sd-bus ...

2022-10-03 23:25:56   1   197    c / linux / dbus  
為什么我的用於啟動和停止服務的 d-bus systemd 命令在具有多個用戶的嵌入式系統上因權限錯誤而失敗

[英]Why does my d-bus systemd command to start and stop services fails with permission error on embedded system with multiple users

我正在使用具有多個用戶的嵌入式系統,例如“root”和“user1”。 我正在運行以“user1”身份登錄的 c++ 二進制文件,但由於權限錯誤而無法啟動/停止服務。 在 root 中運行時相同的二進制文件可以正常工作。 這是代碼: Foo-daemon 是一個虛擬程序: 服務文件很簡單: 服務文 ...

如何使用 LGI 從 D-Bus 讀取屬性?

[英]How to read property from D-Bus using LGI?

我正在嘗試使用 lgi 訂閱一個信號,然后讀取一個屬性,如下所示:local lgi = require("lgi") local Gio, GLib = lgi.Gio, lgi.GLib local name = "org.freedesktop.DBus" local path = "/o ...

2022-09-05 00:05:58   1   11    lua / dbus  
如何檢測何時在 D-Bus 上添加或刪除 MPRIS 播放器?

[英]How to detect when MPRIS player is added or removed on D-Bus?

到目前為止,我發現的唯一方法是定期調用org.freedesktop.DBus上的ListNames方法,並檢查是否添加或刪除了任何org.mpris.MediaPlayer2.* 。 但是沒有更好的方法嗎? 例如,是否有一個 D-Bus 信號通知總線名稱列表的變化,以避免定期調用ListName ...

org.freedesktop.DBus.Properties.GetAll 返回“g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: 沒有這樣的接口”“”

[英]org.freedesktop.DBus.Properties.GetAll returns "g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: No such interface “”"

我正在為 USB-Flash 上的 search.deb 包編寫 python 腳本並遇到以下問題:當調用 org method.freedesktop.DBus.Properties.GetAll("") 我得到“g-dbus-error-quark: GDBus .Error:org.free ...

如何使用未提交給 dbus 的 Python 檢測 Linux 中的藍牙事件?

[英]How to detect Bluetooth event in Linux with Python that is not submitted to dbus?

我正在 Python 中編寫一個媒體播放器,它可以在連接的藍牙揚聲器中播放音樂。 我有一個帶有 3 個控制按鈕的揚聲器,音量增大/減小、播放/暫停。 我的代碼(使用mpv )可以正常播放音樂,音量控制也可以正常工作。 但我無法讓播放/暫停按鈕工作,這是我發現的: sudo evtest看到事件: ...

網絡管理器 API 中的 a{sa{sv}} 類型的 dbus 參數到底是什么?

[英]What the heck is a dbus argument of type a{sa{sv}} in the Network Manager API?

我正在查看網絡管理器的 dbus api 並且有輸入類型a{sa{sv}}的方法。 我還是 dbus 的新手,但是如果我正確地解釋https://www.freedesktop.org/software/systemd/man/sd_bus_message_read.html#中簽名說明符的定義, ...

如何將數組參數 (ia(sb)) 傳遞給 gdbus 方法調用,

[英]How to pass array argument (ia(sb)) to gdbus method call,

我正在嘗試將 systemd API ( SetLinkDomain ) 與 gdbus 綁定一起使用,下面是示例代碼, 上面的代碼不起作用並給出以下錯誤。 我認為我在將參數 (ia(sb)) 傳遞給 GDBus API 時犯了錯誤,任何人都可以在這里幫助我。 ...

使用 C++ DBus Connman 連接到 WPA2 WiFi 網絡

[英]Connect to the WPA2 WiFi network using C++ DBus Connman

是否可以使用 C++ DBus 庫通過其 SSID 和密碼連接到受保護的網絡? 我在互聯網上找不到任何類似的代碼示例。 我想做一些與此非常相似的事情,但最好是在 C++ 中,並且不使用網絡管理器包,因為我的 Linux 操作系統有 Connman 包。 任何合適的代碼示例將不勝感激。 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM