12 Replies Latest reply on Jun 3, 2019 3:54 AM by ddbabich

    Connect via ssh to Ultra96


      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






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

        • Re: Connect via ssh to Ultra96


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


          • Re: Connect via ssh to Ultra96

            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 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)

            • Re: Connect via ssh to Ultra96


              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:




              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  so on my host I assigned  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.

              1 of 1 people found this helpful
              • Re: Connect via ssh to Ultra96

                Have you tried to enable the USB0 Ethernet on the Ultra96 manually?

                sudo ifup usb0


                Then run 'ifconfig' to see if it shows an ipaddress.