10 Replies Latest reply on Jul 26, 2017 9:43 AM by pyrennean

    Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260

    pyrennean

      Hello

       

      Board: intel NUC (NUC6i7KYK)

      Network Chipset: Intel Wireless 8260 (8086:24F3)

      OS: custom linux distro based on linux Kernel 4.8.8

      Bluez-5.45

      Pulseaudio-10.0

       

      Whenever a bluetooth SCO connection is made on the NUC I can send SCO packets but not receive them

      L2CAP packets and a2dp work.

       

      When I use a DELL laptop XPS13 with Qualcomm Atheros Killer QCA 6174 as soon as a bluetooth, with exactly the same software (home compiled), I receive SCO packets:

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #819 [hci0] 16.686260

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #820 [hci0] 16.696251

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #821 [hci0] 16.696258

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #822 [hci0] 16.696259

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #823 [hci0] 16.706253

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #824 [hci0] 16.706259

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #825 [hci0] 16.706260

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #826 [hci0] 16.706261

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #827 [hci0] 16.716256

          > SCO Data RX: Handle 9 flags 0x00 dlen 48                #828 [hci0] 16.716262

       

      So this is hardware related:

      probably an SCO audio routing issue, as encountered for other chipsets: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/

       

      I have posted on stackoverflow: c - Linux Bluez: unable to receive SCO data packets - Stack Overflow

       

      Thank you in advance for your help

       

      Vincent

        • 1. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Thank you very much for joining the Intel® NUC communities.

           

          We will do further research on this matter, as soon as I get any updates, I will post all the details on this thread.

           

          Is the latest BIOS version 0049 currently installed on the NUC?

          https://downloadcenter.intel.com/download/26935/NUCs-BIOS-Update-KYSKLi70-86A-?product=89187

           

          Any further questions, please let me know.

           

          Regards,
          Alberto R

          • 2. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            I just received some updates on the research we are doing on this matter, and we just wanted to check if you have the option to test the NUC with a standard Linux Distribution to confirm if it shows the same behavior?
             
            Also, if you have further information about this subject, please feel free to post all details needed for us to try to replicate this scenario.
             
            Any questions, please let me know.
             
            Regards,
            Alberto R
             

            • 3. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
              pyrennean

              Hi Alberto

               

              I can provide details on behavior on two separates boards, running the same software. It's not going to be easy for me to use a regular distro, though.

               

              Here are the steps to reproduce the problem, in detail:

               

               

               

               

              In a nutshell: we're trying to get audio in sco packets from a headset device.

               

              -Kernel 4.8.8

              -Bluez-5.45

              -Pulseaudio-10.0

               

               

              Headset device 1C:48:F9:CB:FA:AD with profiles as below (I tested with a total of 3 headset devices):

               

               

              bluetoothctl-->

               

               

              [bluetooth]# info 1C:48:F9:CB:FA:AD

              Device 1C:48:F9:CB:FA:AD

                Name: Jabra ROX Wireless v2.9.0

                Alias: Jabra ROX Wireless v2.9.0

                Class: 0x240404

                Icon: audio-card

                Paired: yes

                Trusted: yes

                Blocked: no

                Connected: no

                LegacyPairing: no

                UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)

                UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)

                UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)

                UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

                UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)

               

               

               

               

              In bluetoothctl, before you launch pulseaudio, the controller should look like this:

               

               

               

              [bluetooth]# show

              Controller 9C:B6:D0:17:2C:90

                Name: BlueZ 5.45

                Alias: BlueZ 5.45

                Class: 0x00010c

                Powered: yes

                Discoverable: no

                Pairable: yes

                UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

                UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

                UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                Modalias: usb:v1D6Bp0246d052D

                Discovering: no

               

              Then you launch the pulseaudio daemon, the way you want (I kind of like pulseaudio -vvvv and let it running in a tty so I see what it does)

               

               

              pulseaudio -vvvv

               

               

              Now the controller has new profiles: as you can see in the output of:

               

               

              [bluetooth]# show

              Controller 9C:B6:D0:17:2C:90

                Name: BlueZ 5.45

                Alias: BlueZ 5.45

                Class: 0x0c010c

                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 Sink                (0000110b-0000-1000-8000-00805f9b34fb)

                UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)

                Modalias: usb:v1D6Bp0246d052D

                Discovering: no

               

               

              Ok, so now it's time to connect the headset device. You either do that manually or let the device sniff the host services in xml and

              decide to connect. Kind of depend on the headset you use, but whatever way you get it connected and it appears in bluez:

               

               

              bluetoothctl-->

               

               

                [CHG] Device 1C:48:F9:CB:FA:AD Connected: yes

                [Jabra ROX Wireless v2.9.0]#

               

               

               

               

              Now it's time to set pulseaudio so that the source is the bluetooth mic: I do it using the pacmd command line tool:

               

               

              # pacmd

              Welcome to PulseAudio 10.0! Use "help" for usage information.

              >>> list-cards

               

               

              1 card(s) available.

                  index: 0

                name: <bluez_card.1C_48_F9_CB_FA_AD>

                driver: <module-bluez5-device.c>

                owner module: 22

                properties:

                device.description = "Jabra ROX Wireless v2.9.0"

                device.string = "1C:48:F9:CB:FA:AD"

                device.api = "bluez"

                device.class = "sound"

                device.bus = "bluetooth"

                device.form_factor = "headset"

                bluez.path = "/org/bluez/hci0/dev_1C_48_F9_CB_FA_AD"

                bluez.class = "0x240404"

                bluez.alias = "Jabra ROX Wireless v2.9.0"

                device.icon_name = "audio-headset-bluetooth"

                device.intended_roles = "phone"

                profiles:

                headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: unknown)

                a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: unknown)

                off: Off (priority 0, available: yes)

                active profile: <off>

                ports:

                headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)

                properties:

               

                headset-input: Headset (priority 0, latency offset 0 usec, available: unknown)

                properties:

               

              >>>set-card-profile 0 headset_head_unit

               

               

               

               

              now list-cards shows:

               

               

                ....

                active profile: <headset_head_unit>

                ....

               

                instead of

                ....

                active profile: <off>

                ....

               

               

              >>>list-sources

               

               

              choose the one that looks like:

               

               

              index: 5

                name: <bluez_source.1C_48_F9_CB_FA_AD.headset_head_unit>

                driver: <module-bluez5-device.c>

                flags: HARDWARE HW_VOLUME_CTRL LATENCY

                state: SUSPENDED

                suspend cause: IDLE

                priority: 9030

                volume: mono: 43691 /  67%

                       balance 0.00

                base volume: 65536 / 100%

                volume steps: 16

                muted: no

                current latency: 0.00 ms

                max rewind: 0 KiB

                sample spec: s16le 1ch 8000Hz

                channel map: mono

                            Mono

                used by: 0

                linked by: 0

                fixed latency: 28.00 ms

                card: 0 <bluez_card.1C_48_F9_CB_FA_AD>

                module: 22

                properties:

                bluetooth.protocol = "headset_head_unit"

                device.intended_roles = "phone"

                device.description = "Jabra ROX Wireless v2.9.0"

                device.string = "1C:48:F9:CB:FA:AD"

                device.api = "bluez"

                device.class = "sound"

                device.bus = "bluetooth"

                device.form_factor = "headset"

                bluez.path = "/org/bluez/hci0/dev_1C_48_F9_CB_FA_AD"

                bluez.class = "0x240404"

                bluez.alias = "Jabra ROX Wireless v2.9.0"

                device.icon_name = "audio-headset-bluetooth"

                ports:

                headset-input: Headset (priority 0, latency offset 0 usec, available: unknown)

                properties:

               

                active port: <headset-input>

               

               

               

               

              we set the source to this one:

               

               

              >>> set-default-source 5

               

               

              Now use a simple audio capture tool: I use the SoundExchange (sox) cli tool, compiled with pulseaudio set as default driver (detected automatically at configure time before compiling)

              but in the past I've been using export AUDIODRIVER=pulseaudio before launching the binaries and it works too. Sox is called by symlinks: rec and play. We'll try to record audio via rec

              while running btmon in another shell to see the gold shower of sco packets falling from above (yes, these little dudes are yellow in btmon's output).

               

               

              ####This is the part where the NUC differs from the XPS13 laptop####

               

               

              On the NUC6i7KYK:

               

               

              # rec my_snd_file.wav

               

               

              Input File     : 'default' (pulseaudio)

              Channels       : 2

              Sample Rate    : 48000

              Precision      : 16-bit

              Sample Encoding: 16-bit Signed Integer PCM

               

               

              In:0.00% 00:00:00.00 [00:00:00.00] Out:0     [      |      ]        Clip:0

               

              rec (sox) hangs, I have to exit disgracefully (SIGSTOP)

               

               

              btmon's output:

               

               

              < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17      #1 [hci0] 6.714334

                      Handle: 256

                      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: 0x03f8

                        EV3 may be used

                        EV4 may be used

                        EV5 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                              #2 [hci0] 6.715462

                    Setup Synchronous Connection (0x01|0x0028) ncmd 1

                      Status: Success (0x00)

              > HCI Event: Max Slots Change (0x1b) plen 3                            #3 [hci0] 6.720434

                      Handle: 256

                      Max slots: 1

              > HCI Event: Synchronous Connect Complete (0x2c) plen 17               #4 [hci0] 6.730436

                      Status: Success (0x00)

                      Handle: 257

                      Address: 1C:48:F9:CB:FA:AD (OUI 1C-48-F9)

                      Link type: eSCO (0x02)

                      Transmission interval: 0x06

                      Retransmission window: 0x02

                      RX packet length: 30

                      TX packet length: 30

                      Air mode: CVSD (0x02)

              < SCO Data TX: Handle 257 flags 0x00 dlen 48                           #5 [hci0] 6.730588

              < SCO Data TX: Handle 257 flags 0x00 dlen 48                           #6 [hci0] 6.730597

              > HCI Event: Max Slots Change (0x1b) plen 3                            #7 [hci0] 6.760449

                      Handle: 256

                      Max slots: 3

              > ACL Data RX: Handle 256 flags 0x02 dlen 18                           #8 [hci0] 6.766976

                    Channel: 64 len 14 [PSM 0 mode 0] {chan 0}

                      63 ef 15 41 54 2b 56 47 4d 3d 31 30 0d 0e        c..AT+VGM=10..

              < ACL Data TX: Handle 256 flags 0x00 dlen 14                           #9 [hci0] 6.768724

                    Channel: 384 len 10 [PSM 0 mode 0] {chan 0}

                      61 ef 0d 0d 0a 4f 4b 0d 0a d4                    a....OK...    

              > HCI Event: Number of Completed Packets (0x13) plen 5                #10 [hci0] 6.775434

                      Num handles: 1

                      Handle: 256

                      Count: 1

              > HCI Event: Max Slots Change (0x1b) plen 3                           #11 [hci0] 6.801457

                      Handle: 256

                      Max slots: 1

              > ACL Data RX: Handle 256 flags 0x02 dlen 9                           #12 [hci0] 6.803285

                    Channel: 64 len 5 [PSM 0 mode 0] {chan 0}

                      63 ff 01 01 12                                   c....

               

               

               

               

               

               

               

               

               

               

              ###If I do it on a XPS13 laptop I get:

               

               

               

               

              #rec my_audio_file.wav

               

               

              Input File     : 'default' (pulseaudio)

              Channels       : 2

              Sample Rate    : 48000

              Precision      : 16-bit

              Sample Encoding: 16-bit Signed Integer PCM

               

               

              In:0.00% 00:00:25.60 [00:00:00.00] Out:1.22M [  ====|====  ] Hd:5.7

               

              --> I get a beautiful sound file with sound in it!

               

               

              While doing that, using btmon I see a whole bunch of:

               

               

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2493 [hci0] 3.803907

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2494 [hci0] 3.803913

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2495 [hci0] 3.813408

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2496 [hci0] 3.813416

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2497 [hci0] 3.813417

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2498 [hci0] 3.813872

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2499 [hci0] 3.813886

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2500 [hci0] 3.813892

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2501 [hci0] 3.823416

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2502 [hci0] 3.823427

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2503 [hci0] 3.823428

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2504 [hci0] 3.823430

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2505 [hci0] 3.824114

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2506 [hci0] 3.824135

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2507 [hci0] 3.824143

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2508 [hci0] 3.824150

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2509 [hci0] 3.833422

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2510 [hci0] 3.833429

              > SCO Data RX: Handle 7 flags 0x00 dlen 48                #2511 [hci0] 3.833431

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2512 [hci0] 3.833933

              < SCO Data TX: Handle 7 flags 0x00 dlen 48                #2513 [hci0] 3.833952

              ...

               

              And it keeps on going...

               

               

              Ok Alberto. So once again, using a regular distro on my NUC is gonna take me some time, as I'm really not used to those anymore (and very happy not to!). If there is any other way I can help using simple software or even recompiling kernels, I would REALLY prefer. Please let me know.

               

              I'll stick on this question anyway. To be honest I've been stuck for 3 weeks in june on this problem before I got my hands on the laptop... I have to dig into bluetooth a lot until the end of the year.

               

              Thank you for answering.

               

              Vincent

              • 4. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hi : Thank you very much for providing all those results. We will continue with our research and we will try to replicate this scenario. As soon as I get any updates I will let you know.
                 
                Any questions, please let me know.
                 
                Regards,
                Alberto R
                 

                • 5. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Just to confirm, could you please provide the BIOS version of the NUC?
                  Also, did you submit this issue on the link below?
                  https://01.org/community
                   
                  Any questions, please let me know.
                   
                  Regards,
                  Alberto R
                   

                  • 6. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    As additional information I just wanted to let you know that this is the environment we tested:
                    NUC6I7KYK
                    SSD Intel 80GB
                    Memory: Kingston KVR21SE 15S8/4 (4gb)
                    OS: Linux Ubuntu 16.04
                    Kernel: 4.4.0 / 4.8.0 / 4.10.0 / 4.12.3

                     

                     


                    Any questions, please let me know.

                    Regards,
                    Alberto R

                    • 7. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
                      pyrennean

                      Alberto

                       

                      My bios version is KYSKLi70.86A.0034.2016.0503.1003 what's yours?

                       

                      Guess I'm gonna have to fork a couple Gig's on a new partition to install ubuntu then, thank you for this!

                       

                      Best

                       

                      Vincent

                      • 8. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
                        N.Scott.Pearson

                        Vincent,

                         

                        The latest available BIOS for your board is version 49. You are running on version 34. In addition to the plethora of bug fixes and compatibility improvements delivered in the BIOS releases subsequent to yours, the latest BIOS also delivers the microcode update necessary to fix the HyperThreading issue in Skylake and Kaby Lake processors. Thus, I strongly recommend that you upgrade to the latest BIOS. You can download this latest BIOS from here: Download BIOS Update [KYSKLi70.86A]. Instructions for installing BIOS updates are detailed here: Intel NUC BIOS Update Instructions.

                         

                        Once you are running on this BIOS, you can check to see whether it addresses the issue that you are seeing...

                        ...S

                        • 9. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
                          rguevara

                          Hi pyrennean,

                           

                          I work for Intel Customer Support (same as Alberto) and I just wanted to let you know that we provide limited support for Linux operating systems due to the multiple variables and open-source license type of software that allows the source code to be used, modified and/or shared under defined terms and conditions, this really creates a challenge for support.

                          I know this may not be really helpful but we tried to replicate it and had no issues if running Ubuntu*.

                          As Scott mentioned before, please make sure that you are running latest BIOS and Firmware, I also have to mentioned that we don’t provide drivers for Linux* for NUC systems, however I would recommend that you check on https://01.org/openstack for OpenStack on Intel® Architecture and for Wireless and Bluetooth there is also some relevant information here: https://www.intel.com/content/www/us/en/support/network-and-i-o/wireless-networking/000005511.html

                           

                          I hope this helps,

                          Ronny G 

                          • 10. Re: Bluetooth SCO audio packets can be TX but never RX on NUC6i7KYK, chipset Intel Wireless 8260
                            pyrennean

                            Hi Scott

                             

                            Thank you very much for your answer.

                            I updated yesterday night to version 49. I just tested for the issue this post is about, unfortunately it doesn't solve it, but anyway, it's better to be up to date bios-wise!

                             

                            Cheers

                             

                             

                            Vincent