WIP: Add Bluez5 support (see #4), fully Bluez4 retrocompatible.#9
WIP: Add Bluez5 support (see #4), fully Bluez4 retrocompatible.#9gillg wants to merge 14 commits intoliamw9534:masterfrom
Conversation
|
I think it makes sense to put this stuff on a separate branch. Since bluez5 is not retrocompatible with bluez4, and projects may still wish to use bluez4, then a separate branch seems the way to go. |
|
I'm according with you. I need to try to make these changes compatibles with both versions. But if I not succeed a branch bluez5 should be the solution (or an archive branch bluez4 with a tag). |
|
Hi ! I see the light ! :) After some long tests lot of things work with bluez 4 or 5. I'm not a good python dev, so I don't know unit tests with python, maybe someone could help me to write some scripts. I made lot of changes... work is at 0% on agent.py (need probably a new class with new method decorators), but 100% for interface / devices / adapter / manager / audio / media is done. Some other things are not yet tested. I deprecated some methods for bluez5 such as "adapter.create_paired_device". I don't find any equivalent... With bluez5 you should use AgentManager I think (https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/agent-api.txt). I create a new audio lib dedicated to bluez5, needed to make new decorators. Now, in my tests, I need some help to resolve a strage Dbus exception. On a mailoop, I find adapter > register audio source endpoint > pair device if needed > try to connect with sink audio profile. If I don't try ton connect, and let mainloop run, I connect my device manually with bluetoothctl, SelectConfiguration() is called on my test program, and all is good... |
|
Any updates on this PR? Possible to make a Pr for a Bluez5 branch? |
Work not finished yet, to add Bluez5 support.
Basic commands (list-adapters / adapter-get / etc..) already tested and functional