Enabling USB network

describes how to enable IP via USB

config file

Configuration and startup of interface is done via the D2X startup script D2X.sh

#!/bin/bash
sleep 1
##############################################
# load modules for virtual com-Ports
##############################################
#modprobe configfs
#modprobe libcomposite
#modprobe g_serial use_acm=1
##############################################
# load modules for virtual ethernet via USB
##############################################
modprobe g_ether
sleep 1
########## configuring ethernet ##############
ifconfig usb0 down
sleep 1
ifconfig usb0 192.168.7.2
ifconfig usb0 up

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
##############################################
# D2X
##############################################
cd /home/root/nxpD2X
sleep 1
echo "starting appliaction"
./nxpD2X

enabling USB network on the D2X board

For network via USB uncomment line 12-18 and comment line 6-8 as shown above. Line 17 defines the own IP address.

enabling USB network via RNDIS under windows

To access the D2X board via USB network from Windows the RNDIS network driver needs to be installed. See https://developer.toradex.com/knowledge-base/how-to-install-microsoft-rndis-driver-for-windows-7 for further details.

Set the ip address on the host computer to e.g. 192.168.7.1

With this you can do remote SSH connection via Putty or WinSCP

changing D2X configuration

to run mavlink via the USB network within D2X configuration the following settings need to be changed

TelemetryStreamUDP=1

and TelemetryUDP_IP to be changed to the computers ip adress of the RNDIS virtual IP port.

setting up QGC

QGC - QGroundControl - Intuitive and Powerful Ground Control Station for PX4 and ArduPilot UAVs.

In the QGC menu click on Comm Links and Add

Set Automatically connect on start checkbox and set Listening port to same value than TelemetryUDP_Port in the nxpD2X.conf file.

Last updated