Pixhawk Connection


I’m trying to use PX4. I have successfully install mavros after building ttyACM kernel.

Now, I’m trying to use dronekit, a high level interface for pymavlink. And for dronkit to work, it needs a connection string. i.e form my desktop it is “/dev/ttyACM0”

And obviously I’m asking it because JTX2 doesn’t work for it.

When I dmesg | grep tty

[ 0.000000] Linux version 4.4.38JTX2-ttyACM (root@tegra-ubuntu) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) ) #1 SMP PREEMPT Thu Mar 8 02:10:28 UTC 2018
[ 0.000000] Kernel command line: root=/dev/mmcblk0p1 rw rootwait console=ttyS0,115200n8 console=tty0 OS=l4t fbcon=map:0 net.ifnames=0 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 nvdumper_reserved=0x2772e0000 gpt tegraid= tegra_keep_boot_clocks maxcpus=6 androidboot.serialno=0322717087355 bl_prof_dataptr=0x10000@0x277240000 sdhci_tegra.en_boot_part_access=1 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
[ 0.014458] console [tty0] enabled
[ 0.466058] console [ttyS0] disabled
[ 0.466102] 3100000.serial: ttyS0 at MMIO 0x3100000 (irq = 37, base_baud = 25500000) is a Tegra
[ 2.555781] console [ttyS0] enabled
[ 2.557752] 3110000.serial: ttyTHS1 at MMIO 0x3110000 (irq = 38, base_baud = 0) is a TEGRA_UART
[ 2.558883] c280000.serial: ttyTHS2 at MMIO 0xc280000 (irq = 39, base_baud = 0) is a TEGRA_UART
[ 2.559966] 3130000.serial: ttyTHS3 at MMIO 0x3130000 (irq = 40, base_baud = 0) is a TEGRA_UART
[ 19.860817] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ 21.239517] usb usb1: Manufacturer: Linux 4.4.38JTX2-ttyACM xhci-hcd
[ 21.254887] usb usb2: Manufacturer: Linux 4.4.38JTX2-ttyACM xhci-hcd
[ 1399.876216] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device
[ 1405.839545] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device

It doesn’t show PX4. So, I typed dmesg | grep PX4

[ 1399.850620] usb 1-1.1: Product: PX4 BL FMU v2.x
[ 1405.814596] usb 1-1.1: Product: PX4 FMU v2.x

Does it mean that the computer recognizes my pixhawk? I think it should because for mavros to work, it must have installed a driver or some…

Is there a way to find out the location of the connection such as /dev/ttyACM0 …?

I know nothing about this software or hardware, but if a connection string is required, then probably your mavros is the one which defines the string (each side of a serial port requires being set to the same settings for speed, parity, so on, but this is not a connection string…the connection or any string would be a format defined by the recipient of the string…the mavros).

Note that USB devices can have more than one device on a single cable. ttyACM implies a serial UART, which is a pipe for serial characters (this might not be the only device the cable provides). The same cable could (I’ve never seen a pixhaw, I’m just speculating) define a second interface for something like a pixhawk control function. In this case it might be both a serial UART and a control function (e.g., the UART for data, the other interface for some sort of drone setup).

When USB lists a device it sees the device will have either a custom interface or a USB standard class interface. In either case the hot plug layer will broadcast the presence of a new device of whatever class or specification the USB device claims to be. Drivers which understand that device (or devices) will claim ownership if they exist (standard classes can use a generic driver, custom classes need the vendor to produce a specific driver just for their hardware). This dmesg content is USB broadcasting what it sees, but is not in and of itself a driver for the device:

[ 1399.850620] usb 1-1.1: Product: PX4 BL FMU v2.x
[ 1405.814596] usb 1-1.1: Product: PX4 FMU v2.x

What do you see from:

ls /dev/ttyACM*

When a device is visible, but no driver has claimed ownership, it means you probably need a driver. In the case of a serial UART USB announces this, and a UART driver claims ownership (this is in fact what creates the “/dev/ttyACM*” files…the UART driver loading…the presence of any ttyACM file implies the driver took ownership…the lack of ttyACM files implies no driver took ownership). Even so, you may need other software to talk to the UART…one driver can require another which can require another, so on. At some point it becomes a user space program and it isn’t really a driver at that point, it becomes an end user of the driver.

So someone else may have experience with this, but in the end I think it’ll work out as needing to research what driver or program is required for this hardware. Once that is in place it’ll probably work.

Thank you for the reply. I will look into the driver more.

Meanwhile, I tried to flash an image to TX2 and I accidentally broke the usb port. I know from now on it’s a differnt topic… But, is there a way that I can only replace the development board? - the soldering region is totally torn off.

If you are asking if the dev carrier board can be purchased separately, then the answer is probably “no”. There are other carrier boards which can be purchased and used for flash, but beware that although you could flash anything to the Jetson, different boards won’t actually run correctly if you don’t flash the BSP for that particular carrier (you can flash for the dev board on an alternative carrier, then move the module back to the dev board…the same flash won’t run correctly on both boards simultaneously).

Did anyone got connection between pixhawk and jetson tx2 ? If so can anyone please explain the process. As i was trying it from long time but could not get it. Please point in the right direction as i have surfer enough. Thank you in advance.

could you connect tx2 to pixhawk ? I am having the same trouble