PX4 -> QGC connection through USB for VOXL2
-
What is the recommended workflow to switch between usb0 and wlan0 ????
as when i tried to use voxl-wifi in station mode ,it configured succesfully.
But current IP is still:
voxl2-mini-test-fixture (TF-M0104):~$ voxl-my-ip
usb0: 192.168.7.2
voxl2-mini-test-fixture (TF-M0104):~$ -
If you have multiple active network interfaces, then you need to set up routing rules using standard linux network tools (
ip route ..). You can check the current routes usingip route liston voxl2.voxl-my-ipscript probably just returns the first available ip address. you can useifconfigto check all the interfaces.As an example... assuming your wifi ip range is 192.168.10.x (192.168.10.1 is the wifi router's ip address) and usb0 is 192.168.7.x
# route to the Linux host (192.168.7. subnet) via usb0 sudo ip route add 192.168.7.0/24 via 192.168.7.1 dev usb0 # default route for all other traffic via wlan0 sudo ip route add default via 192.168.10.1 dev wlan0If you want to make these routes persistent you will have to edit
/etc/network/interfaces.. Please check Linux networking documentation.Alex
-
@Alex-Kushleyev Should this work on a Voxl to Windows computer connection? I ran the sed and udev rule commands and how the voxl does indeed come up as an ethernet device upon connecting (UsbNcm Host Device) and I can set up the static IPs appropriately, but I cannot ping one to the other for some reason. I can still use the port as an ADB interface and I thought maybe that was the issue but doing adb kill-server on the windows side still doesn't do the trick
-
@Alex-Kushleyev I saw a post from @tom from a few years ago discussing how there should be the necessary drivers to support an RNDIS gadget so I assume that is my issue. Any insight on how to enable that?
[Apr 1 19:15] configfs-gadget gadget: Wrong NDP SIGN [ +12.232553] usbpd usbpd0: Type-C Source (default) connected [ +0.019411] usbpd usbpd0: USB Type-C disconnect [ +0.004363] android_work: sent uevent USB_STATE=DISCONNECTED [ +0.001100] msm-dwc3 a600000.ssusb: DWC3 in low power mode [ +3.492478] usbpd usbpd0: Type-C Source (medium - 1.5A) connected [ +0.113740] msm-usb-ssphy-qmp 88e8000.ssphy: USB DP QMP PHY: Update TYPEC CTRL(3) [ +0.057403] msm-dwc3 a600000.ssusb: DWC3 exited from low power mode [ +0.068603] usbpd usbpd0: Type-C Source (high - 3.0A) connected [ +0.238255] android_work: sent uevent USB_STATE=CONNECTED [ +0.041534] configfs-gadget gadget: high-speed config #1: c [ +0.000644] android_work: sent uevent USB_STATE=CONFIGURED [ +0.195765] usbpd usbpd0: Type-C Source (medium - 1.5A) connected [ +0.021780] usbpd usbpd0: Type-C Source (high - 3.0A) connected [ +0.179818] configfs-gadget gadget: Wrong NDP SIGN [ +0.000172] configfs-gadget gadget: Wrong NDP SIGN [ +0.069075] configfs-gadget gadget: Wrong NDP SIGN [ +0.002827] configfs-gadget gadget: Wrong NDP SIGN [ +0.176097] configfs-gadget gadget: Wrong NDP SIGN [ +0.001314] configfs-gadget gadget: Wrong NDP SIGN [ +0.001331] configfs-gadget gadget: Wrong NDP SIGN [ +0.250721] configfs-gadget gadget: Wrong NDP SIGN [ +0.491456] configfs-gadget gadget: Wrong NDP SIGN [ +0.000164] configfs-gadget gadget: Wrong NDP SIGN [ +0.000446] configfs-gadget gadget: Wrong NDP SIGN [ +0.067507] configfs-gadget gadget: Wrong NDP SIGN [ +0.000984] configfs-gadget gadget: Wrong NDP SIGN [ +0.012649] configfs-gadget gadget: Wrong NDP SIGN [ +0.183993] configfs-gadget gadget: Wrong NDP SIGN [ +0.001107] configfs-gadget gadget: Wrong NDP SIGN [ +0.211788] configfs-gadget gadget: Wrong NDP SIGN [ +0.030077] configfs-gadget gadget: Wrong NDP SIGN -
@bendraper , If you see an ethernet connection to VOXL2 show up on your Windows host, then the usb gadget is properly configured on VOXL2. Perhaps something else is going on. Are you assigning a static ip on your host that is on the same subnet as VOXL2?
You should try to repeat the same test on a linux machine (or virtual machine) to see if you can get a working connection.
Alex
-
@Alex-Kushleyev Yea I can get a connection on a linux machine with no issue. I do need to get it working on a Windows machine for my purposes though. I definitely have the static IP setup correctly. I tried populating the gateway and also not populating it. I confirmed in powershell that there is indeed a route present for that traffic, but they do not want to communicate with each other. Some quick research seems to suggest Windows is very finicky with the CDC NCM protocol and it is more suited to work with an RNDIS interface. Were you able to ping/ssh to a voxl via an ethernet interface on the usb-c port to a windows machine using just the commands you listed above in this post?
-
@bendraper , I just tried this on a Windows 11 VM and even though i was able to see a network device appear in the VM and i configured the IPv4 properties, I cannot ping or ssh. It seems consistent with what you are seeing.
-
@Alex-Kushleyev It looks like someone on the forums maybe had success setting up the interface as an RNDIS gadget. I'll try to mess with it some more but let me know if you find a solution. Thanks!
-
@bendraper , I will ask around.
-
@Alex-Kushleyev So I can see a gadget functionality called gsi.rndis (I'd expect something called rndis.0 or something but maybe that is irrelevant) but when I change the line in /sbin/usb/compositions/901D to use gsi.rndis instead of ncm.0, my network interface on windows disappears and I can no longer ADB. I'd imagine there's something at the kernal level that doesn't like that but I'm out of my wheelhouse there. Setting it back to ncm.0 returns to the previous state but still cannot ping. Wireshark doesn't even see anything happening over that interface