Use Jetson ORIN NX as companion computer

Hello
I’m beginner at this topic.
I want to use Jetson ORIN NX as a companion computer for my application.
I want to use Dronekit or ROS and MAVROS for my final purpose and I want to learn them.

For first step to connect companion computer and FC, I do like as explained in this video and the result is :
Waiting for heartbeat from /dev/ttyTHS1
MAV> link1 down !!

After that I tried with dmesg command for find true UART port that is connected to jetson and don’t find anything!
After all I tried with FTDI Connector and again don’t work. USB FTDI with dmesg command shown in USB0 but don’t work.
Finally I tried minicom to see and test the interface but again I don’t have anything in output.

Then I connect FTDI to FC and Connect USB directly to my PC and check the com port with sscom and etc application. The UART interface works well and data transfer is true.
I try with serial2_protocol = 1(mavlink) and 2(mavlink2), serial2_baud = 1500(1500000).
Can anyone help me?

Regards

@ppoirier @amilcarlucas

There is something wrong in the way you configure and or use the serial port. Try other fixes.

Hello,
On terminal, enter : dmesg -w
An then connect ftdi
Copy and paste here the result

Generally it is a problem related to port acces that can be resolved by being part of modem group. Or you can chmod 777 /dev/ttyUSB0

2 Likes

I checked the port number and as you mentioned I double checked this. See the result :

$ dmesg -w
[ 0.000000] microcode: microcode updated early to revision 0x2e, date = 2023-04-18
[ 0.000000] Linux version 5.15.0-84-generic (buildd@lcy02-amd64-005) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, GNU ld (GNU Binutils for Ubuntu)
.
.
.
[ 25.082758] audit: type=1400 audit(1695721644.035:48): apparmor=“DENIED” operation=“open” profile=“snap.snap-store.ubuntu-software” name=“/etc/appstream.conf” pid=1911 comm=“snap-store” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0
[ 52.234471] usb 1-14: new full-speed USB device number 4 using xhci_hcd
[ 52.413856] usb 1-14: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 52.413868] usb 1-14: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 52.413873] usb 1-14: Product: CP2102 USB to UART Bridge Controller
[ 52.413877] usb 1-14: Manufacturer: Silicon Labs
[ 52.413879] usb 1-14: SerialNumber: 0001
[ 52.441889] usbcore: registered new interface driver usbserial_generic
[ 52.441915] usbserial: USB Serial support registered for generic
[ 52.445815] usbcore: registered new interface driver cp210x
[ 52.445850] usbserial: USB Serial support registered for cp210x
[ 52.445896] cp210x 1-14:1.0: cp210x converter detected
[ 52.446842] usb 1-14: cp210x converter now attached to ttyUSB0

As shown in result, the convertor connected to ttyUSB0 and here the result of mavproxy command :

$ mavproxy.py --master=/dev/ttyUSB0
Connect /dev/ttyUSB0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyUSB0
MAV> link 1 down

:frowning: I don’t know what should I do and what is wrong!

Just like I wrote , type
sudo chmod 777 /dev/ttyUSB0
and launch script

if it works, then try
sudo usermod -a -G dialout $USER
and reboot

The result :

$ sudo chmod 777 /dev/ttyUSB0
user@user:~$ mavproxy.py --master=/dev/ttyUSB0
Connect /dev/ttyUSB0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyUSB0
MAV> link 1 down

Then try launching the script or minicom with sudo to see if you have access to port, otherwise it might be a configuration or hardware problem


I try with minicom.
I set the baudrate on 1500000 and I receive data but as you can see, data not valid.

Mavlink is BINARY , you will sometime see readable characters.
Add baudrate in the launch to reflect the FC configuration
mavproxy.py --master=/dev/ttyUSB0,115200

Thanks! Finally it works!
But still the data is invalid!
You can see the results below :

dorna@dorna-desktop:~$ mavproxy.py --master=/dev/ttyUSB0
WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
Connect /dev/ttyUSB0 source_system=255
ERROR: opening log file for writing: [Errno 13] Permission denied: ‘mav.tlog
Waiting for heartbeat from /dev/ttyUSB0
Unloading module link
Unloading module log
Unloading module signing
Unloading module wp
Unloading module rally
Unloading module fence
Unloading module ftp
Unloading module param
Unloading module relay
Unloading module tuneopt
Unloading module arm
Unloading module mode
Unloading module calibration
Unloading module rc
Unloading module auxopt
Unloading module misc
Unloading module cmdlong
Unloading module battery
Unloading module terrain
Unloading module output
Unloading module adsb
Unloading module layout

As I mentioned before, I am bachelor student and I’m beginner at this topic. My final purpose is connect Jetson ORIN NX to my FC as companion computer and send movement mavlink command as this link and moving to custom direction. Do you have any suggestion for me that I should start with which Companion Computer software tools/suites ? APSync? Dronekit? ROS/MAVROS? MAVProxy? I don’t know which is better to my purpose

Regards

@ppoirier
@amilcarlucas

You are not explaining your purpose in detail. All of the above can do “vehicle movement control”. and you are missing one: pymavlink.

my final purpose is move to custom destination or object/target by vehicle movement control and SET_POSITION_TARGET_LOCAL_NED, SET_POSITION_TARGET_GLOBAL_INT, SET_ATTITUDE_TARGET commands.
Do you suggest pymavlink for this purpose?

Hello and sorry to open more question in here but i have the same board and the same problem.

But when i press ls or chmod for the port /dev/ttyUSB0 it can not find it.

I also tried this command : sudo mavproxy.py --master=/dev/ttyTHS1
and got this response :

WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
Connect /dev/ttyTHS1 source_system=255
Log Directory: 
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyTHS1
MAV> link 1 down

Do i need to uninstall ModeManager ? or i will brake anything?
Also do i need to install minicom ? Because i have problems installing that too.

then i try to press ls /dev/tty* and that it shows :

/dev/tty    /dev/tty22  /dev/tty37  /dev/tty51  /dev/tty9     /dev/ttypd
/dev/tty0   /dev/tty23  /dev/tty38  /dev/tty52  /dev/ttyAMA0  /dev/ttype
/dev/tty1   /dev/tty24  /dev/tty39  /dev/tty53  /dev/ttyGS0   /dev/ttypf
/dev/tty10  /dev/tty25  /dev/tty4   /dev/tty54  /dev/ttyp0    /dev/ttyS0
/dev/tty11  /dev/tty26  /dev/tty40  /dev/tty55  /dev/ttyp1    /dev/ttyS1
/dev/tty12  /dev/tty27  /dev/tty41  /dev/tty56  /dev/ttyp2    /dev/ttyS2
/dev/tty13  /dev/tty28  /dev/tty42  /dev/tty57  /dev/ttyp3    /dev/ttyS3
/dev/tty14  /dev/tty29  /dev/tty43  /dev/tty58  /dev/ttyp4    /dev/ttyTCU0
/dev/tty15  /dev/tty3   /dev/tty44  /dev/tty59  /dev/ttyp5    /dev/ttyTHS0
/dev/tty16  /dev/tty30  /dev/tty45  /dev/tty6   /dev/ttyp6    /dev/ttyTHS1
/dev/tty17  /dev/tty31  /dev/tty46  /dev/tty60  /dev/ttyp7    /dev/ttyTHS3
/dev/tty18  /dev/tty32  /dev/tty47  /dev/tty61  /dev/ttyp8    /dev/ttyTHS4
/dev/tty19  /dev/tty33  /dev/tty48  /dev/tty62  /dev/ttyp9
/dev/tty2   /dev/tty34  /dev/tty49  /dev/tty63  /dev/ttypa
/dev/tty20  /dev/tty35  /dev/tty5   /dev/tty7   /dev/ttypb
/dev/tty21  /dev/tty36  /dev/tty50  /dev/tty8   /dev/ttypc

I tried also this commands if it helps .

lsusb :

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

sudo dmesg -w | grep -i usb :

[    1.570839] usbcore: registered new interface driver usbfs
[    1.576333] usbcore: registered new interface driver hub
[    1.581659] usbcore: registered new device driver usb
[    4.170526] usbcore: registered new interface driver r8152
[    4.176146] hso: drivers/net/usb/hso.c: Option Wireless
[    4.181528] usbcore: registered new interface driver hso
[    4.186985] usbcore: registered new interface driver asix
[    4.192526] usbcore: registered new interface driver ax88179_178a
[    4.198784] usbcore: registered new interface driver cdc_ether
[    4.204775] usbcore: registered new interface driver net1080
[    4.210585] usbcore: registered new interface driver cdc_subset
[    4.216653] usbcore: registered new interface driver zaurus
[    4.222377] usbcore: registered new interface driver sierra_net
[    4.228456] usbcore: registered new interface driver cdc_ncm
[    4.234261] usbcore: registered new interface driver qmi_wwan
[    4.240157] usbcore: registered new interface driver cdc_mbim
[    4.246069] usbcore: registered new interface driver aqc111
[    4.251956] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.268583] tegra-xusb 3610000.xhci: Adding to iommu group 0
[    4.274841] usbcore: registered new interface driver cdc_wdm
[    4.280711] usbcore: registered new interface driver uas
[    4.286179] usbcore: registered new interface driver usb-storage
[    4.292366] usbcore: registered new interface driver option
[    4.298087] usbserial: USB Serial support registered for GSM modem (1-port)
[    4.305236] usbcore: registered new interface driver qcserial
[    4.311127] usbserial: USB Serial support registered for Qualcomm USB modem
[    4.318289] usbcore: registered new interface driver sierra
[    4.324010] usbserial: USB Serial support registered for Sierra USB modem
[    4.342925] usbcore: registered new interface driver xpad
[    6.971331] usbcore: registered new interface driver usbhid
[    6.977056] usbhid: USB HID core driver
[    7.318981] usbcore: registered new interface driver snd-usb-audio
[    9.049654] (null) usb2-0: supply vbus not found, using dummy regulator
[    9.056633]  usb2-1: supply vbus not found, using dummy regulator
[    9.063014]  usb2-2: supply vbus not found, using dummy regulator
[    9.577362] tegra-xusb 3610000.xhci: Firmware timestamp: 2021-12-01 05:27:10 UTC, Version: 80.03 release
[    9.587140] tegra-xusb 3610000.xhci: xHCI Host Controller
[    9.592716] tegra-xusb 3610000.xhci: new USB bus registered, assigned bus number 1
[    9.601378] tegra-xusb 3610000.xhci: hcc params 0x0180ff05 hci version 0x120 quirks 0x0000000000050810
[    9.611007] tegra-xusb 3610000.xhci: irq 232, io mem 0x03610000
[    9.617456] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    9.626002] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.633454] usb usb1: Product: xHCI Host Controller
[    9.638469] usb usb1: Manufacturer: Linux 5.10.104-tegra xhci-hcd
[    9.644755] usb usb1: SerialNumber: 3610000.xhci
[    9.650248] hub 1-0:1.0: USB hub found
[    9.658574] tegra-xusb 3610000.xhci: xHCI Host Controller
[    9.664135] tegra-xusb 3610000.xhci: new USB bus registered, assigned bus number 2
[    9.671933] tegra-xusb 3610000.xhci: Host supports USB 3.1 Enhanced SuperSpeed
[    9.679471] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[    9.687984] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.695424] usb usb2: Product: xHCI Host Controller
[    9.700438] usb usb2: Manufacturer: Linux 5.10.104-tegra xhci-hcd
[    9.706739] usb usb2: SerialNumber: 3610000.xhci
[    9.712003] hub 2-0:1.0: USB hub found
[    9.915332] usb 1-3: new full-speed USB device number 2 using tegra-xusb
[   10.077280] usb 1-3: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[   10.088564] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.102185] usb 1-3: Product: FT232R USB UART
[   10.102189] usb 1-3: Manufacturer: FTDI
[   10.114075] usb 1-3: SerialNumber: AB0OHIEI
[   13.030287] usb-conn-gpio 3520000.xusb_padctl:ports:usb2-0:connector: supply vbus not found, using dummy regulator
[   16.346149] usbserial: exports duplicate symbol usb_serial_resume (owned by kernel)
[   18.500840] usb0: HOST MAC a6:3e:0b:e1:f6:7e
[   18.500843] usb0: MAC a6:3e:0b:e1:f6:7f
[   18.508814] l4tbr0: port 2(usb0) entered blocking state
[   18.508825] l4tbr0: port 2(usb0) entered disabled state
[   18.508959] device usb0 entered promiscuous mode
[   55.784860] usb 1-3: USB disconnect, device number 2
[   56.008708] tegra-xusb 3610000.xhci: entering ELPG done
[   67.386519] tegra-xusb 3610000.xhci: Firmware timestamp: 2021-12-01 05:27:10 UTC, Version: 80.03 release
[   67.623329] usb 1-3: new low-speed USB device number 3 using tegra-xusb
[   67.776944] usb 1-3: New USB device found, idVendor=045e, idProduct=00cb, bcdDevice= 1.00
[   67.776949] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   67.776953] usb 1-3: Product: Microsoft USB Optical Mouse
[   67.776956] usb 1-3: Manufacturer: PixArt
[   67.780932] input: PixArt Microsoft USB Optical Mouse as /devices/platform/3610000.xhci/usb1/1-3/1-3:1.0/0003:045E:00CB.0001/input/input5
[   67.781071] hid-generic 0003:045E:00CB.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt Microsoft USB Optical Mouse] on usb-3610000.xhci-3/input0
[   95.554431] usb 1-3: USB disconnect, device number 3
[   96.281394] tegra-xusb 3610000.xhci: entering ELPG done
[  106.140242] tegra-xusb 3610000.xhci: Firmware timestamp: 2021-12-01 05:27:10 UTC, Version: 80.03 release
[  106.400257] usb 1-3: new full-speed USB device number 4 using tegra-xusb
[  106.577478] usb 1-3: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[  106.577487] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  106.577489] usb 1-3: Product: FT232R USB UART
[  106.577491] usb 1-3: Manufacturer: FTDI
[  106.577492] usb 1-3: SerialNumber: AB0OHIEI
[  106.625472] usbserial: exports duplicate symbol usb_serial_resume (owned by kernel)

For that simple purpose any of the methods will do. I advise you to not use dronekit-python. tough.

Congratulations, probably you are affected by the UART’s bug in Orin NX with JP5.1.1 if you are in that jetpack version.
The good news are that you can:

  1. Solve it using a patch , which installation has a bug and probably will finish in a total lost of data.
  2. Updating to JP 5.1.2 via OTA (apt) which has also other bug with the nvidia carrier boards (so all of them as are the only ones can be updated in that way, funny way how nvidia try minimise the problem with BS) . The good news are that bug also can be patched but there is not clear explanation of how. In that way probably you will have again a total lost of data.
  3. Reflashing to 5.1.2 with total lost of data.
    Note some 3rd party carrier boards are having serious issues to can update in the only supported way, due to dtb issues. If you use 3rd party carrier check before try upgrade.

More good news are you can avoid lost of data making backups, probably won’t work in the 90% cases, but who knows, maybe you are lucky, I wasn’t, (6 times)

If you are in JP 5.1.2 , congratulations it looks you both found a new bug. Report it, I sure it will be fixed in the next JP 6 months ahead.

Every bug I refer are properly hidden in the dev forums, and release notes in pdf, best way the bugs doesn’t appear in search engines.