UT does not discover bluetooth smart (BLE) devices

Bug #1576986 reported by Tomas Öqvist
100
This bug affects 20 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Unassigned
ubuntu-system-settings (Ubuntu)
Fix Released
Medium
Konrad Zapałowicz

Bug Description

I am actually typing this on a Microsoft Universal Foldable Keyboard connected to my M10 tablet.

Device: Bq Aquaris M10
OS: OTA-10.1

Generally bluetooth devices that are not version 4 or bluetooth smart (BLE) seem to work and pair fine with the Aquaris E4.5 and the M10. However, when it comes to BLE/version 4, things obviously get too complicated for the system bluetooth settings because it doesn't even manage to discover these devices.

OTA-10.1 uses Bluez version 5.37, which is perfectly capable of discovering and pairing with BLE devices, but in Ubuntu Touch it requires the use of "bluetoothctl" in the terminal. I will describe the steps needed below:

phablet@ubuntu-phablet:-$ bluetoothctl
[bluetooth]# scan on

wait for device to show up in list, typically:
[NEW] Device 01:02:FF:A8:BB:00 DeviceName

[bluetooth]# discoverable on
Changing discoverable on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded

Now tell bluetoothctl to pair the device
[bluetooth]# pair 01:02:FF:A8:BB:00
Attempting to pair with 01:02:FF:A8:BB:00

If pairing with MS Universal Foldable Keyboard, you will probably see a 6-digit code, punch that code on the keyboard and hit return.

[CHG] Device 01:02:FF:A8:BB:00 Connected: yes
[agent] Passkey: 123456

You should be good to go.

However, the MS Foldable Keyboard does not show up in system bluetooth settings (see attached screenshot) and getting the M10 to recognize that the Keyboard is turned off seems to require a reboot (and possibly also bluetooth turned off). Otherwise, the onscreen keyboard doesn't show up.

Revision history for this message
Tomas Öqvist (tomoqv) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-system-settings (Ubuntu):
status: New → Confirmed
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

Thanks, Thomas. Could you add some more information on the device? I.e. attach the output from

    $ bluetoothctl
    [bluetooth]# info <mac>

to this bug?

Changed in ubuntu-system-settings (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → Medium
Revision history for this message
Tomas Öqvist (tomoqv) wrote :

Absolutely!

Device F6:BB:37:A0:F8:00
 Name: UniversalFoldableKb
 Alias: UniversalFoldableKb
 Appearance: 0x03c1
 Icon: input-keyboard
 Paired: yes
 Trusted: yes
 Blocked: no
 Connected: no
 LegacyPairing: no
 UUID: Vendor specific (00001016-d102-11e1-9b23-00025b00a5a5)
 UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
 UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
 UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
 UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
 UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
 UUID: Scan Parameters (00001813-0000-1000-8000-00805f9b34fb)
 UUID: Vendor specific (a74df799-13fd-4f82-a45a-0340180eac97)
 Modalias: usb:v045Ep080Cd0110

Changed in ubuntu-system-settings (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Tomas Öqvist (tomoqv) wrote :

I am adding the link to this bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-keyboard/+bug/1577436 also, because I think it may be related to the problem reported in this bug report.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

One of many related to BTLE devicess

Changed in canonical-devices-system-image:
assignee: nobody → John McAleely (john.mcaleely)
importance: Undecided → High
milestone: none → backlog
status: New → Confirmed
Revision history for this message
John McAleely (john.mcaleely) wrote :

My understanding is that bluez is working well here, and it's a UI problem that they are not (a) detected, and (b) assigned appropriately within the unity/mir input stack

Changed in canonical-devices-system-image:
assignee: John McAleely (john.mcaleely) → kevin gunn (kgunn72)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Marked the dupe with Logitech K830

I did the same steps in the description but I am never prompted to enter the passkey
Bluetoothctl reports the device as paired and connected, but the keyboard stays in discovery mode.

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote :

I could not get Logitech MX anywhere 2 mouse or Belkin Slim style keyboard to work with UT even via the CLI commands.

[NEW] Controller B4:9D:0B:50:1B:36 ubuntu-phablet [default]
[NEW] Device 70:81:EB:5F:90:44 T-iPhone
[NEW] Device 14:99:E2:01:1D:CC 14-99-E2-01-1D-CC
[NEW] Device 54:60:09:04:13:AB 54-60-09-04-13-AB
[NEW] Device D0:4F:7E:1E:BF:53 D0-4F-7E-1E-BF-53
[NEW] Device F4:61:3E:46:04:27 Belkin Slim Style Keyboard
[NEW] Device FE:A3:C1:14:51:2E Belkin Slim Style Keyboard
[NEW] Device FD:F9:5F:4F:3B:D8 Belkin Slim Style Keyboard
[NEW] Device D7:BE:EE:3E:8C:4B Belkin Slim Style Keyboard
[NEW] Device EF:EE:62:D3:E4:7F Belkin Slim Style Keyboard
[NEW] Device C0:C2:B4:3A:54:81 MX Anywhere 2
[NEW] Device 00:07:61:13:2E:D1 Logitech MX900 Mouse
[NEW] Device 60:FB:42:01:28:F6 t-m10 keyboard
[NEW] Device 7C:1E:52:09:57:A9 Microsoft Wedge Mobile Keyboard
[CHG] Device F4:61:3E:46:04:27 Connected: no
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# pair C0:C2:B4:3A:54:81
Attempting to pair with C0:C2:B4:3A:54:81
Failed to pair: org.bluez.Error.AuthenticationFailed

Both the keyboard and the mouse end up in the same error, org.bluez.Error.AuthenticationFailed
Keyboard never asks for a pin.

Any further hints I can look on pairing these?

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote :

MX anywhere 2 device info:

Device C0:C2:B4:3A:54:81
        Name: MX Anywhere 2
        Alias: MX Anywhere 2
        Appearance: 0x03c2
        Icon: input-mouse
        Paired: no
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
        UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific (00010000-0000-1000-8000-011f2000046d)
        Modalias: usb:v046DpB013d0007
[bluetooth]#

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote :

Belkin keyboard info:

Device F4:61:3E:46:04:27
        Name: Belkin Slim Style Keyboard
        Alias: Belkin Slim Style Keyboard
        Appearance: 0x03c1
        Icon: input-keyboard
        Paired: no
        Trusted: no
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Vendor specific (00001016-d102-11e1-9b23-00025b00a5a5)
        UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
        UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
        UUID: Scan Parameters (00001813-0000-1000-8000-00805f9b34fb)
        UUID: Unknown (00007fff-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v050Cp0179d0100
        RSSI: -52
[CHG] Device F4:61:3E:46:04:27 Connected: no

Revision history for this message
Mark Postal (mark-postal) wrote :

Tim, restart everything (M10, keyboard, mouse) and try again. I had the same trouble with the Microsoft Designer Desktop Keyboard and Mouse. Eventually (over days and several attempts) I was able to pair the devices with the above procedure.

Unfortunately, the MS Designer keyboard is unusable as it behaves like it has a stuck key. Also, the MS Designer mouse lags behind the user gestures.

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote :

Device I'm using is BQ M10 with #r106.

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote :

I somehow managed to pair the devices, keyboard works ok, alt-gr + num keys do not work but that is not relevant to this bug. Mouse seems really horrible, major lag and mostly unusable.

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote :

After reboot everything is back to square one. No mouse no keyboard. Did anyone else had this issue after boot/shutdown?

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote :

I'm still trying to get this working. Mouse can be paired but it does not bring up the mouse pointer.

[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[CHG] Device C0:C2:B4:3A:54:83 Connected: yes
[MX Anywhere 2]# pairable on
Changing pairable on succeeded
[MX Anywhere 2]# discoverable on
Changing discoverable on succeeded
[MX Anywhere 2]# pair
Attempting to pair with
[CHG] Device C0:C2:B4:3A:54:83 Paired: yes
Pairing successful
[MX Anywhere 2]# info
Device C0:C2:B4:3A:54:83
        Name: MX Anywhere 2
        Alias: MX Anywhere 2
        Appearance: 0x03c2
        Icon: input-mouse
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
        UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific (00010000-0000-1000-8000-011f2000046d)
        Modalias: usb:v046DpB013d0007

Revision history for this message
Victor gonzalez (victor-gonzalez-0) wrote :

Hi!

Here is all the information about the test performed with both Fit-Bit Flex and Xiaomi M1 band(both BLE devices):

Devices info
-----------------------------------
--> This band needs an app to pair in Android devices so this might not be the best example
[bluetooth]# info C7:46:4D:C0:B0:37
Device C7:46:4D:C0:B0:37
 Name: Flex
 Alias: Flex
 Paired: no
 Trusted: no
 Blocked: no
 Connected: no
 LegacyPairing: no
 UUID: Vendor specific (adab313a-6e7d-4601-bda2-bffaa68956ba)
-----------------------------------
--> This one do not need any app to work or pair but it gives the same error as Fit-Bit

[bluetooth]# info 88:0F:10:93:BA:16
Device 88:0F:10:93:BA:16
 Name: MI
 Alias: MI
 Paired: no
 Trusted: no
 Blocked: no
 Connected: no
 LegacyPairing: no
 UUID: Anhui Huami Information.. (0000fee0-0000-1000-8000-00805f9b34fb)
 UUID: Tencent Holdings Limited (0000fee7-0000-1000-8000-00805f9b34fb)
--------------------
Time stamp:

Fit-Bit FLEX
1st attempt
13:10 - Start pairing
13:11 pairing Flex(Fit-Bit) 1st attempt - Failed
13:12 - Pairing Flex(Fit-Bit) 2nd attempt - Failed

2nd attempt
13.31 - Pairing commands
13.32 - Pairing failed (SS)
--------------
Xiaomi M1 band
1st attempt
13:45 - Pairing produre
13:46 - Pairing failure (SS)
2nd attempt
13:56 - 2nd attempt to pair failed (SS)

Additional info: please find attached BT logs of all this test case.

Hope this is usefull for you :)

Revision history for this message
Victor gonzalez (victor-gonzalez-0) wrote :

Please find attached the screenshots with the failure when pairing both Xiaomi and Fit-Bit devices.

Revision history for this message
Victor gonzalez (victor-gonzalez-0) wrote :

Please find attached the screenshots with the failure when pairing both Xiaomi and Fit-Bit devices.

Revision history for this message
João Loureiro (joaofl) wrote :

It worked for me. But until reboot only.
Anyone suggest a solution to make it pair automatically after reboot?

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

This may be fixed by a recent landing to proposed chanel

Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Konrad Zapałowicz (kzapalowicz)
Changed in canonical-devices-system-image:
assignee: kevin gunn (kgunn72) → John McAleely (john.mcaleely)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

sorry that fix is still in testing

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote : Re: [Bug 1576986] UT does not discover bluetooth smart (BLE) devices

Hi,

Is there a way to install the silo / patch and help on testing??

> On 05 Aug 2016, at 23:34, Pat McGowan <email address hidden> wrote:
>
> sorry that fix is still in testing
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1576986
>
> Title:
> UT does not discover bluetooth smart (BLE) devices
>
> Status in Canonical System Image:
> Confirmed
> Status in ubuntu-system-settings package in Ubuntu:
> Confirmed
>
> Bug description:
> I am actually typing this on a Microsoft Universal Foldable Keyboard
> connected to my M10 tablet.
>
> Device: Bq Aquaris M10
> OS: OTA-10.1
>
> Generally bluetooth devices that are not version 4 or bluetooth smart
> (BLE) seem to work and pair fine with the Aquaris E4.5 and the M10.
> However, when it comes to BLE/version 4, things obviously get too
> complicated for the system bluetooth settings because it doesn't even
> manage to discover these devices.
>
> OTA-10.1 uses Bluez version 5.37, which is perfectly capable of
> discovering and pairing with BLE devices, but in Ubuntu Touch it
> requires the use of "bluetoothctl" in the terminal. I will describe
> the steps needed below:
>
> phablet@ubuntu-phablet:-$ bluetoothctl
> [bluetooth]# scan on
>
> wait for device to show up in list, typically:
> [NEW] Device 01:02:FF:A8:BB:00 DeviceName
>
> [bluetooth]# discoverable on
> Changing discoverable on succeeded
> [bluetooth]# agent on
> Agent registered
> [bluetooth]# default-agent
> Default agent request successful
> [bluetooth]# pairable on
> Changing pairable on succeeded
>
> Now tell bluetoothctl to pair the device
> [bluetooth]# pair 01:02:FF:A8:BB:00
> Attempting to pair with 01:02:FF:A8:BB:00
>
> If pairing with MS Universal Foldable Keyboard, you will probably see
> a 6-digit code, punch that code on the keyboard and hit return.
>
> [CHG] Device 01:02:FF:A8:BB:00 Connected: yes
> [agent] Passkey: 123456
>
> You should be good to go.
>
> However, the MS Foldable Keyboard does not show up in system bluetooth
> settings (see attached screenshot) and getting the M10 to recognize
> that the Keyboard is turned off seems to require a reboot (and
> possibly also bluetooth turned off). Otherwise, the onscreen keyboard
> doesn't show up.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/canonical-devices-system-image/+bug/1576986/+subscriptions

Revision history for this message
mechaxl (mechaxl) wrote :

I would also be interested in helping test this. I am running into this issue with the bq M10 tablet and the Logitech k830 keyboard/mouse. I have paired the devices successfully, but the tablet doesn't actually read input from the keyboard or the mouse.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

This is in silos 37 (Bluez) and 60 (settings)
FYI install the phablet-tools-citrain package, use the citrain tool to install each silo.
This will make you device writable but next update should overwrite these.

Revision history for this message
Timo Leppiniemi (timo-leppiniemi) wrote : Re: [Bug 1576986] Re: UT does not discover bluetooth smart (BLE) devices

Hi,

I can confirm that my Belkin slim style keyboard now works with the silos 37 and 60 installed.
It even works after shutdown and restart! :)

I need to do some more comprehensive testing with the keyboard and mouse later today.

Thank you!

> On 07 Aug 2016, at 21:01, Pat McGowan <email address hidden> wrote:
>
> This is in silos 37 (Bluez) and 60 (settings)
> FYI install the phablet-tools-citrain package, use the citrain tool to install each silo.
> This will make you device writable but next update should overwrite these.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1576986
>
> Title:
> UT does not discover bluetooth smart (BLE) devices
>
> Status in Canonical System Image:
> Confirmed
> Status in ubuntu-system-settings package in Ubuntu:
> Confirmed
>
> Bug description:
> I am actually typing this on a Microsoft Universal Foldable Keyboard
> connected to my M10 tablet.
>
> Device: Bq Aquaris M10
> OS: OTA-10.1
>
> Generally bluetooth devices that are not version 4 or bluetooth smart
> (BLE) seem to work and pair fine with the Aquaris E4.5 and the M10.
> However, when it comes to BLE/version 4, things obviously get too
> complicated for the system bluetooth settings because it doesn't even
> manage to discover these devices.
>
> OTA-10.1 uses Bluez version 5.37, which is perfectly capable of
> discovering and pairing with BLE devices, but in Ubuntu Touch it
> requires the use of "bluetoothctl" in the terminal. I will describe
> the steps needed below:
>
> phablet@ubuntu-phablet:-$ bluetoothctl
> [bluetooth]# scan on
>
> wait for device to show up in list, typically:
> [NEW] Device 01:02:FF:A8:BB:00 DeviceName
>
> [bluetooth]# discoverable on
> Changing discoverable on succeeded
> [bluetooth]# agent on
> Agent registered
> [bluetooth]# default-agent
> Default agent request successful
> [bluetooth]# pairable on
> Changing pairable on succeeded
>
> Now tell bluetoothctl to pair the device
> [bluetooth]# pair 01:02:FF:A8:BB:00
> Attempting to pair with 01:02:FF:A8:BB:00
>
> If pairing with MS Universal Foldable Keyboard, you will probably see
> a 6-digit code, punch that code on the keyboard and hit return.
>
> [CHG] Device 01:02:FF:A8:BB:00 Connected: yes
> [agent] Passkey: 123456
>
> You should be good to go.
>
> However, the MS Foldable Keyboard does not show up in system bluetooth
> settings (see attached screenshot) and getting the M10 to recognize
> that the Keyboard is turned off seems to require a reboot (and
> possibly also bluetooth turned off). Otherwise, the onscreen keyboard
> doesn't show up.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/canonical-devices-system-image/+bug/1576986/+subscriptions

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

I can confirm that bluetooth settings can detect and connect to Microsoft's Universal Foldable Keyboard on r158 on my Pro 5. However, the disconnect when turning off the keyboard is not clean as system doesn't display the OSK until after a reboot.

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

Now on r170, I revisited this issue today by connecting the Universal Foldable Keyboard and a Microsoft Designer Mouse. Both were discovered and connected fine with my Bq Aquaris M10, but a new issue with the keyboard was introduced. Characters were registered with a significant latency on the M10 and after a while it got stuck in multiple keypresses, which I had to interrupt with the "Backspace" key. Disconnecting by turning off (folding) the keyboard still didn't work. As before, it disappears from the "Connected Devices" list in system settings, but a reboot it necessary to bring back the OSK.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@tomas I confirmed part of your last comment (no osk) and entered a new bug report at lp:1619001

As for the latency, was the mouse also laggy? Was there much wifi traffic at the time?

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

Hi Pat,
I have the MS foldable keyboard connected again and the lagginess is gone. I didn't notice any lagginess for the mouse and wifi traffic was low when I encountered the issue yesterday. I will subscribe to the bug report that you mention.

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Hey, for you to know the lags that appear when there are BLE keyboard and mouse connected at the same time is a known issue. I'm not sure if we have the LP bug for it however we do have a story in our backlog to work investigate.

Pat, Tomas, I suggest, given the feedback in comment #27, that we close this bug and handle the other issues separately as new bugs.

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

Ok, that explains while there was no lag when I connected the foldable KB today - I am using a different mouse. Closing this bug sounds like a good idea as the BLE devices are now discoverable and connects through the ordinary bluetooth settings. Is there a bug report for the lag issue?

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Tomas, I checked and there is no bug for the lag issue - would you mind reporting one?

Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
Changed in ubuntu-system-settings (Ubuntu):
status: Confirmed → Fix Released
Changed in canonical-devices-system-image:
milestone: backlog → 13
Revision history for this message
Javier Ibáñez (javier-ibanez) wrote :

Hi all,

Any update on this issue?

Best regards.

Revision history for this message
John McAleely (john.mcaleely) wrote :

@javier-ibanez, I'm no longer part of the team looking after Ubuntu, so I've removed the assignment to me. I've subscribed jhodapp, and he or kzapalowicz may be able to help.

I assume you refer to the 'lag issue' in #32 & 33? Creating a new issue will probably get better feedback.

Changed in canonical-devices-system-image:
assignee: John McAleely (john.mcaleely) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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