All of lore.kernel.org
 help / color / mirror / Atom feed
* Setup Synchronous Connection fails when switching Sony WH-H900N headset to HSP
@ 2020-04-06 15:19 James Belchamber
  2020-04-22 18:22 ` James Belchamber
  0 siblings, 1 reply; 6+ messages in thread
From: James Belchamber @ 2020-04-06 15:19 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

When using my Sony WH-H900N headphones and switching from A2DP to
HSP/HFP the following error appears in journalctl:

(  60.063|   0.000) D: [pulseaudio] module-bluez5-device.c: Acquiring
transport /org/bluez/hci0/dev_04_5D_4B_E9_C9_90/fd34
(  60.063|   0.000) I: [pulseaudio] backend-native.c: doing connect
(  60.174|   0.111) E: [pulseaudio] backend-native.c: connect():
Function not implemented

And using btmon I can see the HCI command comes back with a failure
(full log attached):

< HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
        Handle: 67
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 10
        Setting: 0x0060
          Input Coding: Linear
          Input Data Format: 2's complement
          Input Sample Size: 16-bit
          # of bits padding at MSB: 0
          Air Coding Format: CVSD
        Retransmission effort: Optimize for power consumption (0x01)
        Packet type: 0x0380
          3-EV3 may not be used
          2-EV5 may not be used
          3-EV5 may not be used
> HCI Event: Command Status (0x0f) plen 4
      Setup Synchronous Connection (0x01|0x0028) ncmd 1
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3
        Handle: 67
        Max slots: 1
> HCI Event: Synchronous Connect Complete (0x2c) plen 17
        Status: Unspecified Error (0x1f)
        Handle: 67
        Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
        Link type: eSCO (0x02)
        Transmission interval: 0x00
        Retransmission window: 0x00
        RX packet length: 0
        TX packet length: 0
        Air mode: u-law log (0x00)

This works on ChromeOS, which also uses a (modified) BlueZ stack -
though I can't work out why :)

[-- Attachment #2: hci_events.log --]
[-- Type: text/x-log, Size: 9870 bytes --]

< HCI Command: Exit Sniff Mode (0x02|0x0004) plen 2                                                                                    #4027 [hci0] 59.708361
        Handle: 67
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4028 [hci0] 59.710142
      Exit Sniff Mode (0x02|0x0004) ncmd 1
        Status: Success (0x00)
> HCI Event: Mode Change (0x14) plen 6                                                                                                 #4029 [hci0] 59.819129
        Status: Success (0x00)
        Handle: 67
        Mode: Active (0x00)
        Interval: 0.000 msec (0x0000)
< HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17                                                                      #4030 [hci0] 59.819163
        Handle: 67
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 10
        Setting: 0x0060
          Input Coding: Linear
          Input Data Format: 2's complement
          Input Sample Size: 16-bit
          # of bits padding at MSB: 0
          Air Coding Format: CVSD
        Retransmission effort: Optimize for power consumption (0x01)
        Packet type: 0x0380
          3-EV3 may not be used
          2-EV5 may not be used
          3-EV5 may not be used
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4031 [hci0] 59.822126
      Setup Synchronous Connection (0x01|0x0028) ncmd 1
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                                                                            #4032 [hci0] 59.828125
        Handle: 67
        Max slots: 1
> HCI Event: Synchronous Connect Complete (0x2c) plen 17                                                                               #4033 [hci0] 59.842125
        Status: Unspecified Error (0x1f)
        Handle: 67
        Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
        Link type: eSCO (0x02)
        Transmission interval: 0x00
        Retransmission window: 0x00
        RX packet length: 0
        TX packet length: 0
        Air mode: u-law log (0x00)
< HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17                                                                      #4034 [hci0] 59.842142
        Handle: 67
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 7
        Setting: 0x0060
          Input Coding: Linear
          Input Data Format: 2's complement
          Input Sample Size: 16-bit
          # of bits padding at MSB: 0
          Air Coding Format: CVSD
        Retransmission effort: Optimize for power consumption (0x01)
        Packet type: 0x0380
          3-EV3 may not be used
          2-EV5 may not be used
          3-EV5 may not be used
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4035 [hci0] 59.843141
      Setup Synchronous Connection (0x01|0x0028) ncmd 0
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                                                                            #4036 [hci0] 59.847143
        Handle: 67
        Max slots: 5
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4037 [hci0] 59.849125
      NOP (0x00|0x0000) ncmd 1
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                                                                            #4038 [hci0] 59.858142
        Handle: 67
        Max slots: 1
> HCI Event: Synchronous Connect Complete (0x2c) plen 17                                                                               #4039 [hci0] 59.884125
        Status: Unspecified Error (0x1f)
        Handle: 67
        Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
        Link type: eSCO (0x02)
        Transmission interval: 0x00
        Retransmission window: 0x00
        RX packet length: 0
        TX packet length: 0
        Air mode: u-law log (0x00)
< HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17                                                                      #4040 [hci0] 59.884146
        Handle: 67
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 7
        Setting: 0x0060
          Input Coding: Linear
          Input Data Format: 2's complement
          Input Sample Size: 16-bit
          # of bits padding at MSB: 0
          Air Coding Format: CVSD
        Retransmission effort: Optimize for power consumption (0x01)
        Packet type: 0x03c8
          EV3 may be used
          2-EV3 may not be used
          3-EV3 may not be used
          2-EV5 may not be used
          3-EV5 may not be used
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4041 [hci0] 59.885142
      Setup Synchronous Connection (0x01|0x0028) ncmd 0
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                                                                            #4042 [hci0] 59.892121
        Handle: 67
        Max slots: 5
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4043 [hci0] 59.893140
      NOP (0x00|0x0000) ncmd 1
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                                                                            #4044 [hci0] 59.903123
        Handle: 67
        Max slots: 1
> HCI Event: Synchronous Connect Complete (0x2c) plen 17                                                                               #4045 [hci0] 59.918121
        Status: Unspecified Error (0x1f)
        Handle: 67
        Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
        Link type: eSCO (0x02)
        Transmission interval: 0x00
        Retransmission window: 0x00
        RX packet length: 0
        TX packet length: 0
        Air mode: u-law log (0x00)
< HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17                                                                      #4046 [hci0] 59.918134
        Handle: 67
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 65535
        Setting: 0x0060
          Input Coding: Linear
          Input Data Format: 2's complement
          Input Sample Size: 16-bit
          # of bits padding at MSB: 0
          Air Coding Format: CVSD
        Retransmission effort: Optimize for power consumption (0x01)
        Packet type: 0x03c4
          HV3 may be used
          2-EV3 may not be used
          3-EV3 may not be used
          2-EV5 may not be used
          3-EV5 may not be used
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4047 [hci0] 59.919142
      Setup Synchronous Connection (0x01|0x0028) ncmd 0
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                                                                            #4048 [hci0] 59.927128
        Handle: 67
        Max slots: 5
> HCI Event: Synchronous Connect Complete (0x2c) plen 17                                                                               #4049 [hci0] 59.929128
        Status: Unspecified Error (0x1f)
        Handle: 67
        Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
        Link type: eSCO (0x02)
        Transmission interval: 0x00
        Retransmission window: 0x00
        RX packet length: 0
        TX packet length: 0
        Air mode: u-law log (0x00)
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4050 [hci0] 59.930129
      NOP (0x00|0x0000) ncmd 1
        Status: Success (0x00)
< HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17                                                                      #4051 [hci0] 59.930153
        Handle: 67
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 65535
        Setting: 0x0060
          Input Coding: Linear
          Input Data Format: 2's complement
          Input Sample Size: 16-bit
          # of bits padding at MSB: 0
          Air Coding Format: CVSD
        Retransmission effort: Optimize for power consumption (0x01)
        Packet type: 0x03c1
          HV1 may be used
          2-EV3 may not be used
          3-EV3 may not be used
          2-EV5 may not be used
          3-EV5 may not be used
> HCI Event: Command Status (0x0f) plen 4                                                                                              #4052 [hci0] 59.932128
      Setup Synchronous Connection (0x01|0x0028) ncmd 1
        Status: Success (0x00)
> HCI Event: Synchronous Connect Complete (0x2c) plen 17                                                                               #4053 [hci0] 59.934132
        Status: Unspecified Error (0x1f)
        Handle: 67
        Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
        Link type: eSCO (0x02)
        Transmission interval: 0x00
        Retransmission window: 0x00
        RX packet length: 0
        TX packet length: 0
        Air mode: u-law log (0x00)
> HCI Event: Mode Change (0x14) plen 6                                                                                                 #4054 [hci0] 64.830233
        Status: Success (0x00)
        Handle: 67
        Mode: Sniff (0x02)
        Interval: 125.000 msec (0x00c8)


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

* Re: Setup Synchronous Connection fails when switching Sony WH-H900N headset to HSP
  2020-04-06 15:19 Setup Synchronous Connection fails when switching Sony WH-H900N headset to HSP James Belchamber
@ 2020-04-22 18:22 ` James Belchamber
  2020-04-22 22:32   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 6+ messages in thread
From: James Belchamber @ 2020-04-22 18:22 UTC (permalink / raw)
  To: marcel, johan.hedberg; +Cc: linux-bluetooth

Just bumping this for visibility, still an issue with the latest kernel.

Happy to test anything thrown my way.

On Mon, 6 Apr 2020 at 16:19, James Belchamber <james@belchamber.com> wrote:
>
> When using my Sony WH-H900N headphones and switching from A2DP to
> HSP/HFP the following error appears in journalctl:
>
> (  60.063|   0.000) D: [pulseaudio] module-bluez5-device.c: Acquiring
> transport /org/bluez/hci0/dev_04_5D_4B_E9_C9_90/fd34
> (  60.063|   0.000) I: [pulseaudio] backend-native.c: doing connect
> (  60.174|   0.111) E: [pulseaudio] backend-native.c: connect():
> Function not implemented
>
> And using btmon I can see the HCI command comes back with a failure
> (full log attached):
>
> < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
>         Handle: 67
>         Transmit bandwidth: 8000
>         Receive bandwidth: 8000
>         Max latency: 10
>         Setting: 0x0060
>           Input Coding: Linear
>           Input Data Format: 2's complement
>           Input Sample Size: 16-bit
>           # of bits padding at MSB: 0
>           Air Coding Format: CVSD
>         Retransmission effort: Optimize for power consumption (0x01)
>         Packet type: 0x0380
>           3-EV3 may not be used
>           2-EV5 may not be used
>           3-EV5 may not be used
> > HCI Event: Command Status (0x0f) plen 4
>       Setup Synchronous Connection (0x01|0x0028) ncmd 1
>         Status: Success (0x00)
> > HCI Event: Max Slots Change (0x1b) plen 3
>         Handle: 67
>         Max slots: 1
> > HCI Event: Synchronous Connect Complete (0x2c) plen 17
>         Status: Unspecified Error (0x1f)
>         Handle: 67
>         Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
>         Link type: eSCO (0x02)
>         Transmission interval: 0x00
>         Retransmission window: 0x00
>         RX packet length: 0
>         TX packet length: 0
>         Air mode: u-law log (0x00)
>
> This works on ChromeOS, which also uses a (modified) BlueZ stack -
> though I can't work out why :)

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

* Re: Setup Synchronous Connection fails when switching Sony WH-H900N headset to HSP
  2020-04-22 18:22 ` James Belchamber
@ 2020-04-22 22:32   ` Luiz Augusto von Dentz
  2020-04-23 11:06     ` James Belchamber
       [not found]     ` <01020171a6b79a42-76ec69a9-7293-441a-911e-e48f8baf418b-000000@eu-west-1.amazonses.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2020-04-22 22:32 UTC (permalink / raw)
  To: James Belchamber; +Cc: Marcel Holtmann, Johan Hedberg, linux-bluetooth

Hi James,

On Wed, Apr 22, 2020 at 11:27 AM James Belchamber <james@belchamber.com> wrote:
>
> Just bumping this for visibility, still an issue with the latest kernel.
>
> Happy to test anything thrown my way.
>
> On Mon, 6 Apr 2020 at 16:19, James Belchamber <james@belchamber.com> wrote:
> >
> > When using my Sony WH-H900N headphones and switching from A2DP to
> > HSP/HFP the following error appears in journalctl:
> >
> > (  60.063|   0.000) D: [pulseaudio] module-bluez5-device.c: Acquiring
> > transport /org/bluez/hci0/dev_04_5D_4B_E9_C9_90/fd34
> > (  60.063|   0.000) I: [pulseaudio] backend-native.c: doing connect
> > (  60.174|   0.111) E: [pulseaudio] backend-native.c: connect():
> > Function not implemented
> >
> > And using btmon I can see the HCI command comes back with a failure
> > (full log attached):
> >
> > < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
> >         Handle: 67
> >         Transmit bandwidth: 8000
> >         Receive bandwidth: 8000
> >         Max latency: 10
> >         Setting: 0x0060
> >           Input Coding: Linear
> >           Input Data Format: 2's complement
> >           Input Sample Size: 16-bit
> >           # of bits padding at MSB: 0
> >           Air Coding Format: CVSD
> >         Retransmission effort: Optimize for power consumption (0x01)
> >         Packet type: 0x0380
> >           3-EV3 may not be used
> >           2-EV5 may not be used
> >           3-EV5 may not be used
> > > HCI Event: Command Status (0x0f) plen 4
> >       Setup Synchronous Connection (0x01|0x0028) ncmd 1
> >         Status: Success (0x00)
> > > HCI Event: Max Slots Change (0x1b) plen 3
> >         Handle: 67
> >         Max slots: 1
> > > HCI Event: Synchronous Connect Complete (0x2c) plen 17
> >         Status: Unspecified Error (0x1f)
> >         Handle: 67
> >         Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
> >         Link type: eSCO (0x02)
> >         Transmission interval: 0x00
> >         Retransmission window: 0x00
> >         RX packet length: 0
> >         TX packet length: 0
> >         Air mode: u-law log (0x00)
> >
> > This works on ChromeOS, which also uses a (modified) BlueZ stack -
> > though I can't work out why :)

It doesn't look like it is a host problem and Ive never seem this
error before, have you tried with the same controller on Chrome OS? It
may be worth trying to capture the logs in Chrome OS so we can compare
if there is something different in the command parameters, but it
could as well be that Chrome uses HFP instead of HSP as PulseAudio
does and the headset is sensitive to that.

-- 
Luiz Augusto von Dentz

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

* Re: Setup Synchronous Connection fails when switching Sony WH-H900N headset to HSP
  2020-04-22 22:32   ` Luiz Augusto von Dentz
@ 2020-04-23 11:06     ` James Belchamber
       [not found]     ` <01020171a6b79a42-76ec69a9-7293-441a-911e-e48f8baf418b-000000@eu-west-1.amazonses.com>
  1 sibling, 0 replies; 6+ messages in thread
From: James Belchamber @ 2020-04-23 11:06 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Marcel Holtmann, Johan Hedberg, linux-bluetooth

Only difference in the btmon output is the handle (256 instead of 67)
- otherwise it all looks the same and it connects first time.

What logs are useful? I have the Chromebook in developer mode and so I
can capture whatever you want (hopefully!)

On Wed, 22 Apr 2020 at 23:32, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi James,
>
> On Wed, Apr 22, 2020 at 11:27 AM James Belchamber <james@belchamber.com> wrote:
> >
> > Just bumping this for visibility, still an issue with the latest kernel.
> >
> > Happy to test anything thrown my way.
> >
> > On Mon, 6 Apr 2020 at 16:19, James Belchamber <james@belchamber.com> wrote:
> > >
> > > When using my Sony WH-H900N headphones and switching from A2DP to
> > > HSP/HFP the following error appears in journalctl:
> > >
> > > (  60.063|   0.000) D: [pulseaudio] module-bluez5-device.c: Acquiring
> > > transport /org/bluez/hci0/dev_04_5D_4B_E9_C9_90/fd34
> > > (  60.063|   0.000) I: [pulseaudio] backend-native.c: doing connect
> > > (  60.174|   0.111) E: [pulseaudio] backend-native.c: connect():
> > > Function not implemented
> > >
> > > And using btmon I can see the HCI command comes back with a failure
> > > (full log attached):
> > >
> > > < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
> > >         Handle: 67
> > >         Transmit bandwidth: 8000
> > >         Receive bandwidth: 8000
> > >         Max latency: 10
> > >         Setting: 0x0060
> > >           Input Coding: Linear
> > >           Input Data Format: 2's complement
> > >           Input Sample Size: 16-bit
> > >           # of bits padding at MSB: 0
> > >           Air Coding Format: CVSD
> > >         Retransmission effort: Optimize for power consumption (0x01)
> > >         Packet type: 0x0380
> > >           3-EV3 may not be used
> > >           2-EV5 may not be used
> > >           3-EV5 may not be used
> > > > HCI Event: Command Status (0x0f) plen 4
> > >       Setup Synchronous Connection (0x01|0x0028) ncmd 1
> > >         Status: Success (0x00)
> > > > HCI Event: Max Slots Change (0x1b) plen 3
> > >         Handle: 67
> > >         Max slots: 1
> > > > HCI Event: Synchronous Connect Complete (0x2c) plen 17
> > >         Status: Unspecified Error (0x1f)
> > >         Handle: 67
> > >         Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
> > >         Link type: eSCO (0x02)
> > >         Transmission interval: 0x00
> > >         Retransmission window: 0x00
> > >         RX packet length: 0
> > >         TX packet length: 0
> > >         Air mode: u-law log (0x00)
> > >
> > > This works on ChromeOS, which also uses a (modified) BlueZ stack -
> > > though I can't work out why :)
>
> It doesn't look like it is a host problem and Ive never seem this
> error before, have you tried with the same controller on Chrome OS? It
> may be worth trying to capture the logs in Chrome OS so we can compare
> if there is something different in the command parameters, but it
> could as well be that Chrome uses HFP instead of HSP as PulseAudio
> does and the headset is sensitive to that.
>
> --
> Luiz Augusto von Dentz

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

* Re: Setup Synchronous Connection fails when switching Sony WH-H900N headset to HSP
       [not found]     ` <01020171a6b79a42-76ec69a9-7293-441a-911e-e48f8baf418b-000000@eu-west-1.amazonses.com>
@ 2020-04-23 16:43       ` Luiz Augusto von Dentz
  2020-04-23 20:18         ` James Belchamber
  0 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2020-04-23 16:43 UTC (permalink / raw)
  To: James Belchamber; +Cc: Marcel Holtmann, Johan Hedberg, linux-bluetooth

Hi James,

On Thu, Apr 23, 2020 at 4:06 AM James Belchamber <james@belchamber.com> wrote:
>
> Only difference in the btmon output is the handle (256 instead of 67)
> - otherwise it all looks the same and it connects first time.
>
> What logs are useful? I have the Chromebook in developer mode and so I
> can capture whatever you want (hopefully!)

Then I think this is because PulseAudio is using HSP not HFP, the
headset might be expecting a call to exist, or something similar on
HSP, in order to accept the SCO connection so the state machine is not
ready, have a look if Chrome OS is sending any AT command before
trying to connect SCO, or just past the btmon logs in some
pastebing/gist.github.com so we can analyze what is going on.

> On Wed, 22 Apr 2020 at 23:32, Luiz Augusto von Dentz
> <luiz.dentz@gmail.com> wrote:
> >
> > Hi James,
> >
> > On Wed, Apr 22, 2020 at 11:27 AM James Belchamber <james@belchamber.com> wrote:
> > >
> > > Just bumping this for visibility, still an issue with the latest kernel.
> > >
> > > Happy to test anything thrown my way.
> > >
> > > On Mon, 6 Apr 2020 at 16:19, James Belchamber <james@belchamber.com> wrote:
> > > >
> > > > When using my Sony WH-H900N headphones and switching from A2DP to
> > > > HSP/HFP the following error appears in journalctl:
> > > >
> > > > (  60.063|   0.000) D: [pulseaudio] module-bluez5-device.c: Acquiring
> > > > transport /org/bluez/hci0/dev_04_5D_4B_E9_C9_90/fd34
> > > > (  60.063|   0.000) I: [pulseaudio] backend-native.c: doing connect
> > > > (  60.174|   0.111) E: [pulseaudio] backend-native.c: connect():
> > > > Function not implemented
> > > >
> > > > And using btmon I can see the HCI command comes back with a failure
> > > > (full log attached):
> > > >
> > > > < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
> > > >         Handle: 67
> > > >         Transmit bandwidth: 8000
> > > >         Receive bandwidth: 8000
> > > >         Max latency: 10
> > > >         Setting: 0x0060
> > > >           Input Coding: Linear
> > > >           Input Data Format: 2's complement
> > > >           Input Sample Size: 16-bit
> > > >           # of bits padding at MSB: 0
> > > >           Air Coding Format: CVSD
> > > >         Retransmission effort: Optimize for power consumption (0x01)
> > > >         Packet type: 0x0380
> > > >           3-EV3 may not be used
> > > >           2-EV5 may not be used
> > > >           3-EV5 may not be used
> > > > > HCI Event: Command Status (0x0f) plen 4
> > > >       Setup Synchronous Connection (0x01|0x0028) ncmd 1
> > > >         Status: Success (0x00)
> > > > > HCI Event: Max Slots Change (0x1b) plen 3
> > > >         Handle: 67
> > > >         Max slots: 1
> > > > > HCI Event: Synchronous Connect Complete (0x2c) plen 17
> > > >         Status: Unspecified Error (0x1f)
> > > >         Handle: 67
> > > >         Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
> > > >         Link type: eSCO (0x02)
> > > >         Transmission interval: 0x00
> > > >         Retransmission window: 0x00
> > > >         RX packet length: 0
> > > >         TX packet length: 0
> > > >         Air mode: u-law log (0x00)
> > > >
> > > > This works on ChromeOS, which also uses a (modified) BlueZ stack -
> > > > though I can't work out why :)
> >
> > It doesn't look like it is a host problem and Ive never seem this
> > error before, have you tried with the same controller on Chrome OS? It
> > may be worth trying to capture the logs in Chrome OS so we can compare
> > if there is something different in the command parameters, but it
> > could as well be that Chrome uses HFP instead of HSP as PulseAudio
> > does and the headset is sensitive to that.
> >
> > --
> > Luiz Augusto von Dentz



-- 
Luiz Augusto von Dentz

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

* Re: Setup Synchronous Connection fails when switching Sony WH-H900N headset to HSP
  2020-04-23 16:43       ` Luiz Augusto von Dentz
@ 2020-04-23 20:18         ` James Belchamber
  0 siblings, 0 replies; 6+ messages in thread
From: James Belchamber @ 2020-04-23 20:18 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Marcel Holtmann, Johan Hedberg, linux-bluetooth

I got btmon piped to a file on ChromeOS, turned on my headphones,
opened an app that required a mic, closed the app, then disconnected
again.

Paste is here: https://paste.c-net.org/BaldwinMarital

I can't see any AT commands but btmon spits out far too much for me to
be able to parse it without knowing what I'm looking for.

On Thu, 23 Apr 2020 at 17:43, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi James,
>
> On Thu, Apr 23, 2020 at 4:06 AM James Belchamber <james@belchamber.com> wrote:
> >
> > Only difference in the btmon output is the handle (256 instead of 67)
> > - otherwise it all looks the same and it connects first time.
> >
> > What logs are useful? I have the Chromebook in developer mode and so I
> > can capture whatever you want (hopefully!)
>
> Then I think this is because PulseAudio is using HSP not HFP, the
> headset might be expecting a call to exist, or something similar on
> HSP, in order to accept the SCO connection so the state machine is not
> ready, have a look if Chrome OS is sending any AT command before
> trying to connect SCO, or just past the btmon logs in some
> pastebing/gist.github.com so we can analyze what is going on.
>
> > On Wed, 22 Apr 2020 at 23:32, Luiz Augusto von Dentz
> > <luiz.dentz@gmail.com> wrote:
> > >
> > > Hi James,
> > >
> > > On Wed, Apr 22, 2020 at 11:27 AM James Belchamber <james@belchamber.com> wrote:
> > > >
> > > > Just bumping this for visibility, still an issue with the latest kernel.
> > > >
> > > > Happy to test anything thrown my way.
> > > >
> > > > On Mon, 6 Apr 2020 at 16:19, James Belchamber <james@belchamber.com> wrote:
> > > > >
> > > > > When using my Sony WH-H900N headphones and switching from A2DP to
> > > > > HSP/HFP the following error appears in journalctl:
> > > > >
> > > > > (  60.063|   0.000) D: [pulseaudio] module-bluez5-device.c: Acquiring
> > > > > transport /org/bluez/hci0/dev_04_5D_4B_E9_C9_90/fd34
> > > > > (  60.063|   0.000) I: [pulseaudio] backend-native.c: doing connect
> > > > > (  60.174|   0.111) E: [pulseaudio] backend-native.c: connect():
> > > > > Function not implemented
> > > > >
> > > > > And using btmon I can see the HCI command comes back with a failure
> > > > > (full log attached):
> > > > >
> > > > > < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
> > > > >         Handle: 67
> > > > >         Transmit bandwidth: 8000
> > > > >         Receive bandwidth: 8000
> > > > >         Max latency: 10
> > > > >         Setting: 0x0060
> > > > >           Input Coding: Linear
> > > > >           Input Data Format: 2's complement
> > > > >           Input Sample Size: 16-bit
> > > > >           # of bits padding at MSB: 0
> > > > >           Air Coding Format: CVSD
> > > > >         Retransmission effort: Optimize for power consumption (0x01)
> > > > >         Packet type: 0x0380
> > > > >           3-EV3 may not be used
> > > > >           2-EV5 may not be used
> > > > >           3-EV5 may not be used
> > > > > > HCI Event: Command Status (0x0f) plen 4
> > > > >       Setup Synchronous Connection (0x01|0x0028) ncmd 1
> > > > >         Status: Success (0x00)
> > > > > > HCI Event: Max Slots Change (0x1b) plen 3
> > > > >         Handle: 67
> > > > >         Max slots: 1
> > > > > > HCI Event: Synchronous Connect Complete (0x2c) plen 17
> > > > >         Status: Unspecified Error (0x1f)
> > > > >         Handle: 67
> > > > >         Address: 04:5D:4B:E9:C9:90 (Sony Corporation)
> > > > >         Link type: eSCO (0x02)
> > > > >         Transmission interval: 0x00
> > > > >         Retransmission window: 0x00
> > > > >         RX packet length: 0
> > > > >         TX packet length: 0
> > > > >         Air mode: u-law log (0x00)
> > > > >
> > > > > This works on ChromeOS, which also uses a (modified) BlueZ stack -
> > > > > though I can't work out why :)
> > >
> > > It doesn't look like it is a host problem and Ive never seem this
> > > error before, have you tried with the same controller on Chrome OS? It
> > > may be worth trying to capture the logs in Chrome OS so we can compare
> > > if there is something different in the command parameters, but it
> > > could as well be that Chrome uses HFP instead of HSP as PulseAudio
> > > does and the headset is sensitive to that.
> > >
> > > --
> > > Luiz Augusto von Dentz
>
>
>
> --
> Luiz Augusto von Dentz

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

end of thread, other threads:[~2020-04-23 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 15:19 Setup Synchronous Connection fails when switching Sony WH-H900N headset to HSP James Belchamber
2020-04-22 18:22 ` James Belchamber
2020-04-22 22:32   ` Luiz Augusto von Dentz
2020-04-23 11:06     ` James Belchamber
     [not found]     ` <01020171a6b79a42-76ec69a9-7293-441a-911e-e48f8baf418b-000000@eu-west-1.amazonses.com>
2020-04-23 16:43       ` Luiz Augusto von Dentz
2020-04-23 20:18         ` James Belchamber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.