-
Notifications
You must be signed in to change notification settings - Fork 1
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
bluez - NoInputNoOutput agent configuration does not work #291
Comments
@pelwell Any idea about this one? |
This is the first I'm hearing of the issue. @OrangeDog The forum thread implies that upgrading to a newer version of BlueZ will resolve the problem - do you have any evidence of that? Using a Bullseye image, running Have you tested it in this way? Is there something specific about your systemd service (or that the fact that it is a systemd service)? Posting your service here would be helpful. |
Does it? The other person on that thread tried but couldn't get the newer version building.
That's the first thing I did, before I tried writing my own that also didn't work. bluetooth.service.d/override.conf:
bluetooth_agent.service:
Found another apparent copy of this issue: khvzak/bluez-tools#31 |
Anyone has solutions? I am facing this issue |
And you found that it worked when run from the command line, but not from a systemd service? If so, don't you think your issue report could have made that clear? |
No, it didn’t work.
I was not prompted at all.
… On 1 Mar 2022, at 18:45, Phil Elwell ***@***.***> wrote:
That's the first thing I did, before I tried writing my own that also didn't work.
And you found that it worked when run from the command line, but not from a systemd service? If so, don't you think your issue report could have made that clear?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.
|
I'm confused - isn't that the goal? Please state clearly:
|
|
As I understand it, the agent names describe the capabilities of the device running the agent:
Try running |
For me:
All things worked well. You can follow me. ======= |
@pelwell Your understanding is not correct. The capabilities only describe the physical user-facing input and output methods of the device, not the I/O of the agent program.
|
I think you try to reinstall another version of bluez. For me, I install 5.63 but it didn't work, then I reinstalled bluez to 5.55 |
The point of this issue is that 5.50 works, but 5.55 (which is what the bullseye image comes with) doesn't. |
I am sorry, I mistyped. My current bluez verion is 5.55. It worked well in the 5.55 version. ===== |
|
@pelwell I assume you're quoting that because of "reflects the input and output capabilities of the agent"? It should more correctly be "of the hardware to which the agent's application has access". That's why it's specifically "keyboard", "display" and "yes/no". I can go through every capability and give you screenshots of what it does with the |
This does not make sense - how can a BlueTooth device be expected to know about the capabilities of all the things that might want to connect to it? In this scenario the Pi is the device.
Please do - it might help to uncross our purposes. |
You have it the wrong way around. It's not the capabilities of all the things that might want to connect to it, it's the capabilities of the device that it itself is. The agent on a smart speaker should use The
I'll get on it... |
Just tested this, and it made no difference. |
Thanks - your screenshots show that the Pi and bt-agent are behaving in the way that I expect, except that when the Repeating the same test here with a laptop running Windows 10 it is able to connect to the Pi running BlueZ 5.55, regardless of the agent selected (and with the expected level of interaction on the Pi). Have you tried connecting to the Pi running NoInputNoOutput from another host - a phone, say? |
Because your expectations are wrong about the intended behaviour of
Collegeues have tried with multiple Android phones, and they get the same thing (i.e. nothing but a connection error).
I assume your configuration must differ in some way to mine (and others reporting the same issue). Does the hardware matter? This is a PiZero W v1.1 |
Of course not - I'm using the standard Pi desktop "Make discoverable", which presents a headset/headphone device. From the other commentors there is clearly some pairing issue with the NoInputNoOutput agent in BlueZ 5.55, even though it works. @XECDesign Will Debian bump to a newer version, or are we stuck with 5.55 until the next major OS release? |
Just want to confirm a use case when the agent Using
I was the one that started the thread mentioned in the top post at the Raspberry Pi forum back in November: |
Sorted out another Pi Zero W running buster. Added screenshot above. When the connection is started with the buster image, a
However, with the bullseye image, there are only the connection signals and no method calls are made:
This demonstrates that the problem is not simply with the In a desktop environment I guess D-Bus is set up differently, which may account for why it works for @pelwell? |
Debian is unlikely to bump the version unless there's a set of security issues that make it unreasonable to backport the fix. If you believe it's the right thing to do and won't cause issues, we can bump it to 5.55 on our end. |
I can't hand-on-heart say it is the right thing to do without taking time to test it, but that's probably the way to go. 5.63 is the latest version - I'll give it a spin when I get a chance. |
Alright, then maybe I should update the package in the internal repo anyway. Then if you test it we can be sure I didn't miss anything on the packaging side and it doesn't need to be tested twice. |
I'm a bit confused by what's going on here. 5.55 is the current version and doesn't work. Apparently upgrading to 5.63 doesn't fix it either. The buster images worked, but that may actually be unrelated to the bluez version (5.50), and instead be some dbus-related change. |
My solution was to do run an expect script at boot with bluetoothctl like this one:
|
in case it helps, I was also trying to set my rpi to receive automatic bluetooth connections and faced this problem with NoInputNoOutput agent. The simplest solution I could find was to modify the simple-agent from the examples on bluez/bluez-tools: https://github.com/bluez/bluez/blob/master/test/simple-agent here the simplest fix is to set then just run the script on a systemctl service and it will work. |
@frmunozForcast I think this is a valid workaround, but I can't get it to work. I still get the same issue. The moment I update the simple-agent with |
@frmunozForcast the point of this issue is that setting |
@OrangeDog have you had any luck so far? with a fix or a workaround? That is quite an annoying bug. |
yes, after some testing I had this issue and could not fix it. At the end, I changed to
With this i can still have automatic connection and everything seems to work properly (so far), device can disconnect and re-connect freely, multiple devices can connect, etc. |
@frmunozForcast the only issue with that is some devices are going to ask you to type "0000" into the Pi, or to check the Pi's display, which may confuse the users. |
Just a quick update. I have re-tested with Bookworm ( When the agent is registered with any capability it now also never receives a I tested with the |
Does |
No. However, I have discovered that I'll try to do some more investigation on that another day. |
Have a workaround solution but it depends on what OP desires. I was encountering the same issue searching for converting an old sound system into a bluetooth speaker using a Pi3. I wanted seamless re-connection using This is for Raspbian Debian Bookworm:
Looks like trixie may have a more up-to-date version of |
@kinnairdclan did you try building the "current" version 5.66 to see if it's maybe a config issue? Are you using the desktop or lite image? Did you actually set
This is necessary, as the device will have no inputs or outputs (including no console in which to type "yes"). I don't know how you expect a bluetooth speaker to work any differently. And to reiterate the issue again: when using |
I did not try building 5.66, but I did try the 5.66 Bookworm
Disconnected -- in your paired device's bluetooth menu, there is usually an option to "disconnect" from a device or "forget" a device. I meant that when you disconnect your paired device in this sense, and then connect again any given time later, it is totally seamless with no further confirmation requests from the bluetooth speaker device. It behaves like you would expect a bluetooth speaker to behave with e.g. a cellphone that has already been paired to it at least once before--seamless. Prompts -- By this I meant any modal prompts on the pairing device before pairing succeeds. For example, the initial "Pair" prompt, when connecting to a device for the first time my Android phone, presents six digits that must match the digits the RPi is presenting via
Many bluetooth speakers have a button that turns on discoverablilty as a barrier to unauthorized device pairing. Something like a Pi has no such button, therefore I equated this I'll take the above down as off-topic if it's not useful, just let me know. I just wanted to present a solution that could work for many bluetooth-speaker related projects. |
Then it is not a solution to
Disconnect (what you did) has no issues. It's "forget" that is the problem, because that requires re-pairing, and the request to authorise pairing does not happen correctly.
The point of
That would be incorrect. Pushing the button does the equivalent of |
However, thank you @kinnairdclan for pointing out the new config options that I had not looked at. If your aim is to have unconditional pairing then a viable workaround appears to be
I can confirm that the "it works once" observation applies to each device separately. Deleting the keys from the Pi side (e.g. Overall, it looks like it treats registering Logs confirming that the agent is completely ignored in |
I think i have the same issue. I want to connect my smartphone (Android 14) on my Raspberry 3B+ to send audio from my phone to the raspberry. Commands (using bluetoothctl 5.66) :
Indeed, my smartphone want a passkey confirmation...but i specified "agentNoInputNoOutput" so i don't understand why i need to confirm on the smartphone and on my raspberry prompt. I have a bluetooth speaker (a classic JBL Charge)... and when i trigger an apparing sequence pushing a button on my speaker, my phone is connected without a passkey. |
I can confirm and reproduce exactly OrangeDog scenario:
It should match MAC address and not auto generated pin in the case of NoInputNoOutput. So 2 issues : |
Does it work for you if you kill the panel?
Then try again? The panel is an agent, so I'm guessing it's controlling it... |
With the upgrade to Bullseye and
bluez-5.55-3.1+rpt1
, registering an agent with theNoInputNoOutput
capability no longer works.This affects the
bt-agent
program in thebluez-tools
package, but also any other agent using the D-Bus interface.More details: https://forums.raspberrypi.com/viewtopic.php?t=324225
The text was updated successfully, but these errors were encountered: