-
Notifications
You must be signed in to change notification settings - Fork 85
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
Migrate all the D-Bus calls to GDBus. #14
base: master
Are you sure you want to change the base?
Conversation
9468b3c
to
8252600
Compare
I'm the original author of this library and I find your PR very promising. As it is removing the dependency of dbus and using GDBus instead, I consider this PR a good step forward. |
@tommie-lie This is really great. Tested your PR using real hardware and I fixed some issues - seems all well now with some minor exceptions but not critical for the applications. I created another PR on your fork(I created a PR for this PR basically 😄 ). @larsblumberg @tommie-lie
|
Given that the python-dbus interface only receives fixes and is considered by its author and maintainer as un-pythonic and is not recommended by him, it seems more logical to use another, more recommendable interface. As gatt-python already makes use of PyGI and GLib, it makes sense to use GDBus which comes as a part of GLib. This also effectively removes the python-dbus dependency.
Sorry for having been silent for so long, but I had some quite busy weeks and did not work on my Bluetooth pet project. I'm a bit puzzled as to why my code ever worked with the issues found by @mtiutiu but they are fixed now and I found some other placed where the error-handling was wrong. I also rebased the commit to the latest master (and adapted the new DeviceManager.remove_all_devices method). @mtiutiu I sincerely apologize for not giving credit to you in the git history but I found it rather hard to integrate your PR (see there for more info). Please let me know if you are okay with this or if I should add you to the commit message. |
@tommie-lie You can merge your changes I don't need any credits for this. I'm glad I could be of help. |
@TheMeaningfulEngineer Where you guys able to test this PR? It should make your build process easier as it makes the necessity for the |
Hey @larsblumberg And thanks @tommie-lie and @mtiutiu, sorry for not being very responsive at the moment. |
While I wouldn't consider the dbus replacement a feature (from the user perspective) I understand that you got more important things to do in the moment. I'm looking forward to seeing those changes implemented at some point as it eases the overall build process, not only for the Senic Hub. |
Hey peeps, Where it fails is on the wrapper library that abstracts the gatt and allows
|
@mtiutiu could you please elaborate on what issues were fixed for you? |
@Snevzor I'm sorry but this thing is too old for me now to remember all the details. The initial problem was due to some incompatible methods signature and/or class constructors. But to be honest I don't remember which and the "why". This PR cleaned those up and made my custom application a bit more stable. Initially I had to do some hacks to overcome some related issues - sorry I can't remember those either. I'm sorry for not being too helpful here but I really don't remember the details and I don't have the time and luxury to search in my old messy code for that application (although it seems to work even now as it is 😄 ) |
@mtiutiu no worries! Thanks for responding anyhow. |
I would like to continue the work on this PR. @mtiutiu Is your PR to this PR already included? |
@larsblumberg |
Any updates on this? I’d love to see this merged and especially removing the dependency. Gave me headaches. Anything I can help with? |
Disclaimer: This pull-request does not "fix" an "issue" but is rather a proposal and is a 1:1 migration. I plan on expanding on that idea, creating proper DBusProxy subclasses, somehow resect the requirement for a non-user-controlled mainloop and thus improve the integratability of gatt-python for my own projects. If you think this migration is rubbish, just close the pull-request ;-)
--
Given that the python-dbus interface only receives fixes and is considered by
its author and maintainer as un-pythonic and is not recommended by him, it seems
more logical to use another, more recommendable interface.
As gatt-python already makes use of PyGI and GLib, it makes sense to use GDBus which
comes as a part of GLib.
This also effectively removes the python-dbus dependency.