Authentication code required for keyboardless device

Bug #1857891 reported by bersyl91
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME Bluetooth
Fix Released
Unknown
gnome-bluetooth (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Hi,

I'm trying to connect a turn page pedal which acts partly as a two-button mouse (provides left- and right-click depending on the pedal you press) and partly as a keyboard (can send keycodes as enter, space, left, right, PgUp or PgDn...).

It only has two pedals and no keyboard (see it on manufacturer's site: https://www.donnerdeal.com/products/donner-bluetooth-page-turner-pedal-for-tablets-ipad-rechargeable-black?_pos=4&_sid=b8e2efbcf&_ss=r).

Whenever I try to connect it to bluez, it asks me for an authentication code which is impossible to provide, of course.

I've search deeply but couldn't find any means to automatically "trust" my pedal.

I've tried it on Windows and Android: it functions smoothly...

Thank you in advance

Some information:

hciconfig -a

hci0: Type: Primary Bus: USB
 BD Address: 00:16:38:CA:9D:64 ACL MTU: 1017:8 SCO MTU: 64:0
 UP RUNNING PSCAN
 RX bytes:6435 acl:95 sco:0 events:271 errors:0
 TX bytes:3151 acl:76 sco:0 commands:126 errors:0
 Features: 0xff 0xff 0x8d 0xfe 0x9b 0xfd 0x00 0x80
 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
 Link policy: RSWITCH HOLD SNIFF PARK
 Link mode: SLAVE ACCEPT
 Name: 'HP-t520-Flexible-Series-TC'
 Class: 0x0c0104
 Service Classes: Rendering, Capturing
 Device Class: Computer, Desktop workstation
 HCI Version: 2.0 (0x3) Revision: 0x2000
 LMP Version: 2.0 (0x3) Subversion: 0x415c
 Manufacturer: Broadcom Corporation (15)

bluetoothctl --version

bluetoothctl: 5.48

bluetoothctl

[NEW] Controller 00:16:38:CA:9D:64 HP-t520-Flexible-Series-TC [default]
[NEW] Device 08:29:17:24:83:49 ZX1679
[NEW] Device 50:E6:66:03:72:8C Bluetooth Music Pedal
Agent registered

[Bluetooth Music Pedal]# show
Controller 00:16:38:CA:9D:64 (public)
 Name: HP-t520-Flexible-Series-TC
 Alias: HP-t520-Flexible-Series-TC
 Class: 0x000c0104
 Powered: yes
 Discoverable: no
 Pairable: yes
 UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb)
 UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
 UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
 UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
 UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
 UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
 UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
 UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
 UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
 Modalias: usb:v1D6Bp0246d0530
 Discovering: no

[Bluetooth Music Pedal]# devices
Device 08:29:17:24:83:49 ZX1679
Device 50:E6:66:03:72:8C Bluetooth Music Pedal

[Bluetooth Music Pedal]# info 50:E6:66:03:72:8C
Device 50:E6:66:03:72:8C (public)
 Name: Bluetooth Music Pedal
 Alias: Bluetooth Music Pedal
 Class: 0x00000540
 Icon: input-keyboard
 Paired: no
 Trusted: yes
 Blocked: no
 Connected: yes
 LegacyPairing: no
 UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
 UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
 Modalias: usb:v04E8p7021d0102

rfkill list

0: hci0: Bluetooth
 Soft blocked: no
 Hard blocked: no
1: phy0: Wireless LAN
 Soft blocked: no
 Hard blocked: no
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.9
Architecture: amd64
CurrentDesktop: LXDE
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2019-02-25 (308 days ago)
InstallationMedia: Lubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
Package: gnome-bluetooth 3.28.0-2ubuntu0.2
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 4.15.0-72.81-generic 4.15.18
Tags: bionic
Uname: Linux 4.15.0-72-generic x86_64
UpgradeStatus: Upgraded to bionic on 2019-02-25 (308 days ago)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The correct authentication code is either all zeroes (like 0000) or will be printed on the device somewhere, or in its documentation. Please check all of those.

Changed in bluez (Ubuntu):
status: New → Incomplete
tags: added: bionic
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I am assuming it's possible to enter the code using a separate keyboard that's plugged in simultaneously?...

Revision history for this message
bersyl91 (choppy-free) wrote :

Hi Daniel,
no it isn't possible to plug an external keyboard.
For the default code, it's possible, but I haven't got a chance to try it: I'm given a random 6-digit code by bluez to enter.
Is it possible to change that?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK. Automatic/manual authentication code issues in the past have been fixed in gnome-bluetooth so I am going to assign this there. Please also run this command to send us more information about the affected computer:

  apport-collect 1857891

affects: bluez (Ubuntu) → gnome-bluetooth (Ubuntu)
Revision history for this message
bersyl91 (choppy-free) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
bersyl91 (choppy-free) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
bersyl91 (choppy-free) wrote : ProcEnviron.txt

apport information

Revision history for this message
bersyl91 (choppy-free) wrote :

Ok, done.
I hope everything ran fine and that the report is arrived to you.
Thank you for everything!

bersyl91 (choppy-free)
Changed in gnome-bluetooth (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It looks like the solution may be to add a new line to:
/usr/share/gnome-bluetooth/pin-code-database.xml

Try it for yourself, and at the same time please open a new issue at:
https://gitlab.gnome.org/GNOME/gnome-bluetooth/issues

Revision history for this message
bersyl91 (choppy-free) wrote :

Hi,

Well, I've tried your proposal, but without any success.

I've tried with several options, like:

        <!-- Donner TurnPage pedal -->
        <device oui="50:E6:66:" name="Bluetooth Music Pedal" pin="NULL"/>
        <device oui="50:E6:66:" name="Bluetooth Music Pedal" pin="0000"/>
        <device oui="50:E6:66:" type="Keyboard" pin="NULL"/>

Everything acts as if the file wasn't read at all (I've not found which flag to turn on to have a log message about it).

Then, I've tried to run "blueman-manager" and had the following output. Do you think something can be done with that?

Generate (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:173)
Bluetooth Music Pedal
Jan 7 11:35:47 HP-t520-Flexible-Series-TC bluetoothd[4276]: No agent available for request type 4
Jan 7 11:35:47 HP-t520-Flexible-Series-TC bluetoothd[4276]: device_notify_pin: Operation not permitted
_________
on_device_property_changed (/usr/lib/python3/dist-packages/blueman/gui/DeviceList.py:163)
list: device_prop_ch Connected 1 /org/bluez/hci0/dev_50_E6_66_03_72_8C
_________
row_update_event (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceList.py:264)
row update event Connected 1
_________
Generate (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:173)
Bluetooth Music Pedal
_________
monitor_power_levels (/usr/lib/python3/dist-packages/blueman/gui/DeviceList.py:185)
starting monitor
_________
level_setup_event (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceList.py:325)
animating up
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 607, in msg_reply_handler
    *message.get_args_list()))
  File "/usr/lib/python3/dist-packages/blueman/bluez/Device.py", line 33, in err
    raise exception
blueman.bluez.errors.DBusAuthenticationRejectedError: Authentication Rejected
_________
on_device_property_changed (/usr/lib/python3/dist-packages/blueman/gui/DeviceList.py:163)
list: device_prop_ch Connected 0 /org/bluez/hci0/dev_50_E6_66_03_72_8C
_________
row_update_event (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceList.py:264)
row update event Connected 0
_________
Generate (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:173)
Bluetooth Music Pedal
_________
level_setup_event (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceList.py:325)
animating down
_________
update (/usr/lib/python3/dist-packages/blueman/gui/DeviceList.py:186)
stopping monitor (not connected)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Upstream is onto it now so the discussion should stay there:
https://gitlab.gnome.org/GNOME/gnome-bluetooth/issues/57

Changed in gnome-bluetooth:
status: Unknown → New
Changed in gnome-bluetooth (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Changed in gnome-bluetooth:
status: New → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

the upstream report was closed on the basis that blueman was used and not gnome bluetooth, is it the case here? do you still get the issue and tried under GNOME?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.