yangyt96.github.io

SSH Communication of Zedboard and PC with Ethernet

Originally, I am searching for the method to do file transfer between a zedboard and pc, then I get to this. From this website, the connection between the zedboard and pc requires a modem router and 2 ethernet cable. However, I don’t have 2 ethernet cables! Instead of connecting your host pc with ethernet cable, you can connect your pc to the modem router through wifi connection.

In this blog, I’m not using the modem router. The connection of my PC and Zedboard is barely an ethernet cable.

I’m using Windows 10 machine and connect the zedboard to my PC with two micro-USB cables. The communication with this channel is called “serial”. To login the linux system of the zedboard, I have installed Tera Term to communicate with the Zedboard.

So, the connection of my PC and the Zedboard is look like this:

connection

Prerequisite

1. Setup PetaLinux on Zedboard.

Checkout this.

File transfer between Zedboard and PC

1. Connect to Zedboard

Open Tera Term and connect to the Zedboard.

tera_term_connect

2. Login to the PetaLinux

login_zedboard

3. Check Zedboard IP Address

Check your ethernet (eth0) IPv4 Address by typing in the following command to tera term terminal.

ifconfig

You will see that the IP address of your Zedboard is not setup. (If you use a modem router, the modem router will help you to setup the IP address.)

zedboard_no_ip

4. Set your own defined IP address

I set it to 169.254.154.249

ifconfig eth0 169.254.154.249

zedboard_new_ip

5. Check you Windows 10 PC internet status

Open you Windows 10: Control Panel > Network and Internet > Network and Sharing Center.

win_ethernet

Then click on the “Ethernet” to confirm that your Windows 10 machine has connected to your Zedboard successfully.

win_ethernet_enable

6. Ping your Zedboard

Open Windows 10 CMD and test whether you can ping to your Zedboard through Ethernet by typing the following command in Windows 10 CMD.

ping 169.254.154.249

ping_zedboard

7. Login to Zedboard through SSH from your PC

If your Windows 10 doesn’t have SSH command, checkout this. You will need to use the SSH client on Windows 10 only, because the PetaLinux runs as SSH server as default.

ssh_zedboard

Notes: You can use the “scp” command to copy file fromt/to Zedboard.

For example, copy to Zedboard

scp <FILE-SOURCE-PATH> root@169.254.154.249:<FILE-DESTINATION-PATH>

Copy from Zedboard

scp root@169.254.154.249:<FILE-SOURCE-PATH> <FILE-DESTINATION-PATH>

Reference

15 Apr 2021 - Yang