clockworkpi

Problems connecting to Bluetooth keyboard

I’ve had no luck scanning or pairing with an Anker bluetooth keyboard.

I have on occasion (maybe once every 5 or 6 attempts) seen the Anker device listed after scanning (it still takes several minutes) but then when I select the entry, I get an immediate “Authentication canceled” dialog box in the UI.

Anyone have any tips for getting Bluetooth to work? I’m on Clockwork OS 0.3 and am more than happy (and would prefer) to connect via the command line.

Thanks.

I have also been trying to pair a BT keyboard. This is a Logitech keyboard that requires a code to complete pairing. I tried the following from SSH:

cpi@clockworkpi : ~ $ bluetoothctl
[NEW] Controller B0:F1:EC:2D:07:5B clockworkpi [default]
[NEW] Device DE:05:20:01:30:94 ZaggKeys Universal
[NEW] Device 00:1F:20:04:AF:D0 Logitech diNovo Edge

This gets me into the bluetooth control command line…

[bluetooth]# agent on
Agent registered
[CHG] Device 00:1F:20:04:AF:D0 Connected: yes
[CHG] Device 00:1F:20:04:AF:D0 Connected: no
[bluetooth]# default-agent
Default agent request successful

Sets up agent…

[bluetooth]# scan on
Discovery started
[CHG] Controller B0:F1:EC:2D:07:5B Discovering: yes
[NEW] Device F3:0F:CC:85:0C:45 SG TRACKER
[CHG] Device 00:1F:20:04:AF:D0 LegacyPairing: yes
[CHG] Device 00:1F:20:04:AF:D0 RSSI: -66
[CHG] Device 00:1F:20:04:AF:D0 RSSI: -83
[CHG] Device F3:0F:CC:85:0C:45 RSSI: -99

Finds my Logitech Keyboard…

[bluetooth]# pair 00:1F:20:04:AF:D0
Attempting to pair with 00:1F:20:04:AF:D0
[CHG] Device 00:1F:20:04:AF:D0 Connected: yes
[agent] PIN code: 039015

This got me the code that had to be entered from the keyboard (Followed by Enter)

Failed to pair: org.bluez.Error.AuthenticationTimeout
[CHG] Device 00:1F:20:04:AF:D0 Connected: no
[bluetooth]# pair 00:1F:20:04:AF:D0
Attempting to pair with 00:1F:20:04:AF:D0
[CHG] Device 00:1F:20:04:AF:D0 Connected: yes
[agent] PIN code: 456862
[CHG] Device 00:1F:20:04:AF:D0 Paired: yes
Pairing successful
[CHG] Device 00:1F:20:04:AF:D0 Connected: no

A couple of attempts finally got a successful pairing, but it still didn’t work…

Thanks, I will try this tonight.

I tried again with the UI and it was an exercise in frustration. A scan finally connected and I could see the “Ankar” entry appear with a checkmark next to it. I thought at that point that I was paired. I pressed “Y” to see more details but noticed that “Paired” was set to “no”. When I pressed “A” to go back to the menu, the “Authentication Canceled” pop-up appeared.

I think either the UI interface or the Bluetooth configuration (or both) on the GameShell is not well tested and buggy. I hope that a future update can rectify this. Having a desktop is nice for native development on the GameShell, but not without a keyboard. :frowning:

Ha! I got the Logitech to connect. I had just missed a step! Unfortunately, the UI doesn’t support the ‘agent’ messages, so connecting is necessary from SSH.

cpi@clockworkpi : ~ $ bluetoothctl -a
[NEW] Controller B0:F1:EC:2D:07:5B clockworkpi [default]
[NEW] Device DE:05:20:01:30:94 ZaggKeys Universal
[NEW] Device 00:1F:20:04:AF:D0 Logitech diNovo Edge
Agent registered
[bluetooth]# scan on
Discovery started

Note that the -a does the ‘agent on’ for you. While scanning, everything bluetooth sees gets echoed back. Just look for the keyboard somewhere in there.

[bluetooth]# pair 00:1F:20:04:AF:D0
Attempting to pair with 00:1F:20:04:AF:D0
[CHG] Device 00:1F:20:04:AF:D0 Connected: yes
[agent] PIN code: 120469

Now enter the PIN code on the keyboard followed by ‘Enter’

[CHG] Device 00:1F:20:04:AF:D0 Modalias: usb:v046DpB309d011B
[CHG] Device 00:1F:20:04:AF:D0 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 00:1F:20:04:AF:D0 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 00:1F:20:04:AF:D0 ServicesResolved: yes
[CHG] Device 00:1F:20:04:AF:D0 Paired: yes
Pairing successful
[CHG] Device 00:1F:20:04:AF:D0 ServicesResolved: no
[CHG] Device 00:1F:20:04:AF:D0 Connected: no
[CHG] Device F3:0F:CC:85:0C:45 RSSI: -86

Now that it’s paired, connect it!

[bluetooth]# connect 00:1F:20:04:AF:D0
Attempting to connect to 00:1F:20:04:AF:D0
[CHG] Device 00:1F:20:04:AF:D0 Connected: yes
Connection successful
[CHG] Device 00:1F:20:04:AF:D0 ServicesResolved: yes

Now if we could just add this functionality to the UI. I just don’t know python enough to put it in there…

2 Likes

Very nice work, these instructions allowed me to get the Anker keyboard paired and connected. It is impossible to do this from the Bluetooth menu in the UI.

Unfortunately, I only have the Bluetooth keyboard and not a mouse so I’m not sure how much progress I can make using the full desktop (i.e., whether I can actually move the focus out of the Launcher window).

Have you tried that with a Bluetooth audio device? I would like to use my wireless headphones or Bluetooth headset with the GameShell but I didn’t have any luck so far trying to connect from the settings.

Wouldn’t hurt to try. It looks like the UI sends ‘0000’ as the activation code by default. Some devices require ‘1234’ instead. I’m not sure how to send activation codes from command-line. I’ll have to play around with it…

I just tested this with the new ClockWorkOS 0.3 image. It still does not allow pairing in the Bluetooth UI, but does work with the bluetoothctl command-line procedure. Unfortunately, pairing is not retained between boots and cannot connect through the UI, nor bluetoothctl without re-pairing. I’m hoping someone with ClockWork is following this thread and may offer fixes/updates.

Good News! The Logitech diNovo Edge keyboard I’m using includes a Trackpad. I tried it out with the HDMI display and once connected, both the keyboard and trackpad are fully functional!

I don’t have a trackpad with my BT keyboard, so can’t test that, but can you confirm whether you can access desktop menus by right clicking on the desktop?

I’m just curious if you’re able to move the focus out of the Launcher window. Without a BT mouse I can’t leave the Launcher window to test that.

I agree about the BT configuration in ClockWorkOS 0.3. I hope they make this a priority to address in the next update. It would be very nice to have a standard Debian desktop for native development on the GameShell.

Hey guys – when I try bluetoothctl or sudo bluetoothctl, I get this output:

[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
No default controller available
[bluetooth]# devices
No default controller available
[bluetooth]# list
[bluetooth]# devices
No default controller available
[bluetooth]# list
[bluetooth]# scan on
No default controller available

Does anyone know if something has changed since this thread/tutorial was made?

(This is using the v0.3 image)