> For the complete documentation index, see [llms.txt](https://nxp.gitbook.io/d2x/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nxp.gitbook.io/d2x/software/d2x-application/enabling-usb-network.md).

# Enabling USB network

## config file&#x20;

{% hint style="info" %}
Configuration and startup of interface is done via the D2X startup script\
*D2X.sh*
{% endhint %}

```
#!/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

## running mavlink via the USB network

### changing D2X configuration

to run mavlink via the USB network within [D2X configuration](/d2x/software/d2x-application/d2x-configuration.md) 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.&#x20;

### setting up QGC

{% hint style="info" %}
QGC - [QGroundControl](http://qgroundcontrol.com/) - Intuitive and Powerful Ground Control Station for PX4 and ArduPilot UAVs.
{% endhint %}

In the QGC menu click on *Comm Links* and *Add*

![](/files/-LGyCr9CZUZ_ckeODLDA)

Set A*utomatically connect on start*  checkbox and set *Listening port* to same value than *TelemetryUDP\_Port* in the nxpD2X.conf file.&#x20;

![](/files/-LGyCunLY_CJawQnfrpC)
