我正在尝试实现 AVRCP 协议的一些功能。这里的文档:
http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/media-api.txt
我不明白的是如何检索我的播放器的对象路径:
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
我不确定它是从某些 DBus 方法返回的,还是我必须使用蓝牙地址和本地设备手动构建它。
我不确定它是从某些 DBus 方法返回的,还是我必须使用蓝牙地址和本地设备手动构建它。
前者。您(我假设的应用程序)不需要构建此对象路径,该路径将由某些 DBus 方法返回。
这里的对象含义:
对象路径[变量前缀]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
[variable prefix] was null basically.
{hci0,hci1,...} was which of your Bluetooth chip, basically it should be hci0.
/dev_XX_XX_XX_XX_XX_XX remote device mac address.
/playerX which player of your target.
不需要太在意对象路径的材质,它实际上只是一个字符串(根据特定格式由堆栈组合)
你可以参考:
特性
boolean Connected [readonly] object Player [readonly, optional] Addressed Player object path.