PX4 -> QGC connection through USB for VOXL2
-
Is there a way to connect VOXL2 PX4 to QGC via USB? On the VOXL Flight this was done through the J1006 connector.
In addition to this, is there a J1003 (Connector on the VOXL Flight) equivalent on the VOXL2. This would allow me to connect a Crossfire Nano RX to it.
Thanks!
-
Not at this time.... but it's something I'm wanting to try out!!
I'm not clear if it's possible, but what I'm thinking of trying is UDP tunneling over ADB.
ADB supports TCP port forwarding, but our traffic from vehicle to QGC is UDP.... so I believe we can try a tunnel?
Here's the two links I was looking at trying:
https://developer.android.com/studio/command-line/adb#forwardports
http://www1.cs.columbia.edu/~lennox/udptunnel/Throwing it out here in case someone already knows if this is possible or not! If it is, I think it's an easy way to get the connection going....
-
@rohitpillai Not exactly what you're looking for but you could also use one of the supported ethernet dongles attached via. USB to JST to a VOXL2 add-on board and route PX4 traffic through there to your ground station. As seen here: https://docs.modalai.com/voxl2-hardware-setup/#ethernet-connectivity
-
Thank you for your replies! I will check these links out.
-
@modaltb Hii, is there any update on this?
-
@Sarika-Sharma It's not something we currently support
-
We discussed this internally and we will make an effort to formalize enabling the instructions (in a script) in the near future, but there is a relatively short way of enabling TCP/IP communication between VOXL2 and a QGC host. Please try these instructions and let us know if that works for you or what issue you run in to.
Basically, there is a command to enable the usb gadget in the kernel and this creates the network interface which you then have to configure on both sides. You can change the IP range if necessary.
Alex
# VOXL2 Setup # Begin by configuring the usb gadget sed -i '/ln -s functions\/ffs.adb configs\/c.1\/f2/a \ ln -s functions\/ncm.0 configs\/c.1\/f3 2>\/dev\/null | true' /sbin/usb/compositions/901D # Next setup a udev rule to give our NCM device a static IP (192.168.7.2) echo 'ACTION=="add", SUBSYSTEM=="net", KERNEL=="usb0", RUN+="/bin/sh -c '"'"'sleep 2; /sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.0 up'"'"'"' > /etc/udev/rules.d/80-usb-ncm.rules # Reboot VOXL2 # Check usb0 network device voxl2:/$ ifconfig usb0 usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.7.2 netmask 255.255.255.0 broadcast 192.168.7.255 inet6 fe80::935f:1a09:ab1d:d2fb prefixlen 64 scopeid 0x20<link> ether 56:77:2d:6c:84:9b txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 # Host Side Configuration - note that a network manager may rename the device from usb0 to something else.. ifconfig usb0 usb0: flags=4098<BROADCAST,MULTICAST> mtu 1500 ether fa:74:5a:f3:2b:88 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 #bring up the interface and set it to static ip sudo ip addr add 192.168.7.1/24 dev usb0 sudo ip link set usb0 up # Can also use Network manager to configure the network interface for a static configuration - address 192.168.7.1 - netmask 255.255.255.0 - gateway 192.168.7.1 # ping VOXL2 from linux host - ping 192.168.7.2 #set up QGC - use ip address:port : 192.168.7.2:14550 You can also use other network tools like ssh, etc, to communicate to the host, but this setup does not enable you to communicate from VOXL2 to outside world (using NAT to enable internet access via the host) -
Thankyou so much @Alex-Kushleyev
This setup solves my use case where Wi-Fi is not available. Thanks for the support — looking forward to the scripted version in the future.Best regards,
Sarika