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
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Ultra96 Hardware Design Connect via ssh to Ultra96
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 13 replies
  • Answers 1 answer
  • Subscribers 335 subscribers
  • Views 2101 views
  • Users 0 members are here
Related

Connect via ssh to Ultra96

reis220
reis220 over 6 years ago

Hello everyone,

 

How can i issue some commands to Ultra96 via ssh?

The etc/network/interfaces file has static IP for USB connection:

 

# Ethernet/RNDIS gadget (g_ether)

# ... or on host side, usbnet and random hwaddr

iface usb0 inet static

        address 192.168.7.2

        netmask 255.255.255.0

        network 192.168.7.0

        gateway 192.168.7.1

 

I connect the ethernet cable from my pc to the board's micro-USB upstream port, but when i try to connect using 192.168.7.2 address, it does not connect to the board either. Any ideas what might be wrong with the connection?

  • Sign in to reply
  • Cancel

Top Replies

  • ddbabich
    ddbabich over 6 years ago +2 suggested
    Hi, I'm not sure if you ever solved this, however I had the same issue and followed this Xilinx confluence page under the "Ethernet Gadget" section with success: https://xilinx-wiki.atlassian.net/wiki…
Parents
  • ddbabich
    0 ddbabich over 6 years ago

    Hi,

    I'm not sure if you ever solved this, however I had the same issue and followed this Xilinx confluence page under the "Ethernet Gadget" section with success:

     

    https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841729/Zynq+Ultrascale+MPSOC+Linux+USB+device+driver#ZynqUltrasc…

     

    The confluence page looks like it was written for v2016.2 of the tools, however I used 2018.3 and the only thing different was the kernel configuration menu options have changed a bit (the changes are intuitive to figure out), and I used built in configuration <*> instead of module <M> setup.  If you build them into the image, you do not have to do all of the insmod and mount of configfs under the "Testing Procedure".  I also scripted the commands under "Testing Procedure" and set them up to autorun at boot following the methodology described under the section "Application Auto Run at Startup" in the Petalinux Tools Reference Guide https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_3/ug1144-petalinux-tools-reference-guide.pdf .  That way each time you boot the configuration of the USB ethernet and setup of the ip address is done automatically.

     

    One thing to note; I did notice that the step:

    echo "fe200000.dwc3" > UDC

    Will send a console message stating that the device is busy, this did not appear to have an impact on functionality.

     

    For the Device tree section, the entry:

      usb0: usb@fe200000 {

        #address-cells = <2>;

        #size-cells = <2>;

        status = "disabled";

        compatible = "xlnx,zynqmp-dwc3";

        clock-names = "bus_clk", "ref_clk";

        clocks = <&clk125>, <&clk125>;

        dwc3_0: dwc3@fe200000 {

            compatible = "snps,dwc3";

            status = "disabled";

            reg = <0x0 0xfe200000 0x0 0x40000>;

            interrupt-parent = <&gic>;

            interrupts = <0 65 4>;

        };

    };

    is automatically generated in 'zynqmp.dtsi'.

     

    You will need to add the entries:

    &usb0 {

        status = "okay";

    };

    &dwc3_0 {

        status = "okay";

        dr_mode = "peripheral";

    };

    to your 'system-user.dtsi' in your petalinux project.

     

    Also note.  I just used a standard micro-USB cable for this, I did not require any special adapters.  I'm not sure what the discussion of the adapter is referring to though I suspect it to be errant?

     

    Once you boot the target and you've implemented the commands under "Testing Procedure", on your host if you run "ifconfig" (under Linux, probably ipconfig under Windows), you'll see a new ethernet interface listed.  You'll need to assign it an ip address that matches whatever subnet you used for the IP address in the commands under "Testing Procedure".  So for me on my target I assigned 10.10.7.1  so on my host I assigned 10.10.7.2.  After this you can ping, ssh and scp files back and forth.

     

    It appears as though the gadget ethernet is point to point, so host-to-target seems to be all I can get in terms of functionality.  I've not figured out how to bridge it to the rest of the network (and I'm not sure if it was intended to work that way or not).  So when you pick your subnet, choose a different subnet than the rest of your network or your host machine will not be able to communicate with the network while the gadget interface is up and running.  If anyone has a suggestion on how to bridge the network or place the gadget ethernet connection on the same subnet as the host network, I'd appreciate a follow up post.

     

    I hope this helps.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • ddbabich
    0 ddbabich over 6 years ago

    Hi,

    I'm not sure if you ever solved this, however I had the same issue and followed this Xilinx confluence page under the "Ethernet Gadget" section with success:

     

    https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841729/Zynq+Ultrascale+MPSOC+Linux+USB+device+driver#ZynqUltrasc…

     

    The confluence page looks like it was written for v2016.2 of the tools, however I used 2018.3 and the only thing different was the kernel configuration menu options have changed a bit (the changes are intuitive to figure out), and I used built in configuration <*> instead of module <M> setup.  If you build them into the image, you do not have to do all of the insmod and mount of configfs under the "Testing Procedure".  I also scripted the commands under "Testing Procedure" and set them up to autorun at boot following the methodology described under the section "Application Auto Run at Startup" in the Petalinux Tools Reference Guide https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_3/ug1144-petalinux-tools-reference-guide.pdf .  That way each time you boot the configuration of the USB ethernet and setup of the ip address is done automatically.

     

    One thing to note; I did notice that the step:

    echo "fe200000.dwc3" > UDC

    Will send a console message stating that the device is busy, this did not appear to have an impact on functionality.

     

    For the Device tree section, the entry:

      usb0: usb@fe200000 {

        #address-cells = <2>;

        #size-cells = <2>;

        status = "disabled";

        compatible = "xlnx,zynqmp-dwc3";

        clock-names = "bus_clk", "ref_clk";

        clocks = <&clk125>, <&clk125>;

        dwc3_0: dwc3@fe200000 {

            compatible = "snps,dwc3";

            status = "disabled";

            reg = <0x0 0xfe200000 0x0 0x40000>;

            interrupt-parent = <&gic>;

            interrupts = <0 65 4>;

        };

    };

    is automatically generated in 'zynqmp.dtsi'.

     

    You will need to add the entries:

    &usb0 {

        status = "okay";

    };

    &dwc3_0 {

        status = "okay";

        dr_mode = "peripheral";

    };

    to your 'system-user.dtsi' in your petalinux project.

     

    Also note.  I just used a standard micro-USB cable for this, I did not require any special adapters.  I'm not sure what the discussion of the adapter is referring to though I suspect it to be errant?

     

    Once you boot the target and you've implemented the commands under "Testing Procedure", on your host if you run "ifconfig" (under Linux, probably ipconfig under Windows), you'll see a new ethernet interface listed.  You'll need to assign it an ip address that matches whatever subnet you used for the IP address in the commands under "Testing Procedure".  So for me on my target I assigned 10.10.7.1  so on my host I assigned 10.10.7.2.  After this you can ping, ssh and scp files back and forth.

     

    It appears as though the gadget ethernet is point to point, so host-to-target seems to be all I can get in terms of functionality.  I've not figured out how to bridge it to the rest of the network (and I'm not sure if it was intended to work that way or not).  So when you pick your subnet, choose a different subnet than the rest of your network or your host machine will not be able to communicate with the network while the gadget interface is up and running.  If anyone has a suggestion on how to bridge the network or place the gadget ethernet connection on the same subnet as the host network, I'd appreciate a follow up post.

     

    I hope this helps.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • reis220
    0 reis220 over 6 years ago in reply to ddbabich

    How did you connect without ethernet adapter? If you issue ifconfig on your pc does the usb0 option appear? If i connect my micro-usb cable it won't appear any option on ifconfig.

     

    I've added to etc/network/interfaces the following:

     

    allow-hotplug usb0

    auto usb0

    iface usb0 inet static

        address 10.10.7.2

        netmask 255.255.255.0

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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