-
I am new to Rust, to Bluetooth, to bluez, and to D-Bus, but I figured I might as well jump in with both feet to all of this. I see at https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/advertising-api.txt what is described as the "BlueZ D-Bus LE Advertising API Description", So I tried:
... but I don't see any code generated for the If it isn't obvious, I am clearly clueless.. can anybody offer me some help to de-clueless-ify myself. Thanks. --wpd |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Since you're new to all of this, first install a D-Bus introspection tool such as D-feet and start it. Now that you have found the path that implements |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. Even learning about D-feet is a great step forward for me. Unsurprisingly, when I run it, I see the same 2 interfaces found by your code. I was thinking that, since the API was defined by Bluez, that Bluez would implement that API. It certainly seems to me (from interacting with the command line utilities) that I must be able to send messages to the |
Beta Was this translation helpful? Give feedback.
-
I just realized that the bluetooth device exposed by my MacOS host (via Parallels) to my Ubuntu VM wasn't as full featured as I thought. When I plugged a Bluetooth USB dongle into my Mac and directed that it should be attached to my VM, I was able to see all of the interfaces I was expecting. Again, thanks for the help. I have some small hope (but very little expectation) that I might learn enough Rust, Bluetooth, D-Bus, and bluez to help out with this project (as you have requested). We'll see how/if that comes to pass. --wpd |
Beta Was this translation helpful? Give feedback.
-
(Chiming in because I've gone through the process of figuring out the bluez advertising api.) To send advertisements that other bluetooth devices can see, you're supposed to expose your own dbus object that implements the Alternatively, if you want to see names and other info from other devices' advertisements (and perhaps connect to them), I believe you want [bluez's device api](https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/device-api. Using |
Beta Was this translation helpful? Give feedback.
-
Thank you. That's incredibly helpful, especially the link to bluster. --wpd |
Beta Was this translation helpful? Give feedback.
Since you're new to all of this, first install a D-Bus introspection tool such as D-feet and start it.
Find the
org.bluez
destination. Now you need to find a path that implementsorg.bluez.LEAdvertisement1
. If you find nothing, connect the something that you want to talk to, restart D-Bus and retry.Now that you have found the path that implements
org.bluez.LEAdvertisement1
, that's the path you should have after the-p
switch when calling dbus-codegen.