-
-
Notifications
You must be signed in to change notification settings - Fork 24
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 detection: better way to identify BT interface #96
Comments
@marvinmarnold @vpetersson need to get this resolved in order for diagnostics to work properly with RockPi |
Will keep an eye on this. Its in our next sprint (started today). @posterzh is about to start working on it. |
Sweet 👌 |
There are 3 utilities for us to get BLE devices. To get list of bluetooth devices programatically, we can use dbus for that.
|
Well, there are more ways. Those are just CLI tools for interacting with a BLE device. You can find out if a BLE device is connected on kernel level instead (such as looking in While I don't love the current approach ( |
@vpetersson I implemented getting the BLE devices and LTE devices programatically using dbus. This draft implementation would fix both of #96 and #88 To interact BLE and LTE devices with other than dbus, I played with several commands and they needs the The following commands works well when network_mode is set to host and have NET_ADMIN capability, without dbus enabled.
The following commands doesn't work without dbus enabled.
|
@posterzh With regards to the other bits, I think dbus probably makes the most sense here as it's how we interface with Bluetooth and WiFi in hm-config container. This would also allow us to solve #226 in diagnostics in the future as well. Not sure what @vpetersson and @marvinmarnold think? @vpetersson re your comment on /sys or /proc - just for reference, for that we would need to enable the balena labels for bind mounting those pseudo filesystems into the container |
@shawaj In the today's standup meeting, @vpetersson confirmed that interacting in a programmatic way using dbus makes more sense. |
Sounds good to me 👍 |
Closed by #242 |
Reopening until merged to production |
@shawaj Make sense. I am writing a PR in |
Similar to #88 but for BT instead of LTE
Currently, we identify "BT detected" by looking for the USB ID of the bluetooth module:
hm-diag/hw_diag/utilities/hardware.py
Lines 8 to 21 in 2a6efba
Whilst this works, it is a little bit cumbersome IMO, and doesn't allow checking for in-built bluetooth hardware (which we will have on future hardware - for example the light hotspots).
So ideally, we need a better way to identify the bluetooth interface. Perhaps by checking for a device with
hcitool dev
orhciconfig -a
The text was updated successfully, but these errors were encountered: