Colibri iMX6DL Bluetooth paired but cannot connect / no file transfer

Hi Toradex community,

we are using image version “2.7” (Linux / Kernel 4.1.xx) on the Colibri iMX6DL and an RedPine Signals RS9113 usb-connected module for WiFi + Bluetooth classic.

Wifi works without problems, but i do have some problems with Bluetooth. Discovering and pairing with other devices works fine, but trying to connect with any other device yields:

[bluetooth]# connect CC:3D:82:32:9D:25
Attempting to connect to CC:3D:82:32:9D:25  
Failed to connect: org.bluez.Error.Failed  

And with obexftp:

root@colibri-imx6:~# obexftp -b CC:3D:82:32:9D:25 -p dummyfile.txt
Browsing CC:3D:82:32:9D:25 ...
Connecting...failed: connect
Tried to connect for 4ms
error on connect(): Invalid argument
Still trying to connect
Connecting...failed: connect
Tried to connect for 5ms
error on connect(): Invalid argument
Still trying to connect
Connecting...failed: connect
Tried to connect for 3ms
error on connect(): Invalid argument
Still trying to connect

However,

[bluetooth]# info CC:3D:82:32:9D:25
Device CC:3D:82:32:9D:25
        Name: LAPTOP-BIRKHOLZ
        Alias: LAPTOP-BIRKHOLZ
        Class: 0x1a010c
        Icon: computer
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: PANU                      (00001115-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (c7f94713-891e-496a-a0e7-983a0946126e)
        Modalias: bluetooth:v0006p0001d0A00

When i use dbus-monitor --system while trying to connect i get the following output:

method call time=1542128220.673852 sender=:1.25 -> destination=org.bluez serial=17 path=/org/bluez/hci0/dev_CC_3D_82_32_9D_25; interface=org.bluez.Device1; member=Connect
error time=1542128220.675872 sender=:1.7 -> destination=:1.25 error_name=org.bluez.Error.Failed reply_serial=17
   string "Protocol not available"

I searched for the Protocol not available message and found some hints pointing to a missing “pulseaudio-bluetooth” package; since we don’t have any multimedia-hardware on our target system we disabled building GStreamer in the Openembedded/Yocto builds, but we would like to have file-transfer capabilities. Do you have any idea how we can enable that functionality?

Kind regards,
Stefan Birkholz

hi @sbirkholz

Welcome to the Toradex Community!!!

Could you provide the dmesg log in a file and the output of lsmod?

Do you have the possibility to connect this module over USB to host or do you have a evaluation board which can be connected to your host? This will help to check if the connection and file transfer are working in general with your usb connected module?

I searched for the Protocol not available message and found some hints pointing to a missing “pulseaudio-bluetooth” package; since we don’t have any multimedia-hardware on our target system we disabled building GStreamer in the Openembedded/Yocto builds, but we would like to have file-transfer capabilities. Do you have any idea how we can enable that functionality?

You can add the pulseaudio package to your image.

Best regards, Jaski

Hello @jaski.tx, thank you for having a look!

Output of lsmod:

bnep                    9600  2
onebox_gpl             15689  0
onebox_nongpl          61138  1 onebox_gpl
onebox_bt_gpl          10901  1 onebox_nongpl
onebox_bt_nongpl       48262  1 onebox_bt_gpl
onebox_wlan_gpl        43490  1 onebox_nongpl
onebox_wlan_nongpl    156330  1 onebox_wlan_gpl
usb_f_rndis            11820  2
u_ether                 9029  1 usb_f_rndis
wlan_scan_sta          14085  0
wlan_xauth               623  0
wlan_acl                2768  0
wlan_ccmp               5091  0
wlan_tkip               8730  0
wlan_wep                4021  0
wlan                  335939  8 wlan_scan_sta,wlan_xauth,wlan_ccmp,wlan_tkip,onebox_wlan_nongpl,onebox_wlan_gpl,wlan_acl,wlan_wep
onebox_common_gpl      38110  6 onebox_bt_nongpl,onebox_nongpl,onebox_wlan_nongpl,onebox_wlan_gpl,onebox_bt_gpl,onebox_gpl
bluetooth             293401  21 bnep,onebox_bt_gpl
mac80211              310154  0
cfg80211              186933  2 wlan,mac80211
wnx                     2947  0
smx                     3344  0
mtdsram                 4319  1
libcomposite           35478  10 usb_f_rndis
configfs               20617  3 usb_f_rndis,libcomposite
isx                     3133  0
iox                     6693  0
galcore               209197  4
fbx                     4653  0
enx                     2955  0
dwx                    15757  0
combus                139441  2
awx                    23257  2
aox                     8169  0
aix                     7088  0
spi_slot               14425  10 aix,aox,awx,dwx,fbx,enx,iox,isx,smx,wnx
ecspi                   4960  7 aix,aox,awx,dwx,fbx,spi_slot,mtdsram

The three-letter modules ending in -x are for our own hardware; at the moment we just load everything even if the hardware is not plugged-in in my testsystem (our hw-developers however test with a fully equipped unit).

dmesg file is attached, link text.

We currently use this module on our own hardware. I also tested with an evaluation board connected via USB with exactly the same results (pairing ok, exchange passcodes, connection not possible).

I should note: WLAN is working perfectly fine using the same module.
In the dmesg-log you’ll find:

[   34.207100] onebox_ioctl: 646 Error: WLAN firmware is not active
[   34.272138] VAP = NULL
, despite that error wlan is working fine, the vap is created, configured correctly and can connect to our WiFi-networks.

The [ 22.214249] send_pkt_to_bluez: packet to `hci0’ failed message look suspicious, but

root@colibri-imx6:~# hciconfig
hci0:   Type: Primary  Bus: USB
        BD Address: 00:23:A7:92:4D:94  ACL MTU: 540:3  SCO MTU: 30:1
        UP RUNNING PSCAN
        RX bytes:4392 acl:21 sco:0 events:113 errors:0
        TX bytes:0 acl:21 sco:0 commands:76 errors:0

is ok (please ignore the different BD Address, i just switched modules!).

We will enable pulseaudio for testing. Thank you for your help!

Regards,

Stefan Birkholz

Thanks for this detailed Information. Please let us know, if it worked with enabled pulseaudio package.

Hi,

we included the pulseaudio package; this apparently brought on the missing a2dp protocol, and i can now successfully connect to my laptop. However, the connection is not stable (i see connection drops), and it is still not possible to use the file transfer functions.

root@colibri-imx6:~# bluetoothctl
[NEW] Controller 88:DA:1A:99:8F:E9 colibri-imx6 [default]
[NEW] Device CC:3D:82:32:9D:25 LAPTOP-BIRKHOLZ
[bluetooth]# connect CC:3D:82:32:9D:25
Attempting to connect to CC:3D:82:32:9D:25
[CHG] Device CC:3D:82:32:9D:25 Connected: yes
[LAPTOP-BIRKHOLZ]# info
Device CC:3D:82:32:9D:25
        Name: LAPTOP-BIRKHOLZ
        Alias: LAPTOP-BIRKHOLZ
        Class: 0x0a010c
        Icon: computer
        Paired: yes
        Trusted: no
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: PANU                      (00001115-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (c7f94713-891e-496a-a0e7-983a0946126e)
        Modalias: bluetooth:v0006p0001d0A00
Failed to connect: org.bluez.Error.Failed
[CHG] Device CC:3D:82:32:9D:25 Connected: no
[CHG] Device CC:3D:82:32:9D:25 Connected: yes
[CHG] Device CC:3D:82:32:9D:25 Connected: no
[bluetooth]#

Accordingly:

root@colibri-imx6:~# obexftp -b CC:3D:82:32:9D:25 -p /etc/passwd
Browsing CC:3D:82:32:9D:25 ...
Connecting...failed: connect
Tried to connect for 2ms
error on connect(): Invalid argument
Still trying to connect
Connecting...failed: connect
Tried to connect for 5ms
error on connect(): Invalid argument
Still trying to connect
Connecting...failed: connect
Tried to connect for 4ms
error on connect(): Invalid argument
Still trying to connect
root@colibri-imx6:~#

I don’t know if it’s related (seeing that enabling pulseaudio brought us one step further), but we disabled GStreamer in our build - might there be some dependency there?

relevant dmesg output:

[  691.052087] Bluetooth: RFCOMM TTY layer initialized
[  691.062673] Bluetooth: RFCOMM socket layer initialized
[  691.068278] Bluetooth: RFCOMM ver 1.11

and systemctl status bluetooth

Nov 16 10:54:27 colibri-imx6 bluetoothd[715]: Endpoint unregistered: sender=:1.10 path=/MediaEndpoint/A2DPSource
Nov 16 10:54:27 colibri-imx6 bluetoothd[715]: Endpoint unregistered: sender=:1.10 path=/MediaEndpoint/A2DPSink
Nov 16 10:54:51 colibri-imx6 bluetoothd[715]: Endpoint registered: sender=:1.11 path=/MediaEndpoint/A2DPSource
Nov 16 10:54:51 colibri-imx6 bluetoothd[715]: Endpoint registered: sender=:1.11 path=/MediaEndpoint/A2DPSink
Nov 16 10:55:38 colibri-imx6 bluetoothd[715]: [[0;1;31mconnect error: Connection refused (111)[[0m
Nov 16 10:55:56 colibri-imx6 bluetoothd[715]: [[0;1;31mconnect error: Connection refused (111)[[0m
Nov 16 13:06:41 colibri-imx6 bluetoothd[715]: [[0;1;31mconnect error: Connection refused (111)[[0m
Nov 16 13:06:59 colibri-imx6 bluetoothd[715]: [[0;1;31mconnect error: Connection refused (111)[[0m
Nov 16 13:17:03 colibri-imx6 bluetoothd[715]: [[0;1;31mconnect error: Connection refused (111)[[0m
Nov 16 13:17:22 colibri-imx6 bluetoothd[715]: [[0;1;31mconnect error: Connection refused (111)[[0m

hi @sbirkholz

These are good news that you got a step further. Could you try to use a regular Bsp of Toradex and just integrate the driver needed for the RedPine Device to the kernel as described here.

Ok, i will try that and get back to you next week. Thank you, have a nice weekend!

Thanks. We will wait for your answer.