Closed Killbrum closed 2 years ago
If you want to work with bluez, I suggest trying my bluez-dbus interface library.
However, if you use the interface generator it will only create interfaces for methods and properties which are exposed on dbus at the time of generation of the interface files.
In case of bluez, it will not expose all possible features/actions as long as there is no device connected to bluez supporting any of these methods. For example you will never find GattService1 or GattCharacteristics1 interfaces in the generated code as long as your bluetooth adapter is not connected to any BLE device.
You can check what bluez is exporting using d-feet or similar.
Good time of the day! I'm so sorry for asking such a dumb question. I would be pleased to receive an answer to it. As for now, I'm trying to automatically generate D-Bus interfaces to work with them. As a reference, I took the official wiki page (https://github.com/hypfvieh/dbus-java/blob/master/src/site/markdown/code-generation.md). Let's say that I want to simply repeat all the steps described there and receive all possible interfaces and methods related to Bluez. In my case, I have a Ubuntu 20.04 installed with OpenJDK 11. I repeated all the steps described on the wiki page. I've installed maven, took the sources of the dbus-java lib, and ran that example. As an output, I have these lines of code:
In the end, I see only two files like AgentManager1.java and ProfileManager1.java, and they are almost empty. Only 2-3 methods are inside.
Could you point me to the problem and tell me why the output is so limited in my case? Thanks for your time!