Bluetoothctl set passkey

后端 未结 5 750
北荒
北荒 2021-02-05 12:39

I have a Raspberry Pi 2 running Raspbian kernel 4.1.15 and Bluez version 5.23.

I want to be able to connect a device (like an Android phone) to the rapsberry which shoul

5条回答
  •  不要未来只要你来
    2021-02-05 13:20

    I just had the same issue. If you press tab twice after agent you should see a list of available agents; KeyboardOnly works fine without notifications:

    [bluetooth]# agent on          # accidentally used wrong agent
    Agent registered
    [bluetooth]# agent 
    DisplayOnly      DisplayYesNo     KeyboardDisplay  KeyboardOnly     NoInputNoOutput  off              on               
    [bluetooth]# agent KeyboardOnly 
    Agent is already registered    # can't use two agents at one
    [bluetooth]# agent off         # unregister agent
    Agent unregistered
    [bluetooth]# agent KeyboardOnly   # register proper agent
    Agent registered
    [bluetooth]# pair XX:XX:XX:04:F5:7C 
    Attempting to pair with XX:XX:XX:04:F5:7C 
    [CHG] Device XX:XX:XX:04:F5:7C Connected: yes
    Request passkey
    [agent] Enter passkey (number in 0-999999): 722504
    [MoarBacon]# pair XX:XX:XX:04:F5:7C 
    Attempting to pair with XX:XX:XX:04:F5:7C 
    [CHG] Device XX:XX:XX:04:F5:7C Paired: yes
    Pairing successful
    

提交回复
热议问题