RFCOMM TTY support not available on Jetson Nano

Hello everyone,
I know there are similar questions already asked in the forum. I tried following all the solutions mentioned in these forums and it is not working out for me.

We are facing an issue “RFCOMM TTY support not available” when we try to receive data via serial communication over Bluetooth. We need to configure the nano’s WiFi adapter via a phone app connected by Bluetooth. We are able to get serial communication over Bluetooth to work on linux machine(ubuntu 18.04lts) from the below steps.

       sudo nano /etc/systemd/system/dbus-org.bluez.service;
       ExecStart=/usr/lib/bluetooth/bluetoothd -C;
       ExecStartPost=/usr/bin/sdptool add SP;    
       sudo reboot 

However, when we tried the same thing on Jetson nano, while binding the device with $ sudo rfcomm bind 0 xx:xx:xx:xx:xx:xx. got an error message “RFCOMM TTY support not available”. When the bluez.service file is appended with that -C option, even the Bluetooth service is failing.

We found out on the Tech forums that for the above error, we need to recompile the kernel and enable the rfcomm tty support there. For this we followed the steps shown in this tutorial NVIDIA Jetson Nano - Docker optimized Linux Kernel · Docker Pirates ARMed with explosive stuff . As shown in this tutorial, in the menuconfig panel,I enabled the “RFCOMM TTY support”, which was under the “Networking support/Bluetooth subsystem support”. But when I tried to recompile the kernel, I got the following error and the build was not successful.

/home/jetbot/kernel/nvidia/drivers/video/tegra/dc/hdcp/hdmihdcp.c: In function ‘link_integrity_check’:
/home/jetbot/kernel/nvidia/drivers/video/tegra/dc/hdcp/hdmihdcp.c:1940:16: error: unused variable ‘nonce’ [-Werror=unused-variable]
unsigned char nonce[HDCP_NONCE_SIZE];
^~~~~


scripts/Makefile.build:649: recipe for target ‘drivers/video/tegra/dc’ failed
make[3]: *** [drivers/video/tegra/dc] Error 2
scripts/Makefile.build:649: recipe for target ‘drivers/video/tegra’ failed
make[2]: *** [drivers/video/tegra] Error 2
scripts/Makefile.build:649: recipe for target ‘drivers/video’ failed
make[1]: *** [drivers/video] Error 2
Makefile:1104: recipe for target ‘drivers’ failed
make: *** [drivers] Error 2

real 2m31.729s
user 3m2.588s
sys 0m39.596s

So, we are not able to get RFCOMM TTY support enabled in Nano. We need help on this. Any suggestions would really be appreciated.

Best Regards,
Krishna R

For the kernel compilation, I think your problem is you are using menuconfig but you don’t know the dependency of each driver. Thus, it turns out some unnecessary build error comes too.

Generally, we have official document as below to teach user how to build kernel.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/kernel_custom.html#

The tegra_defconfig in the build command is a pre-defined list that is used for building the same kernel as in jetpack. If you are using menu_config, it means you will ignore our pre-defined list and start with your own configuration. Under such case, the error may happen as your current situation.

I would suggest you can try to figure out what driver is RFCOMM TTY support needed and add them to tegra_defconfig one by one.

1 Like

Hello,
Thanks for your reply.

Now we are able to bind the device successfully with $ sudo rfcomm bind 0 xx:xx:xx:xx:xx:xx. It was during this step that “RFCOMM TTY support not available” error was shown and now it is enabled.

  1. But still when the bluez.service file is added with the below line
    ExecStartPost=/usr/bin/sdptool add SP;
    The Bluetooth service is failing. In the settings page it shows Bluetooth is disabled.
    So for now, we have considered commenting that line out and proceed.

  2. If tried to run the command $sudo sdptool add SP , it just executes and does nothing. Then if we check it through $sdptool get SP
    Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory
    By the way, the same command when ran on my ubuntu machine it shows serial port service registered.

  3. If we run the command
    $sudo killall rfcomm
    $sudo rfcomm listen /dev/rfcomm0 N picocom -c /dev/rfcomm0 --omap crcrlf
    or
    $sudo rfcomm listen /dev/rfcomm0
    it shows waiting for connection, next if we try to establish connection from the app side, it just toggles on & off the connection button( which can be seen the bluetooth settings page) and it won’t be connected.

What might be the problem?
So it would be really helpful if we get some help on this.
Thanks,

Best Regards,
Krishna R