Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
* Pairing request ends in timeout
@ 2019-08-01 14:10 Axelle
  2019-08-05 14:56 ` Axelle
  0 siblings, 1 reply; 3+ messages in thread
From: Axelle @ 2019-08-01 14:10 UTC (permalink / raw)
  To: linux-bluetooth

Hello list,

I (again) face problems pairing with a BLE device.

Using bluetoothctl (v5.50), I connected to the device (connect).  Then
I try to pair but it fails (org.bluez.Error.AuthenticationCanceled).
The hcidump show a connection timeout.

NB:
- I have a registered agent (although I do not think it is useful in my case)
- I am using Linux Mint 19.1. The same error occurs on a Raspberry Pi
3 with Raspbian.
- I have some bluez distrib packages v5.48 installed. Can this be an issue?
- I got this to work a while ago with the help of someone of bluez on
IRC, doing power off/power on, but this is not working this time...

Thanks

-- Axelle

What bluetoothctl says:

[D2A74C76F3E0]# pair D2:A7:4C:76:F3:E0
Attempting to pair with D2:A7:4C:76:F3:E0
[CHG] Device D2:A7:4C:76:F3:E0 ServicesResolved: no
[CHG] Device D2:A7:4C:76:F3:E0 Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled

The corresponding hcidump shows that the connection times out:

< ACL data: handle 71 flags 0x00 dlen 11
    SMP: Pairing Request (0x01)
      capability 0x04 oob 0x00 auth req 0x2d
      max key size 0x10 init key dist 0x0d resp key dist 0x0f
      Capability: KeyboardDisplay (OOB data not present)
      Authentication: Bonding (MITM Protection)
      Initiator Key Distribution:  LTK  CSRK
      Responder Key Distribution:  LTK IRK CSRK
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 71 reason 0x08
    Reason: Connection Timeout

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pairing request ends in timeout
  2019-08-01 14:10 Pairing request ends in timeout Axelle
@ 2019-08-05 14:56 ` Axelle
  2019-08-06  9:26   ` Axelle
  0 siblings, 1 reply; 3+ messages in thread
From: Axelle @ 2019-08-05 14:56 UTC (permalink / raw)
  To: linux-bluetooth

I managed to pair, by a mix of factory reset + ensuring that other
devices previously paired were unpaired.

Now, I can pair. However I continue to experience disconnections. Typically,

- I connect, I pair
- I send a Write Request
- I receive a Write Response which looks
- Immediately after I also receive a Disconnect Complete with reason
"Remote User Terminated Connection". This is not meant to happen.

Can I do something about this?

This behaviour is exactly the same on two different hosts: Linux Mint,
and a Rpi 3. Using Bluez 5.50.

< ACL Data TX: Hand.. flags 0x00 dlen 15  #47 [hci0] 2019-08-05 16:37:27.290456
      ATT: Write Request (0x12) len 10
        Handle: 0x0014
          Data: xxxxxxxxxxxxxxxx
> HCI Event: Number of C.. (0x13) plen 5  #48 [hci0] 2019-08-05 16:37:27.295258
        Num handles: 1
        Handle: 70
        Count: 1
> ACL Data RX: Handl.. flags 0x02 dlen 5  #49 [hci0] 2019-08-05 16:37:27.324637
      ATT: Write Response (0x13) len 0
> HCI Event: Disconnect... (0x05) plen 4  #50 [hci0] 2019-08-05 16:37:27.341258
        Status: Success (0x00)
        Handle: 70

        Reason: Remote User Terminated Connection (0x13)

Thanks

-- Axelle

On Thu, Aug 1, 2019 at 4:10 PM Axelle <aafortinet@gmail.com> wrote:
>
> Hello list,
>
> I (again) face problems pairing with a BLE device.
>
> Using bluetoothctl (v5.50), I connected to the device (connect).  Then
> I try to pair but it fails (org.bluez.Error.AuthenticationCanceled).
> The hcidump show a connection timeout.
>
> NB:
> - I have a registered agent (although I do not think it is useful in my case)
> - I am using Linux Mint 19.1. The same error occurs on a Raspberry Pi
> 3 with Raspbian.
> - I have some bluez distrib packages v5.48 installed. Can this be an issue?
> - I got this to work a while ago with the help of someone of bluez on
> IRC, doing power off/power on, but this is not working this time...
>
> Thanks
>
> -- Axelle
>
> What bluetoothctl says:
>
> [D2A74C76F3E0]# pair D2:A7:4C:76:F3:E0
> Attempting to pair with D2:A7:4C:76:F3:E0
> [CHG] Device D2:A7:4C:76:F3:E0 ServicesResolved: no
> [CHG] Device D2:A7:4C:76:F3:E0 Connected: no
> Failed to pair: org.bluez.Error.AuthenticationCanceled
>
> The corresponding hcidump shows that the connection times out:
>
> < ACL data: handle 71 flags 0x00 dlen 11
>     SMP: Pairing Request (0x01)
>       capability 0x04 oob 0x00 auth req 0x2d
>       max key size 0x10 init key dist 0x0d resp key dist 0x0f
>       Capability: KeyboardDisplay (OOB data not present)
>       Authentication: Bonding (MITM Protection)
>       Initiator Key Distribution:  LTK  CSRK
>       Responder Key Distribution:  LTK IRK CSRK
> > HCI Event: Number of Completed Packets (0x13) plen 5
>     handle 71 packets 1
> > HCI Event: Disconn Complete (0x05) plen 4
>     status 0x00 handle 71 reason 0x08
>     Reason: Connection Timeout

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pairing request ends in timeout
  2019-08-05 14:56 ` Axelle
@ 2019-08-06  9:26   ` Axelle
  0 siblings, 0 replies; 3+ messages in thread
From: Axelle @ 2019-08-06  9:26 UTC (permalink / raw)
  To: linux-bluetooth

Solved this issue. The remote device apparently disconnects depending
on what is in the write request before.
Don't bother any longer.

On Mon, Aug 5, 2019 at 4:56 PM Axelle <aafortinet@gmail.com> wrote:
>
> I managed to pair, by a mix of factory reset + ensuring that other
> devices previously paired were unpaired.
>
> Now, I can pair. However I continue to experience disconnections. Typically,
>
> - I connect, I pair
> - I send a Write Request
> - I receive a Write Response which looks
> - Immediately after I also receive a Disconnect Complete with reason
> "Remote User Terminated Connection". This is not meant to happen.
>
> Can I do something about this?
>
> This behaviour is exactly the same on two different hosts: Linux Mint,
> and a Rpi 3. Using Bluez 5.50.
>
> < ACL Data TX: Hand.. flags 0x00 dlen 15  #47 [hci0] 2019-08-05 16:37:27.290456
>       ATT: Write Request (0x12) len 10
>         Handle: 0x0014
>           Data: xxxxxxxxxxxxxxxx
> > HCI Event: Number of C.. (0x13) plen 5  #48 [hci0] 2019-08-05 16:37:27.295258
>         Num handles: 1
>         Handle: 70
>         Count: 1
> > ACL Data RX: Handl.. flags 0x02 dlen 5  #49 [hci0] 2019-08-05 16:37:27.324637
>       ATT: Write Response (0x13) len 0
> > HCI Event: Disconnect... (0x05) plen 4  #50 [hci0] 2019-08-05 16:37:27.341258
>         Status: Success (0x00)
>         Handle: 70
>
>         Reason: Remote User Terminated Connection (0x13)
>
> Thanks
>
> -- Axelle
>
> On Thu, Aug 1, 2019 at 4:10 PM Axelle <aafortinet@gmail.com> wrote:
> >
> > Hello list,
> >
> > I (again) face problems pairing with a BLE device.
> >
> > Using bluetoothctl (v5.50), I connected to the device (connect).  Then
> > I try to pair but it fails (org.bluez.Error.AuthenticationCanceled).
> > The hcidump show a connection timeout.
> >
> > NB:
> > - I have a registered agent (although I do not think it is useful in my case)
> > - I am using Linux Mint 19.1. The same error occurs on a Raspberry Pi
> > 3 with Raspbian.
> > - I have some bluez distrib packages v5.48 installed. Can this be an issue?
> > - I got this to work a while ago with the help of someone of bluez on
> > IRC, doing power off/power on, but this is not working this time...
> >
> > Thanks
> >
> > -- Axelle
> >
> > What bluetoothctl says:
> >
> > [D2A74C76F3E0]# pair D2:A7:4C:76:F3:E0
> > Attempting to pair with D2:A7:4C:76:F3:E0
> > [CHG] Device D2:A7:4C:76:F3:E0 ServicesResolved: no
> > [CHG] Device D2:A7:4C:76:F3:E0 Connected: no
> > Failed to pair: org.bluez.Error.AuthenticationCanceled
> >
> > The corresponding hcidump shows that the connection times out:
> >
> > < ACL data: handle 71 flags 0x00 dlen 11
> >     SMP: Pairing Request (0x01)
> >       capability 0x04 oob 0x00 auth req 0x2d
> >       max key size 0x10 init key dist 0x0d resp key dist 0x0f
> >       Capability: KeyboardDisplay (OOB data not present)
> >       Authentication: Bonding (MITM Protection)
> >       Initiator Key Distribution:  LTK  CSRK
> >       Responder Key Distribution:  LTK IRK CSRK
> > > HCI Event: Number of Completed Packets (0x13) plen 5
> >     handle 71 packets 1
> > > HCI Event: Disconn Complete (0x05) plen 4
> >     status 0x00 handle 71 reason 0x08
> >     Reason: Connection Timeout

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-01 14:10 Pairing request ends in timeout Axelle
2019-08-05 14:56 ` Axelle
2019-08-06  9:26   ` Axelle

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox