Enable bluetooth on TX2

I have been trying to use bluetooth on the TX2 somewhat unsuccessfully. I’ve made sure to include the UART bt drivers, as well as USB bt drivers, but only external bluetooth over USB works. There are no hci devices until I plug in my USB one. I’ve tried using:

rfkill unblock bluetooth

and

hciattach ttyTHS1 any

to both the ttyTHS ports, but THS1 and THS3 (the only two available for some reason), don’t seem to work. They create the hci devices, but I cannot bring them up using:

hciconfig <device> up

It just seems to time out every time I try to init these devices.

I am currently using the meta-tegra bsp from GitHub - OE4T/meta-tegra: BSP layer for NVIDIA Jetson platforms, based on L4T to integrate with yocto, using poky as the distribution. This all works with a USB bluetooth dongle, and I can communicate using that, but I would like to use the internal bluetooth if at all possible.
Any help would be greatly appreciated.

abusma,

I have some steps to run bluetooth on tegra and send a file. Please give it a try. Please also take a look at dmesg when bluetooth is enabled.

Pre-requisite:
1) Install rfkill, bluez, obexftp, obexpushd, blueman, pulseaudio, pulseaudio-module-bluetooth packages on the DUT before test.
sudo apt-get install rfkill bluez pulseaudio pulseaudio-module-bluetooth obexftp obexpushd -y

Test steps ::
1) Turn on BT of the device.
#dmesg -n 7
#rfkill unblock bluetooth

2) Open Bluetoothctl CLI 
#bluetoothctl

3) Run show command, if the output shows "Powered: Yes" then the device is functional
[Bluetootchtl]# show

4) Make the DUT discoverable as below
[Bluetoothctl]# discoverable on

5) Scan for the nearby devices, by running the below command. 
Meanwhile make sure the Android phone BT is On and discoverable.
[Bluetoothctl] scan on

6) when we run the above cmd, we can see all the devices that are nearby device and their macaddresses.

7) Now pair the android phone by using below command. 
[bluetoothctl]# pair <mac addr of other device to be paired>
You can get the mac address from the step 5.

8) Accept the connection from the mobile phone and both are now connected.

9) From another ssh session or virtual terminal of the device, Get the android device profiles support as below.
#sdptool browse <mac of paired device>

10) Under the obex profile check the channel no. on which device is being operated/configured.

11) Now activate the BT obex profile by connecting on a channel-5 using below command.
#rfcomm connect 5   &
- This will run the rfcomm daemon in the background.

12) Now try to send any image file from DUT to Android device as below. 
#obexftp -v --nopath --noconn --uuid none --bluetooth <mac_addr_of_paired_device> --channel <channel_no_from_step9> --put xyz.jpg

13) Once the file transfer is complete, 11) Turn Off the BT using below command.
1 Like

[s]These steps don’t seem to be enough anymore for r28.1

bluetoothctl never starts accepting input, which seems to indicate the bluetooth service isn’t running. But when I try to enable/start the service nothing happens. It stays dead and doesn’t post any errors.

What are the bluetooth enable steps for r28.1? Everything seems to be enabled in the kernel config.[/s]

I had forgotten to transfer over the modules when I built the kernel, thus no bluetooth driver