node-bluez icon indicating copy to clipboard operation
node-bluez copied to clipboard

StaticKeyAgent not working as expected with "KeyboardOnly"

Open alexbrickwedde opened this issue 3 years ago • 1 comments

Hi,

i did a bluetooth.registerStaticKeyAgent("1234"); but my Android-Phone and my Windows 11 machine show a dialog presenting a number and requesting to input it. It immediatly fails, since 1234 is not matching. I also tried to register the StaticKeyAgent with NoInputNoOutput and other capabilities, but didn't get a solution to force Android/Windows asking for the pin.

Regards

...Alex

alexbrickwedde avatar Feb 22 '23 12:02 alexbrickwedde

I found, that i have to set sspmode of the bt controller to 0: hciconfig hci0 sspmode 0. But then the connection no longer worked. btmon shows bluetoothd: src/profile.c:ext_auth() Node Serial Port rejected D4:3A:2C:96:05:E3: Method not Implemented. In registerSerialProfile i had to add

RequireAuthorization: false

to the options of this.registerProfile to make it work again.

alexbrickwedde avatar Feb 22 '23 13:02 alexbrickwedde