Controlling an RC car with bluetooth

Hi, I am trying to send controls to the Jetson Xavier NX to move an RC car in a direction I want. I intend to use a HC05 bluetooth module and connect to it via my android phone. May I know how can I print or visualize the messages sent so I can use these messages to in turn drive the motor?

Are there any ways I can use the bluetooth that is already in the Xavier NX?

Hello @MrOCW,

In this kind of projects, the string character or integer value sended from control device. In your case, it is your android phone. You should use an interface for sending data on android device. These data is received by Jetson Xavier NX via serial bus. for reading data from serial bus, you can use “gtkterm”, “picocom” or “minicom”.

You can use following commands for “gtkterm” on Xavier.

sudo apt-get install gtkterm

For reading data, it is important to choose right serial port and baudrate.

sudo gtkterm -p <serial_port_path> -s <baud_rate>

As far as I know, there are free bluetooth controlled car interfaces among android applications. You are better to use one of them for testing.

Any application you would recommend? I have installed a few but all of them have trouble connecting with the Xavier NX’s bluetooth.

I have connected with a HC05. But seems like there isn’t any new port appearing in /dev

How do I identify the correct serial_port_path?

I believe the baud_rate is 115200? Also, thanks for the straightforward answer! really needed that instead of the complicated ones available elsewhere

Hi @MrOCW,

I have HC06 bluetooth and I tested it on Jetson AGX Xavier. I have used UART1_TX and UART1_RX pins. The application name is “Bluetooth RC Controller”.

I have converted the codes inside “/etc/systemd/” as comment lines and I rebooted Jetson module. I set the baudrate 9600 because it does not work on 115200. It depends on Android application you used.

sudo gtkterm -p /dev/ttyTHS0 -s 9600

I can see the commands which are coming from my Android device. The process will be same for Jetson Xavier NX. You can check the screenshot from below.

Best wishes.

@ozguryildiz ahh I see. will try it out! Thanks so much for sharing!
For the 9600 baud rate, you are referring to the HC06 Bluetooth?
If I use a joystick interfaced with an arduino nano instead of android as a controller, the baud rate can then be 115200?

Yes, it can be 115200 for joystick. I would try both baudrates in case of problem.