element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 5834 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
Parents
  • 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
Comment
  • 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
Children
No Data
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