RNDIS Setup (Windows)

Windows hosts do not support CDC-ECM devices. To connect to the boards using USB Ethernet on Windows hosts, you need to configure an RNDIS interface instead.

Steps

  1. Modify $BUILD_DIR/conf/local.conf. Find the line:

    # USB_GADGET_FUNCTION = "ecm"
    

    Uncomment and change it to:

    USB_GADGET_FUNCTION = "rndis"
    
  2. Rebuild rity-demo-image.

  3. Flash the updated rity-demo-image.

  4. Connect USB0 to host PC. You might find the device cannot be detected properly.

  5. Press Windows+R and type devmgmt.msc then press ENTER

  6. Right-click on the unrecognized RNDIS/Ethernet Gadget device, and select Update Driver Software:

    ../../../../_images/sw_rity_get-started_connect_missing-rndis.png
  7. Select Browse my computer for driver softwareLet me pick from a list of device drivers on my computerNetwork adapters

    ../../../../_images/sw_rity_get-started-_connect_net-adapters.png
  8. Select Microsoft CorporationRemote NDIS Compatible Device

    ../../../../_images/sw_rity_get-started-_connect_rndis.png
  9. You should see an additional network adapter appear in Network and Sharing Center.

  10. Set the Static IP of the adapter to:

    • IP: 192.168.96.2

    • Subnet Mask: 255.255.255.0

    • Default Gateway: 192.168.96.1

After static IP setting, you should now be able to proceed to next section to connect to the board with SSH.

Connecting using the board IP

The USB CDC-ECM interface in rity-demo-image is configured with the following static IP: 192.168.96.1.

You can connect to the board using the following command:

ssh root@192.168.96.1
root@i350-evk:~#

You can also use scp programs to copy files to the board:

scp host-file.txt root@192.168.96.1:/path/to/target/directory

Connecting by using mDNS

AIoT Yocto also includes a mDNS server avahi daemon to provide device discovery.

The host name of the board is in the form <machine>.local, where <machine> is the value of MACHINE variable that was used to build the SDK.

For instance you can connect to the i350-evk board with the host name i350-evk.local by using the following command:

ssh root@i350-evk.local
root@i350-evk:~#

Hint

It is recommended to modify /etc/avahi/avahi-daemon.conf and set host-name to change the host name of the board to something unique if there are multiple boards of the same model connected to the same network. And run systemctl restart avahi-daemon to take effect.