element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Blog Enabling USB Gadget Ethernet on the Ultra96-V2
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: narrucmot
  • Date Created: 23 Oct 2020 8:20 PM Date Created
  • Views 5482 views
  • Likes 5 likes
  • Comments 7 comments
  • ultra96-v2
  • rndis
  • usb ethernet
  • petalinux
  • ultra96
  • designed by avnet
  • usb gadget
  • linux
Related
Recommended

Enabling USB Gadget Ethernet on the Ultra96-V2

narrucmot
narrucmot
23 Oct 2020

You have an Ultra96-V2 board, but want more data throughput than the on-board WiFi can provide.  What do you do?  A USB-to-Ethernet adapter (USB 3.0 GbE adapterUSB 3.0 GbE adapter) is inexpensive and provides excellent throughput, but requires a wired Ethernet infrastructure.  Likewise, modern laptops often do not have a wired Ethernet jack but have lots of USB ports.  That makes USB gadget Ethernet a compelling solution to get a high throughput connection.  We often get asked on the Element14 forums (Ultra96 Hardware Design Forum) about how to enable USB gadget Ethernet on the Ultra96-V2 board, and thanks to a helpful forums user and some other helpful internet links we now have a solution.  Starting with the PetaLinux 2020.1 BSP for the Ultra96-V2 this is now built into the OS image, and can can be manually added to older PetaLinux BSPs.

 

Here is the link to the Ultra96-V2 USB gadget Ethernet shell script on github:

https://github.com/Avnet/meta-avnet/blob/master/recipes-apps/usb-gadget-ethernet/files/usb_gadget_ethernet.sh

 

Hardware you will need:

  • Ultra96-V2Ultra96-V2
  • Ultra96-V2 USB UART / JTAG adapterUltra96-V2 USB UART / JTAG adapter
  • Ultra96-V2 4A power supplyUltra96-V2 4A power supply
  • USB 3.0 A/Micro-B Cable, 3 ft.USB 3.0 A/Micro-B Cable, 3 ft. or  USB 3.0 A/Micro-B Cable, 6 ft.USB 3.0 A/Micro-B Cable, 6 ft.
  • USB micro-B cable (for UART connection)
  • Linux PC with at least two available USB ports (USB 3.0 preferred for Ethernet)

 

How to Enable USB Gadget Ethernet on the Ultra96-V2 Board

In the PetaLinux 2020.1 BSP OS image for the Ultra96-V2 the USB gadget Ethernet startup script can be found in the root user's home folder (/home/root) and can be run from there.  Connect the Ultra96-V2 board to the PC with the USB cables for the UART (J1 on the UART adapter) and Ethernet (J7). Boot your Ultra96-V2 board and run the USB gadget Ethernet startup script:

# cd ~

# ./usb_gadget_ethernet.sh

image

The script will run and bring up the 'usb0' Ethernet interface with a static IP address of 192.168.3.1.  This is customizable in the script if this conflicts with another LAN.

 

If running a Linux virtual machine be sure to select the new USB device for use in the Linux guest OS:

image

 

Disable the other Ethernet interfaces on the host PC (both wired and WiFi) and assign the USB gadget Ethernet on the host a static IP address (e.g. 192.168.3.3).  In this case the Linux host named this interface 'enp0s12u3', but it could have a different name on other PCs:

$ sudo ifconfig enp0s12u3 192.168.3.3

image

Do a ping test on the Ultra96-V2 to verify the USB Ethernet connection is active.

# ping 192.168.3.3 -I 192.168.3.1

image

If you have iperf3 installed on the Linux host you can run a iperf3 throughput test between the Ultra96-V2 board and the host.

Run the iperf3 server on the Linux host:

$ iperf3 -s -i 2 -B 192.168.3.3

image

Run the iperf3 client on the Ultra96-V2 target:

# iperf3 -c 192.168.3.3 -i 2 -t 20 -B 192.168.3.1

image

 

We now have an active Ethernet connection over USB 3.0 that can achieve over 200 Mbps Ethernet throughput!  This Ethernet connection can now be used for remote access over ssh, copying of files, debugging software, etc.  Anything that requires a connection to the board, but requires more bandwidth than a UART or WiFi can provide.

 

Reference Links:

https://www.element14.com/community/message/295530/l/re-ultra96-v2-usb-otgdevice-port#295530

http://irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/

 

  • Sign in to reply
  • gustandil
    gustandil over 3 years ago in reply to gustandil

    I answer my self. This error with the image from Vitis AI 1.4 example

    http://avnet.me/avnet-u96v2_sbc_base-vitis-ai-1.4-image

    I downloaded a previous one (vitis 1.2)

    http://avnet.me/avnet-ultra96v2-vitis-ai-1.2-image

    And it works perfectly (the script is the same).

    Best Regards, G

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • gustandil
    gustandil over 3 years ago

    Hi,

    I follow the instruction and running the script obtaining in the windows side:

    image

    Looking to the drivers

    image

    I tried to update drivers, but it is not the solution.

    In the other hand, when I use the Pynq image (2.6 or 2.7), everything goes smooth.

    I tested in different Windows machines and in a native ubuntu 20.04 with same results.

    Any suggestion?

    Best Regards, G

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • harada
    harada over 3 years ago

    Thank you.

     

    The u96v2_sbv_vitis_2020_2.tar.gz image I got also contains this script and I was able to use it.

    Currently I run the script after logging in via UART, but is there an easy way to run this automatically at boot time?

     

    On Ubuntu, there seems to be a way to use /etc/rc.local, but

    However, this does not seem to be available in this environment.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • albertabeef
    albertabeef over 4 years ago

    Thank you Tom,

    This write-up was exactly what I was looking for to get X11 forwarding working between the Ultra96-V2 and my Windows 10 PC image

    I needed to configure the TCP/IPv4 Properties for the detected RNDIS ethernet driver for a static IP address of 192.168.3.2 to match the address of the Ultra96-V2, which is 192.168.3.1.
    Works smooth, thanks again !
    Mario.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jomoenginer
    jomoenginer over 4 years ago

    I'm attempting to run on this to connect a Ultra96-V2 to a Windows 10 64-bit host but the RNDIS driver keeps failing to configure for the Ultra96-V2. The same system works fine with a BealgeBone and RNDIS and I can run the same Ultra96-V2 on a newer Laptop which has USB 3.0 ports just fine.  The PC with the issue has USB 2.0 only so I am not sure if that is an issue.  The same issue is seen with the latest PYNQ build as well on the same Ultra96-V2

     

    This is what I see when I run the './usb_gadget_ethernet.sh':

    root@ultra96v2-2020-1:~# ./usb_gadget_ethernet.sh
    [   59.707878] using random self ethernet address
    [   59.712351] using random host ethernet address
    [   59.753994] usb0: HOST MAC 46:16:d2:30:82:51
    [   59.758516] usb0: MAC 46:c4:69:f4:2e:5b
    **************************************
    Assigned static IP 192.168.3.1 to usb0
    **************************************
    root@ultra96v2-2020-1:~# [   60.075918] configfs-gadget gadget: high-speed config #1: c
    [   60.081682] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready

     

    It just hangs here.

    Also, Device Manager on the Windows host show this for the RNDIS driver:

    The drivers for this device are not installed. (Code 28)
    
    There are no compatible drivers for this device.
    
    
    To find a driver for this device, click Update Driver.

     

    image

     

     

    Updating the driver does not correct the issue.

     

    Looking at this from a Ubuntu VM on the Windows 10 host, it does seem to show an available device and I can assign it to the VM

    image

    However, after setting an IP on the VM, the device eventually is disabled and I can not connect to it.

     

    root@ultra96v2-2020-1:~# ./usb_gadget_ethernet.sh
    [  122.382132] using random self ethernet address
    [  122.386596] using random host ethernet address
    [  122.430007] usb0: HOST MAC 3e:b8:e2:b5:65:77
    [  122.434542] usb0: MAC 6a:14:8d:af:fe:ef
    **************************************
    Assigned static IP 192.168.3.1 to usb0
    **************************************
    root@ultra96v2-2020-1:~# [  122.752931] configfs-gadget gadget: high-speed config #1: c
    [  122.758683] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
    [  354.594248] configfs-gadget gadget: high-speed config #1: c
    [  354.821476] NOHZ: local_softirq_pending 08
    [  354.828565] NOHZ: local_softirq_pending 08
    [  354.893991] NOHZ: local_softirq_pending 08
    [  355.056230] NOHZ: local_softirq_pending 08
    [  355.917453] NOHZ: local_softirq_pending 08
    [  355.921580] NOHZ: local_softirq_pending 08
    [  355.932096] NOHZ: local_softirq_pending 08
    [  356.332602] NOHZ: local_softirq_pending 08
    [  356.453534] NOHZ: local_softirq_pending 08
    [  356.619673] NOHZ: local_softirq_pending 08

     

    image

     

    Are there any known conflict on Windows 10 with the RNDIS driver for the Ultra96-V2?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube