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
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 317 subscribers
  • Views 1896 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…
  • jafoste4
    0 jafoste4 over 6 years ago

    Hi,


    Are you using the out of box image with the board to connect via SSH?

    -Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • reis220
    0 reis220 over 6 years ago in reply to jafoste4

    No, i am using a Petalinux generated image. But the Petalinux configuration doesn't offer other ethernet settings, it only provides "manual" option.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 100sbeaudoin
    0 100sbeaudoin over 6 years ago

    reis220  wrote:

    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?

    You mean you have a USB to Ethernet adapter? You HAVE to have one since there is no ethernet jack on the board. And the usb upstream port isn't a usb->ethernet adapter

     

     

     

    When you issue a simple 'petalinux-config' command, in the ethernet section it is normal to only have the 'manual' option. This section lists the physical/genuine/hardware ethernet ports. In vivado, when you use the ultra96 board files and you click apply board presets, it configures the zynqMP ip with the settings found in the board files. Since there is no ethernet jack, the board files do not activate any of the GEM (gigabit ethernet mac). When you export the hardware, that configuration is passed along in the HDF file. When petalinux opens it and parse the hardware configuration, it detects that there is no genuine ethernet support, thats why you don't see the option in the 'petalinux-config' menu. You must probably know that there are several configuration menus in petalinux. The simple 'petalinux-config' is the global one; the "Xilinx" one. The 'petalinux-config -c kernel' is the same as when you do a 'make menuconfig' when compiling the linux kernel, so the petalinux command is in fact a wrapper. It will be in this menu that you will have to find and enable the linux driver for the USB to Ethernet adapter (usb gadget something if i remember, just look it up)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • reis220
    0 reis220 over 6 years ago in reply to 100sbeaudoin

    100sbeaudoin  wrote:

    You mean you have a USB to Ethernet adapter? You HAVE to have one since there is no ethernet jack on the board. And the usb upstream port isn't a usb->ethernet adapter

     

    Yes, I have a USB to Ethernet adapter and i use it to connect from my PC to the board.

     

    100sbeaudoin  wrote:

    And the usb upstream port isn't a usb->ethernet adapter

    What do you mean? Can't i use the board's usb upstream port to connect to my PC via ssh? Do i have to use other usb port?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • reis220
    0 reis220 over 6 years ago in reply to 100sbeaudoin

    100sbeaudoin  wrote:

    It will be in this menu that you will have to find and enable the linux driver for the USB to Ethernet adapter (usb gadget something if i remember, just look it up)

    Do i need to enable only on petalinux-config -c kernel? Do i have to modify any device trees too? If yes, what device trees?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 100sbeaudoin
    0 100sbeaudoin over 6 years ago in reply to reis220

    Unlike 'platform devices' which  are the ones you  have to make mention in the devce tree because they cant be discovered  at runtime, with usb devices you dont have to mention them in the device tree because they can be discovered at runtime. BUT, in case of usb, for a particular vid:pid, the kernal has to be aware if a driver is available to bind to it. Hence you have to include the driver of the gadget in the config of the kernel. It can either be compiled in the kernel or as a module.

     

     

    And yes obviously you can use the board's usb port to plug the adapter in it. What i meant is that indeed you have to plug an adapter, just pluging a micro usb usb cable from the pc into the micro usb wont work

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 100sbeaudoin
    0 100sbeaudoin over 6 years ago in reply to 100sbeaudoin

    Only the usb driver in 'petalinux -c kernel' has to be enabled for it to work. I will provide a step by step instructions monday

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • reis220
    0 reis220 over 6 years ago in reply to 100sbeaudoin

    Ok, thank you for your readiness. I'll be waiting for the instructions.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • reis220
    0 reis220 over 6 years ago in reply to 100sbeaudoin

    100sbeaudoin Could you provide me the instructions please?

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