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

bluetooth start not handled in kete #65

Open
whot opened this issue Feb 1, 2018 · 6 comments
Open

bluetooth start not handled in kete #65

whot opened this issue Feb 1, 2018 · 6 comments
Labels
bug Something isn't working kete

Comments

@whot
Copy link
Contributor

whot commented Feb 1, 2018

Sequence to reproduce:

  • turn bluetooth off
  • start tuhi
  • start kete
  • turn bluetooth on

The tuhi dbus object shows the device but kete doesn't know about it. Somewhere a signal is getting lost

@whot whot added the bug Something isn't working label Feb 1, 2018
@bentiss
Copy link
Collaborator

bentiss commented Feb 5, 2018

I wonder if we really want to fix this. kete is not intended to be the final application, so if you run this, there is a high chance you know how to enable bluetooth before running kete.

I suspect we will need a bunch of bluez callbacks too, so I am reluctant to handle this case.

@whot
Copy link
Contributor Author

whot commented Feb 5, 2018

kete doesn't need to, but fixing this would verify if the bug is in tuhi somewhere. Because kete shouldn't need any bluez hooks anyway, but if a tuhi dbus device doesn't show up despite it being on the bus then we have a problem.

@bentiss
Copy link
Collaborator

bentiss commented Feb 6, 2018

Trying to replicate here.

If I just run systemctl stop bluetooth then start tuhi, then tuhi-kete, it all seem to work well besides the fact that tuhi doesn't seem to see the discovery announcements from the device until it gets restarted.

If I click on the Bluetooth Off icon first in gnome-shell, I have a GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready (36). It is kind of expected, and I think we should just relay it to the caller, no?

@bentiss
Copy link
Collaborator

bentiss commented Feb 6, 2018

Note that turning bluetooth On and Off influence on the property org.bluez.Adapter1.Powered. So we should be able to detect this before attempting to communicate.

@whot
Copy link
Contributor Author

whot commented Feb 7, 2018

doesn't seem to see the discovery announcements from the device until it gets restarted.

iirc that's the issue, we shouldn't need to restart tuhi when bluetooth gets disabled and re-enabled.

@bentiss
Copy link
Collaborator

bentiss commented Feb 16, 2018

Making progresses here. I have a different behavior on my desktop than on my laptop:

  • on the desktop, toggling bluetooth on/off affects the Powered property, cleans up the GATT services, but the bluez devices are kept
  • on the laptop, toggling bluetooth off also removes the bluez devices.

Which means that on the laptop, if I start tuhi while bluetooth is off, it only sees the devices later, when it is turned on. However, currently there is no events emitted when Devices gets modified with already registered devices. I guess this is the issue you were seeing. You have to restart kete to get the list of devices.

@whot whot added the kete label Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kete
Projects
None yet
Development

No branches or pull requests

2 participants