Bluetooth connectivity Issue on TX2 Custom Board

I have CY4354 cypress WIFI/BT combo chip where wifi is connected over SDIO and bluetooth is connected on UART. Right now I am validating BT interface.

The mac address of the device is coming in hciconfig. But the class parameter is coming as 0x0000 due to which pairing is happening but connection is not established and within 2 seconds the pairing is also getting terminated (using bluetoothctl)

root@localhost:/home/ubuntu# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 43:50:C0:00:1F:AC ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:2068807 acl:1433 sco:0 events:26851 errors:0
TX bytes:6238 acl:77 sco:0 commands:280 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: ‘BlueZ 5.48’
Class: 0x000000
Service Classes: Rendering, Capturing
Device Class: Miscellaneous,
HCI Version: (0xa) Revision: 0x158e
LMP Version: (0xa) Subversion: 0x610c
Manufacturer: Cypress Semiconductor Corporation (305)

So i tried below changes and after that class parameter is coming as 0x0c0000

a.) Install pulseaudio-module-bluetooth using 
            sudo apt-get install pulseaudio-module-bluetooth
    
b.) Edit this file: /lib/systemd/system/bluetooth.service.d/nv-bluetooth-service.conf 
        remove --noplugin=audio,a2dp,avrcp from this line ExecStart=/usr/lib/bluetooth/bluetoothd -d --noplugin=audio,a2dp,avrcp  

c.) Enter above comamnd to start pulseaudio
          /usr/bin/pulseaudio --start

d.) Now Check Bluetooth class address using
           sudo hciconfig -a

now connection is also getting established with android devices. But file transferring is not happening

have also observed that in the android phone scanning, the cypress bluetooth is coming as music device, due to which I am not able to transfer files.

Please suggest how can I initiate file transfer with the CY4354 bluetooth.

Please share update on this.

Any suggestion will be appreciated.

Hi anjali.dutt,

Please reference this topic to enable BT.

And you can use below tools to do BT transfer:

$ sudo apt update
$ sudo apt install blueman obexftp

Hi Carol,

I do not have internet on the device, so i can’t do update and install on runtime.
I have integrated below packages : To get bluetooth class parameter and enable file transfer.

  1. pulseaudio-module-bluetooth_11.1-1ubuntu7.11_arm64.deb has dependency on below
    a) libpulse0_11.1-1ubuntu7.11_arm64.deb
    b) libpulsedsp_11.1-1ubuntu7.11_arm64.deb
    c) libpulse-mainloop-glib0_11.1-1ubuntu7.11_arm64.deb
    d) pulseaudio-utils_11.1-1ubuntu7.11_arm64.deb
    e) pulseaudio_11.1-1ubuntu7.11_arm64.deb

root@localhost:/home/ubuntu# dbus-launch bt-obex -p 4C:BB:58:DE:68:A9 cypress_brcm
bt-obex: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory

  1. package libreadline6-dev_6.3-8ubuntu2_arm64.deb has dependency on below
    a) libtinfo-dev_6.1-1ubuntu1.18.04_arm64.deb
    b) libreadline6-dev_6.3-8ubuntu2_arm64.deb

Now i am able to initiate file transfer from tx2-device to laptop
dbus-launch bt-obex -p 4C:BB:58:DE:68:A9 examples.desktop
[Transfer#examples.desktop] Waiting…
[Transfer#examples.desktop] Completed

But file transfer from laptop to tx2-device is still not happening. Can you please suggest how can i enable receiving from tx2 side over BT .

Hi,

What kind of OS is your laptop running? Is it also a ubuntu?

yes, laptop is also having ubuntu 18

Is that laptop able to send file to other ubuntu bluetooth device?

yes, I am able to do file transfer from this laptop to android device.
but same is not happening with the tx2.

I tried both UI and commandline option from laptop, with both ways its failing.

Please check if installing blueman can help.

If it does not, please check what is happening in syslog.

Hi Wayne,

Blueman is UI based application. Our device is command line based without hdmi interface.
please suggest how can i verify on this.

Hi,

please suggest on this.

Hi,

Please suggest what is the problem here regarding files receiving from the tx2 end as i did not find any solution for this

Hi,

Please suggest, i have not found any pointers to debug this.
below are the logs i observed in the syslog when i run this command from ubuntu to transfer file laptop to tx2 custom board-

**vvdn@anjali:~/Pictures$ bluetooth-sendto --device=70:66:55:39:39:4A Cool-Pokemon-Pikachu-Wallpapers.png **
Gtk-Message: 10:40:30.805: GtkDialog mapped without a transient parent. This is discouraged.

Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: connect error: Connection refused (111)
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/avdtp.c:avdtp_ref() 0x55a23dbad0: ref=3
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/avdtp.c:connection_lost() Disconnected from 4C:BB:58:DE:68:A9
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/a2dp.c:discover_cb() err 0x7ff47db530
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/avdtp.c:avdtp_unref() 0x55a23dbad0: ref=2
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: src/service.c:change_state() 0x55a2397920: device 4C:BB:58:DE:68:A9 profile a2dp-sink state changed: connecting → )
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: src/device.c:device_profile_connected() a2dp-sink Resource temporarily unavailable (11)
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/a2dp.c:setup_unref() 0x55a23bb910: ref=0
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/a2dp.c:setup_free() 0x55a23bb910
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/avdtp.c:avdtp_unref() 0x55a23dbad0: ref=1
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/source.c:source_set_state() State changed /org/bluez/hci0/dev_4C_BB_58_DE_68_A9: SOURCE_STATE_CONNECD
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/sink.c:sink_set_state() State changed /org/bluez/hci0/dev_4C_BB_58_DE_68_A9: SINK_STATE_CONNECTING -D
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/a2dp.c:channel_remove() chan 0x55a239f2d0
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/avdtp.c:avdtp_unref() 0x55a23dbad0: ref=0
Feb 9 05:50:02 tegra-ubuntu bluetoothd[4606]: profiles/audio/avdtp.c:avdtp_free() 0x55a23dbad0
Feb 9 05:50:08 tegra-ubuntu dhcpd[6467]: DHCPREQUEST for 192.168.55.100 from 8e:fc:9d:5d:1f:11 (anjali) via l4tbr0
Feb 9 05:50:08 tegra-ubuntu dhcpd[6467]: DHCPACK on 192.168.55.100 to 8e:fc:9d:5d:1f:11 (anjali) via l4tbr0
Feb 9 05:50:14 tegra-ubuntu bluetoothd[4606]: src/service.c:btd_service_ref() 0x55a23a9530: ref=2
Feb 9 05:50:14 tegra-ubuntu bluetoothd[4606]: src/profile.c:ext_connect() Object Push connected to 4C:BB:58:DE:68:A9
Feb 9 05:50:14 tegra-ubuntu bluetoothd[4606]: src/service.c:change_state() 0x55a23a9530: device 4C:BB:58:DE:68:A9 profile Object Push state changed: disconnected)
Feb 9 05:50:14 tegra-ubuntu bluetoothd[4606]: src/service.c:change_state() 0x55a23a9530: device 4C:BB:58:DE:68:A9 profile Object Push state changed: connecting -)
Feb 9 05:50:14 tegra-ubuntu bluetoothd[4606]: src/device.c:device_profile_connected() Object Push Success (0)
Feb 9 05:50:14 tegra-ubuntu obexd[7696]: CONNECT(0x0), (null)(0xffffffff)
Feb 9 05:50:14 tegra-ubuntu obexd[7696]: CONNECT(0x0), (null)(0x0)
Feb 9 05:50:14 tegra-ubuntu obexd[7696]: PUT(0x2), (null)(0xffffffff)
Feb 9 05:50:14 tegra-ubuntu obexd[7696]: PUT(0x2), FORBIDDEN(0x43)

Also attaching the dialogue error coming in linux laptop

Please share update on this.

I am sorry that I cannot provide much help here.

The bluetooth application is more like provided by ubuntu directly. Thus, file an issue on ubuntu forum may be a better option than waiting for answer here.

If you can point out if this is nv specific driver issue then maybe we can help.