6 Replies Latest reply on Jun 3, 2015 6:36 PM by ek

    How do I connect a bluetooth microphone to Edison?

    SeanDoyle

      Hi -

       

      I can pair but not connect with my Motorola H730 headset. I'm happy to change headsets if this will make connecting easier. My goal is to be able to use a bluetooth microphone to interface with the pocketsphinx library (which seems to work with both ASLA and PulseAudio). But I can't get connected. Here's where I'm study:

       

      I've read the posts in https://communities.intel.com/message/257417#257417 and they were very helpful. I've installed ofono

      opkg install ofono

      and ran

      brcm_patchram_plus --enable_hci

      which seems to have added the 'Handsfree' service to my bluetooth:

       

      [bluetooth]# show

      Controller 98:4F:EE:03:BE:C1

        Name: edisonbeeper1

        Alias: edisonbeeper1

        Class: 0x2c0110

        Powered: yes

        Discoverable: no

        Pairable: yes

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

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

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

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

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

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

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

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

        Modalias: usb:v1D6Bp0246d0518

        Discovering: no


      and my device has a matching profile:

       

      [bluetooth]# info 00:24:1C:77:4B:BC

      Device 00:24:1C:77:4B:BC

        Name: Motorola H730

        Alias: Motorola H730

        Class: 0x200404

        Icon: audio-card

        Paired: yes

        Trusted: yes

        Blocked: no

        Connected: no

        LegacyPairing: no

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

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


      When I try to connect I get a failure:

       

      [CHG] Device 00:24:1C:77:4B:BC Connected: no

      [bluetooth]# connect 00:24:1C:77:4B:BC

      Attempting to connect to 00:24:1C:77:4B:BC

      Failed to connect: org.bluez.Error.Failed

      and btmon reports this - which I don't really understand (if I did - then I might know what to do :-):

       

      < HCI Command: Create Connection (0x01|0x0005) plen 13        [hci0] 86.615952

              Address: 00:24:1C:77:4B:BC (FuGang Electronic (DG) Co.,Ltd)

              Packet type: 0xcc18

                DM1 may be used

                DH1 may be used

                DM3 may be used

                DH3 may be used

                DM5 may be used

                DH5 may be used

              Page scan repetition mode: R2 (0x02)

              Page scan mode: Mandatory (0x00)

              Clock offset: 0x0000

              Role switch: Allow slave (0x01)

      > HCI Event: Command Status (0x0f) plen 4                     [hci0] 86.623254

            Create Connection (0x01|0x0005) ncmd 1

              Status: Success (0x00)

      > HCI Event: Connect Complete (0x03) plen 11                  [hci0] 91.746220

              Status: Page Timeout (0x04)

              Handle: 12

              Address: 00:24:1C:77:4B:BC (FuGang Electronic (DG) Co.,Ltd)

              Link type: ACL (0x01)

              Encryption: Disabled (0x00)

      @ Connect Failed: 00:24:1C:77:4B:BC (0) status 0x04


      Since ofono seems to have added the correct profile - what am I missing? Thanks very much for any help.




        • 1. Re: How do I connect a bluetooth microphone to Edison?
          Intel_Alvarado

          Hi,

           

          What image are you using? I recommend you to download the latest image from Intel® Edison Products — Software Downloads . Maybe the Bluez version you are using is outdated, what version are you using? Also, take a look at Has anyone passed data from Edison to a phone via Bluetooth? . It has lots of Bluetooth information and a step by step instructions to connect to the Edison.


          Sergio

          • 2. Re: How do I connect a bluetooth microphone to Edison?
            SeanDoyle

            Sergio -

             

            I'm sorry - this doesn't help.

             

            I believe that I'm running the latest distro:

             

            Linux edisonbeeper3 3.10.17-poky-edison+ #1 SMP PREEMPT Fri Jan 30 14:16:35 CET 2015 i686 GNU/Linux

            and the link above  leads to audio help  (http://www.linuxquestions.org/questions/linux-wireless-networking-41/setting-up-bluez-with-a-passkey-pin-to-be-used-as-h…) for bluez 4 - but I'm using bluez5  (5.24-r0). Maybe I've followed the wrong path?


            I can't use bluez 4 - I want the BLE support from bluez 5.

             

            Thanks

             

            Sean




            • 3. Re: How do I connect a bluetooth microphone to Edison?
              Intel_Alvarado

              Hi,

               

              What is the output of “configure_edison --version”? Latest version available is 120.

              Also, take a look at this link How to make my phone see Edison in slave mode .

               

              Sergio

              • 4. Re: How do I connect a bluetooth microphone to Edison?
                SeanDoyle

                root@edisonbeeper1:~# configure_edison --version

                120

                 

                So - it's the latest version. I've just gone over the links again and tried different variations on what was there - I had tried all of this before.

                 

                When I try to connect it fails:

                [bluetooth]# connect 00:24:1C:77:4B:BC

                Attempting to connect to 00:24:1C:77:4B:BC

                [CHG] Device 00:24:1C:77:4B:BC Connected: yes

                Failed to connect: org.bluez.Error.NotAvailable

                [CHG] Device 00:24:1C:77:4B:BC Connected: no

                 

                And btmon reports the following - it looks like it works until the disconnect at the end. It's clearly talking to the device and info says that it trusts it and is paired with it. So - I'm stumped. I obviously don't have something configured correctly and I don't have a good enough mental model to diagnose the difficulty. Is there another log I should be looking at besides btmon here? Or is there something in the btmon that points to the error but I'm missing it? Thanks for any help. :-)

                 

                < HCI Command: Create Connection (0x01|0x0005) plen 13    [hci0] 44.439646
                   Address: 00:24:1C:77:4B:BC (FuGang Electronic (DG) Co.,Ltd)
                   Packet type: 0xcc18
                     DM1 may be used
                     DH1 may be used
                     DM3 may be used
                     DH3 may be used
                     DM5 may be used
                     DH5 may be used
                   Page scan repetition mode: R2 (0x02)
                   Page scan mode: Mandatory (0x00)
                   Clock offset: 0x0000
                   Role switch: Allow slave (0x01)
                > HCI Event: Command Status (0x0f) plen 4                 [hci0] 44.445665
                Create Connection (0x01|0x0005) ncmd 1
                   Status: Success (0x00)
                > HCI Event: Connect Complete (0x03) plen 11              [hci0] 45.846767
                   Status: Success (0x00)
                   Handle: 12
                   Address: 00:24:1C:77:4B:BC (FuGang Electronic (DG) Co.,Ltd)
                   Link type: ACL (0x01)
                   Encryption: Disabled (0x00)

                < HCI Command: Read Remote Supported F.. (0x01|0x001b) plen 2  [hci0] 45.847180

                   Handle: 12
                > HCI Event: Command Status (0x0f) plen 4                 [hci0] 45.848632
                Read Remote Supported Features (0x01|0x001b) ncmd 1
                   Status: Success (0x00)
                > HCI Event: Read Remote Supported Features (0x0b) plen 11[hci0] 45.848656
                   Status: Success (0x00)
                   Handle: 12
                   Features: 0xbc 0xfe 0x0b 0xc0 0x1b 0xbe 0x59 0x83
                     Encryption
                     Slot offset
                     Timing accuracy
                     Role switch
                     Sniff mode
                     Power control requests
                     Channel quality driven data rate (CQDDR)
                     SCO link
                     HV2 packets
                     HV3 packets
                     u-law log synchronous data
                     A-law log synchronous data
                     CVSD synchronous data
                     Paging parameter negotiation
                     Transparent synchronous data
                     RSSI with inquiry results
                     Extended SCO link (EV3 packets)
                     EV4 packets
                     EV5 packets
                     AFH capable slave
                     AFH classification slave
                     Sniff subrating
                     Pause encryption
                     AFH capable master
                     AFH classification master
                     Enhanced Data Rate eSCO 2 Mbps mode
                     3-slot Enhanced Data Rate eSCO packets
                     Extended Inquiry Response
                     Secure Simple Pairing
                     Encapsulated PDU
                     Non-flushable Packet Boundary Flag
                     Link Supervision Timeout Changed Event
                     Inquiry TX Power Level
                     Extended features

                < HCI Command: Read Remote Extended Fe.. (0x01|0x001c) plen 3  [hci0] 45.848760

                   Handle: 12
                   Page: 1
                > HCI Event: Command Status (0x0f) plen 4                 [hci0] 45.849200
                Read Remote Extended Features (0x01|0x001c) ncmd 1
                   Status: Success (0x00)
                > HCI Event: Read Remote Extended Features (0x23) plen 13 [hci0] 45.849400
                   Status: Success (0x00)
                   Handle: 12
                   Page: 1/1
                   Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
                     Secure Simple Pairing (Host Support)
                < HCI Command: Remote Name Request (0x01|0x0019) plen 10  [hci0] 45.849494
                   Address: 00:24:1C:77:4B:BC (FuGang Electronic (DG) Co.,Ltd)
                   Page scan repetition mode: R2 (0x02)
                   Page scan mode: Mandatory (0x00)
                   Clock offset: 0x0000
                < ACL Data TX: Handle 12 flags 0x00 dlen 10               [hci0] 45.849515
                L2CAP: Information Request (0x0a) ident 1 len 2
                   Type: Extended features supported (0x0002)
                > HCI Event: Command Status (0x0f) plen 4                 [hci0] 45.850190
                Remote Name Request (0x01|0x0019) ncmd 1
                   Status: Success (0x00)
                > HCI Event: Remote Name Req Complete (0x07) plen 255     [hci0] 45.992494
                   Status: Success (0x00)
                   Address: 00:24:1C:77:4B:BC (FuGang Electronic (DG) Co.,Ltd)
                   Name: Motorola H730

                @ Device Connected: 00:24:1C:77:4B:BC (0) flags 0x0000

                   0e 09 4d 6f 74 6f 72 6f 6c 61 20 48 37 33 30 04  ..Motorola H730.
                   0d 04 04 20                                 ...      
                > HCI Event: Number of Completed Packets (0x13) plen 5    [hci0] 46.072470
                   Num handles: 1
                   Handle: 12
                   Count: 1
                > ACL Data RX: Handle 12 flags 0x02 dlen 16               [hci0] 46.192691
                L2CAP: Information Response (0x0b) ident 1 len 8
                   Type: Extended features supported (0x0002)
                   Result: Success (0x0000)
                   Features: 0x00000200
                     Unicast Connectionless Data Reception
                < ACL Data TX: Handle 12 flags 0x00 dlen 12               [hci0] 46.192823
                L2CAP: Connection Request (0x02) ident 2 len 4
                   PSM: 1 (0x0001)
                   Source CID: 64
                > ACL Data RX: Handle 12 flags 0x02 dlen 16               [hci0] 46.311664
                L2CAP: Connection Response (0x03) ident 2 len 8
                   Destination CID: 65
                   Source CID: 64
                   Result: Connection successful (0x0000)
                   Status: No further information available (0x0000)
                < ACL Data TX: Handle 12 flags 0x00 dlen 12               [hci0] 46.311818
                L2CAP: Configure Request (0x04) ident 3 len 4
                   Destination CID: 65
                   Flags: 0x0000
                > ACL Data RX: Handle 12 flags 0x02 dlen 16               [hci0] 46.377970
                L2CAP: Configure Request (0x04) ident 2 len 8
                   Destination CID: 64
                   Flags: 0x0000
                   Option: Maximum Transmission Unit (0x01)
                     MTU: 64
                > HCI Event: Number of Completed Packets (0x13) plen 5    [hci0] 46.378005
                   Num handles: 1
                   Handle: 12
                   Count: 2
                < ACL Data TX: Handle 12 flags 0x00 dlen 18               [hci0] 46.378149
                L2CAP: Configure Response (0x05) ident 2 len 10
                   Source CID: 65
                   Flags: 0x0000
                   Result: Success (0x0000)
                   Option: Maximum Transmission Unit (0x01)
                     MTU: 64
                > ACL Data RX: Handle 12 flags 0x02 dlen 14               [hci0] 46.379065
                L2CAP: Configure Response (0x05) ident 3 len 6
                   Source CID: 64
                   Flags: 0x0000
                   Result: Success (0x0000)
                < ACL Data TX: Handle 12 flags 0x00 dlen 24               [hci0] 46.379379
                Channel: 65 len 20 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Request (0x06) tid 0 len 15
                   Search pattern: [len 5]
                     Sequence (6) with 3 bytes [8 extra bits] len 5
                       UUID (3) with 2 bytes [0 extra bits] len 3
                         L2CAP (0x0100)
                   Max record count: 65535
                   Attribute list: [len 7]
                     Sequence (6) with 5 bytes [8 extra bits] len 7
                       Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
                         0x0000ffff
                   Continuation state: 0
                > HCI Event: Number of Completed Packets (0x13) plen 5    [hci0] 46.447910
                   Num handles: 1
                   Handle: 12
                   Count: 2
                > ACL Data RX: Handle 12 flags 0x02 dlen 27               [hci0] 46.449036
                > ACL Data RX: Handle 12 flags 0x01 dlen 27               [hci0] 46.515276
                > ACL Data RX: Handle 12 flags 0x01 dlen 13               [hci0] 46.516414
                Channel: 64 len 63 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Response (0x07) tid 0 len 58
                   Attribute bytes: 53
                   Continuation state: 2
                   00 35                                       .5       
                < ACL Data TX: Handle 12 flags 0x00 dlen 26               [hci0] 46.516895
                Channel: 65 len 22 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Request (0x06) tid 1 len 17
                   Search pattern: [len 5]
                     Sequence (6) with 3 bytes [8 extra bits] len 5
                       UUID (3) with 2 bytes [0 extra bits] len 3
                         L2CAP (0x0100)
                   Max record count: 65535
                   Attribute list: [len 7]
                     Sequence (6) with 5 bytes [8 extra bits] len 7
                       Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
                         0x0000ffff
                   Continuation state: 2
                   00 35                                       .5       
                > ACL Data RX: Handle 12 flags 0x02 dlen 27               [hci0] 46.584194
                > ACL Data RX: Handle 12 flags 0x01 dlen 27               [hci0] 46.651727
                > ACL Data RX: Handle 12 flags 0x01 dlen 14               [hci0] 46.717954
                Channel: 64 len 64 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Response (0x07) tid 1 len 59
                   Attribute bytes: 54
                   Continuation state: 2
                   00 6b                                       .k       
                < ACL Data TX: Handle 12 flags 0x00 dlen 26               [hci0] 46.718429
                Channel: 65 len 22 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Request (0x06) tid 2 len 17
                   Search pattern: [len 5]
                     Sequence (6) with 3 bytes [8 extra bits] len 5
                       UUID (3) with 2 bytes [0 extra bits] len 3
                         L2CAP (0x0100)
                   Max record count: 65535
                   Attribute list: [len 7]
                     Sequence (6) with 5 bytes [8 extra bits] len 7
                       Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
                         0x0000ffff
                   Continuation state: 2
                   00 6b                                       .k       
                > HCI Event: Number of Completed Packets (0x13) plen 5    [hci0] 46.784166
                   Num handles: 1
                   Handle: 12
                   Count: 2
                > ACL Data RX: Handle 12 flags 0x02 dlen 27               [hci0] 46.786436
                > ACL Data RX: Handle 12 flags 0x01 dlen 27               [hci0] 46.852968
                > ACL Data RX: Handle 12 flags 0x01 dlen 14               [hci0] 46.925416
                Channel: 64 len 64 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Response (0x07) tid 2 len 59
                   Attribute bytes: 54
                   Continuation state: 2
                   00 a1                                       ..       
                < ACL Data TX: Handle 12 flags 0x00 dlen 26               [hci0] 46.925866
                Channel: 65 len 22 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Request (0x06) tid 3 len 17
                   Search pattern: [len 5]
                     Sequence (6) with 3 bytes [8 extra bits] len 5
                       UUID (3) with 2 bytes [0 extra bits] len 3
                         L2CAP (0x0100)
                   Max record count: 65535
                   Attribute list: [len 7]
                     Sequence (6) with 5 bytes [8 extra bits] len 7
                       Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
                         0x0000ffff
                   Continuation state: 2
                   00 a1                                       ..       
                > ACL Data RX: Handle 12 flags 0x02 dlen 13               [hci0] 47.065434
                Channel: 64 len 9 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Response (0x07) tid 3 len 4
                   Attribute bytes: 1
                   Continuation state: 0
                   Combined attribute bytes: 162
                     Attribute list: [len 74] {position 0}
                       Attribute: Service Record Handle (0x0000) [len 2]
                         0x00010000
                       Attribute: Service Class ID List (0x0001) [len 2]
                         UUID (3) with 2 bytes [0 extra bits] len 3
                           Headset (0x1108)
                         UUID (3) with 2 bytes [0 extra bits] len 3
                           Generic Audio (0x1203)
                       Attribute: Protocol Descriptor List (0x0004) [len 2]
                         Sequence (6) with 3 bytes [8 extra bits] len 5
                           UUID (3) with 2 bytes [0 extra bits] len 3
                             L2CAP (0x0100)
                         Sequence (6) with 5 bytes [8 extra bits] len 7
                           UUID (3) with 2 bytes [0 extra bits] len 3
                             RFCOMM (0x0003)
                           Unsigned Integer (1) with 1 byte [0 extra bits] len 2
                             0x01
                       Attribute: Browse Group List (0x0005) [len 2]
                         UUID (3) with 2 bytes [0 extra bits] len 3
                           Public Browse Root (0x1002)
                       Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
                         Sequence (6) with 6 bytes [8 extra bits] len 8
                           UUID (3) with 2 bytes [0 extra bits] len 3
                             Headset (0x1108)
                           Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                             0x0100
                       Attribute: Unknown (0x0100) [len 2]
                         HSP service [len 12]
                     Attribute list: [len 80] {position 1}
                       Attribute: Service Record Handle (0x0000) [len 2]
                         0x00010001
                       Attribute: Service Class ID List (0x0001) [len 2]
                         UUID (3) with 2 bytes [0 extra bits] len 3
                           Handsfree (0x111e)
                         UUID (3) with 2 bytes [0 extra bits] len 3
                           Generic Audio (0x1203)
                       Attribute: Protocol Descriptor List (0x0004) [len 2]
                         Sequence (6) with 3 bytes [8 extra bits] len 5
                           UUID (3) with 2 bytes [0 extra bits] len 3
                             L2CAP (0x0100)
                         Sequence (6) with 5 bytes [8 extra bits] len 7
                           UUID (3) with 2 bytes [0 extra bits] len 3
                             RFCOMM (0x0003)
                           Unsigned Integer (1) with 1 byte [0 extra bits] len 2
                             0x02
                       Attribute: Browse Group List (0x0005) [len 2]
                         UUID (3) with 2 bytes [0 extra bits] len 3
                           Public Browse Root (0x1002)
                       Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
                         Sequence (6) with 6 bytes [8 extra bits] len 8
                           UUID (3) with 2 bytes [0 extra bits] len 3
                             Handsfree (0x111e)
                           Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                             0x0105
                       Attribute: Unknown (0x0100) [len 2]
                         HFP service [len 12]
                       Attribute: Unknown (0x0311) [len 2]
                         0x001b
                < ACL Data TX: Handle 12 flags 0x00 dlen 24               [hci0] 47.131011
                Channel: 65 len 20 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Request (0x06) tid 4 len 15
                   Search pattern: [len 5]
                     Sequence (6) with 3 bytes [8 extra bits] len 5
                       UUID (3) with 2 bytes [0 extra bits] len 3
                         PnP Information (0x1200)
                   Max record count: 65535
                   Attribute list: [len 7]
                     Sequence (6) with 5 bytes [8 extra bits] len 7
                       Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
                         0x0000ffff
                   Continuation state: 0
                > HCI Event: Number of Completed Packets (0x13) plen 5    [hci0] 47.146710
                   Num handles: 1
                   Handle: 12
                   Count: 2
                > ACL Data RX: Handle 12 flags 0x02 dlen 14               [hci0] 47.214181
                Channel: 64 len 10 [PSM 1 mode 0] {chan 0}
                SDP: Service Search Attribute Response (0x07) tid 4 len 5
                   Attribute bytes: 2
                   Continuation state: 0
                < ACL Data TX: Handle 12 flags 0x00 dlen 12               [hci0] 49.910357
                L2CAP: Disconnection Request (0x06) ident 4 len 4
                   Destination CID: 65
                   Source CID: 64
                > ACL Data RX: Handle 12 flags 0x02 dlen 12               [hci0] 49.916619
                L2CAP: Disconnection Response (0x07) ident 4 len 4
                   Destination CID: 65
                   Source CID: 64
                > HCI Event: Number of Completed Packets (0x13) plen 5    [hci0] 50.145271
                   Num handles: 1
                   Handle: 12
                   Count: 1
                > HCI Event: Disconnect Complete (0x05) plen 4            [hci0] 51.904300
                   Status: Success (0x00)
                   Handle: 12
                   Reason: Remote User Terminated Connection (0x13)

                @ Device Disconnected: 00:24:1C:77:4B:BC (0) reason 3

                • 5. Re: How do I connect a bluetooth microphone to Edison?
                  Intel_Alvarado

                  Hi,

                   

                  The last line of the log shows a device disconnected for reason 3. According to Linux WiFi Reason Codes - Disconnection & De-Authentication Issues reason 3 is due to the access point going offline.

                   

                  I also found a couple of links with that same error and some suggestions.

                  https://bbs.archlinux.org/viewtopic.php?id=132079

                  https://wiki.archlinux.org/index.php/Bluetooth_headset

                   

                  Sergio

                  • 6. Re: How do I connect a bluetooth microphone to Edison?
                    ek

                    I'm seeing same error and symptom when Edison tries to connect to LEGO Mindstorms EV3; pairing is successful, but connection fails immediately:

                     

                      [bluetooth]# connect 00:16:53:46:1F:97

                      Attempting to connect to 00:16:53:46:1F:97

                      [CHG] Device 00:16:53:46:1F:97 Connected: yes

                      Failed to connect: org.bluez.Error.NotAvailable

                      [CHG] Device 00:16:53:46:1F:97 Connected: no


                    I posted the discussion at separate thread: Re: Interacting with Mindstorms EV3 over bluetooth on Edison?