Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting to pydbus #170

Closed
patocarr opened this issue Nov 1, 2017 · 1 comment
Closed

Porting to pydbus #170

patocarr opened this issue Nov 1, 2017 · 1 comment

Comments

@patocarr
Copy link

patocarr commented Nov 1, 2017

Hi there,

I've been hacking at bluezero code attempting a port away from python-dbus and onto pydbus. I have some application successfully running on pydbus and thought I could bring that knowledge here. Unfortunately, the application is proprietary so I can't share it, but much of its structure is making its way as open source in the fork. If/when I get it the way I want it, I might port the app to use bluezero.
Pydbus in my experience works fine for a central device, but have big issues making it work as a peripheral or any exposed dbus service; something python-dbus does quite handily, as shown in the BlueZ examples. I believe it's due to having issues with a parallel service, such as DBus.ObjectManager along with org.bluez object paths. I spent days working this out but couldn't get pydbus to cooperate.
I also took the liberty of changing the GATT arguments a little, to avoid having duplicated Device instances inside each GATT service. This should be a level 100 change that shouldn't affect upper layer applications though.
Thanks to studying bluezero code and its testing structure, I got some experience with python testing that previously didn't have. I much appreciate the work that has gone into bluezero for this.
Unfortunately, until pydbus fixes its issues or someone finds a way to get it to work, the complete port to it will stall to the parts that don't properly work.

Thanks @ukBaz and all the contributors,
-Pat

@ukBaz
Copy link
Owner

ukBaz commented Nov 2, 2017

Thanks for the feedback @patocarr. Glad to hear that Bluezero has helped in some way.

It is a shame about pydbus not having the functionality currently. I remember you also commented on the issue on the pydbus library
LEW21/pydbus#55

I see there are a couple of Python projects looking to bypass the DBus API and work directly with the Host Controller Interface (HCI) sockets:
https://github.com/frawau/aioblescan
https://github.com/TheCellule/python-bleson/wiki

It will be interesting to see how things develop in this area.

I am going to close this issue as there is no immediate action required. Please feel free to open a new issue if/when you believe we should look at moving Bluezero to Pydbus.

Thanks,
Barry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants