10
3
I am using a Raspberry Pi Zero with a Iot pHat and was able to ssh into the Pi using a USB cable using this tutorial. I then set up my home WiFi with the pHat. Then I powered up the Pi with a separate power source. I could then ssh into the Pi wirelessly through my home network.
Finally to my question. I would like to connect the Pi to a wireless keyboard. I am trying to use the bluetoothctl
tool to connect it. When running scan on
, the Pi recognizes the keyboard, but when pairing, it won't pair. Here is the terminal session:
[CHG] Device 0C:4D:12:11:01:E4 Name: Bluetooth Keyboard
[CHG] Device 0C:4D:12:11:01:E4 Alias: Bluetooth Keyboard
[bluetooth]# pair 0C:4D:12:11:01:E4
Attempting to pair with 0C:4D:12:11:01:E4
[CHG] Device 0C:4D:12:11:01:E4 Connected: yes
[CHG] Device 0C:4D:12:11:01:E4 Connected: no
[CHG] Device 0C:4D:12:11:01:E4 Connected: yes
[CHG] Device 0C:4D:12:11:01:E4 Connected: no
[CHG] Device 0C:4D:12:11:01:E4 Connected: yes
[CHG] Device 0C:4D:12:11:01:E4 Connected: no
[CHG] Device 0C:4D:12:11:01:E4 Connected: yes
Failed to pair: org.bluez.Error.AuthenticationFailed
[CHG] Device 0C:4D:12:11:01:E4 Connected: no
As you can see it seems like it connects and disconnects repeatedly.
3Doesn't work for me. The first time I set Bluetooth up, my phone connected using these steps without any problem. But as soon as I restarted the Pi, my phone refused to connect—and it looks like it misreads my Pi's device class too. No idea what's going on :/ – rensa – 2017-08-12T05:18:52.830
12
[bluetooth]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
Failed to connect: org.bluez.Error.Failed
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no
– rensa – 2017-08-12T05:20:34.907