cancel
Showing results for 
Search instead for 
Did you mean: 
Observer
Observer
687 Views
Registered: ‎10-03-2019

How to transfer files via serial port in Xilinx ZCU102

Jump to solution

I am using Xilinx ZCU102 UltraScale+ FPGA board.

I am trying to run AI Vision Example algorithms given by Xilinx AI SDK

I am following this tutorial pdf https://www.xilinx.com/support/documentation/user_guides/ug1354-xilinx-ai-sdk.pdf

I can now connect to the FPGA via the serial port using Putty. I have installed the image file for ZCU102 from website and have successfully booted via sd card. I can connect to the board via serial port in putty which gives me "root@zcu102:~/Desktop"

I want to copy a file from my pc to the board and extract it in order to use the AI sdk examples

**TEXT FROM DOCUMENT**

Step 2: Installing AI Model Package
1. Enter the platform directory, then copy the xilinx_ai_model_ZCU102_2019.1-r1.deb to the
board via scp.
$cd ~/xilinx_ai_sdk_v2.0.x/ZCU102
$scp xilinx_ai_model_ZCU102_2019.1-r1.deb root@IP_OF_BOARD:~/
Note that the deb package can be taken as normal archive, and users can extract the contents on the host
side if users only need part of the models. The operation command is shown below.
$mkdir extract
$dpkg -X xilinx_ai_model_ZCU102_2019.1-r1.deb extract
2. Log in the board (via ssh or serial port), install the model package, and execute below:
#dpkg -i xilinx_ai_model_ZCU102_2019.1-r1.deb
Note the following after the installation is complete.
• Model files are stored in /usr/lib on the target side.

 

Step 3: Installing AI SDK Package
1. Enter the following directory, then copy the xilinx_ai_sdk_2019.1-r1.deb to the board via scp

$cd ~/xilinx_ai_sdk_v2.0.x
$scp xilinx_ai_sdk_2019.1-r1.deb root@IP_OF_BOARD:~/
Note that the deb package can be taken as normal archive, and users can extract the contents on the
host side if users only need part of the libraries. Only model libraries can be separated dependently,
others are common libraries. The operation command is shown below.
$mkdir extract
$dpkg -X xilinx_ai_sdk_2019.1-r1.deb extract
2. Log in the board (via ssh or serial port), install the Xilinx AI   

**END OF TEXT FROM DOCUMENT***

I got stuck now, I cannot copy the file from my pc to the board.

When I try to execute the command given above it gives me error "ssh_init: Name or service not known"

Kindly help me. How to copy files from pc to the FPGA board via serial port?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
557 Views
Registered: ‎05-24-2019

Re: How to transfer files via serial port in Xilinx ZCU102

Jump to solution

@vignesh99 

Hopefully this will give you a better starting point.

[1] Boot the board, connect to the board via USB UART, 119,200 N81.  There are four COM ports, I generally open all of them, but I believe it is the first or second in the sequence of four that is relevant.

[2] Via the UART terminal, configure the IP address of the board such that it is on a subnet which is common to the Ethernet port on your laptop (I typically set the board using this command:  "ifconfig eth0 192.168.0.254").  If you want to double-check the setting, simply run "ifconfig".  This network address is not related to the network (and subnet) of my WiFi connection.

[3] In Windows, configure your wired ethernet IP address such that it is on the same subnet (192.168.0.1).  Set the subnet mask to 255.255.255.0.  Remove the gateway setting.  Windows will AND the subnet mask with the IP address of the board with the net result that only IP packets which have a destination address of 192.168.0.x will be passed on to PuTTY.

[4] Ping back and forth to ensure connectivity between the board and the laptop.  From the laptop, ping 192.168.0.254.  Via the UART terminal, ping the laptop from the board "ping 192.168.0.1".

[5] From the windows command prompt, you should be able to use the PuTTY pscp command to copy the files to the board.  For instance "pscp file.tar.gz root@192.168.0.254:/home".

Based on my recollection, this is all that should be required.

BTW, I wouldn't recommend extracting the tar.gz files on Windows as I recall that there may be some softlink issues that arise.  I generally use a Windows laptop to connect to my board and remote in to my Linux machine to run DNNDK.  Thus, what I do is pscp the ENTIRE tar.gz archives for both DNNDK and the AI SDK to the board and then use "tar -xzvf" to extract the entire archive on the board.  From there, I leverage the instructions found in the documentation to install the necessary board files. 

Also, make sure that after imaging the SD card that you boot the board fully from this fresh card (boot to the command prompt) and then reboot the board before attempting to copy the files.  Note that the Ethernet IP address will be reset on the board each time you power cycle.

Hope this helps!

--Quenton

 

View solution in original post

6 Replies
Highlighted
Xilinx Employee
Xilinx Employee
621 Views
Registered: ‎05-24-2019

Re: How to transfer files via serial port in Xilinx ZCU102

Jump to solution

@vignesh99 

You should connect the board to your PC via Ethernet and set the PC and board to different IP addresses on the same subnet.  For instance, set the PC to 192.168.0.1 and the ZCU102 to 192.168.0.254 (ifconfig eth0 192.168.0.254).  From there you should be able to use either the PuTTY "pscp" command from the Windows command line, or scp under Linux to copy the files to the board.  You want to copy the files over Ethernet, not over the serial port.

Don't use the UART terminal for ssh/scp, simply use the terminal (TeraTerm / Minicom) to configure the Ethernet IP address of the board.

Does this help?

--Quenton

0 Kudos
Highlighted
Observer
Observer
587 Views
Registered: ‎10-03-2019

Re: How to transfer files via serial port in Xilinx ZCU102

Jump to solution

@quentonh 

Hi When i try to connect the board via ethernet it shows me "Net error: Connection refused"

I then manually changed the ip address of the ethernet in control panel->ethernet->properties->Internet Protocol Version 4(TCP/IPv4)

Now my ipconfig output looks like this

___

C:\Users\VigneshVS>ipconfig

Windows IP Configuration


Ethernet adapter Ethernet 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 1:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 3:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter Ethernet 3:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::813f:f928:8ff9:c6fb%17
IPv4 Address. . . . . . . . . . . : 10.201.86.1
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.201.0.1

Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::a944:ab:8eb1:89e2%19
IPv4 Address. . . . . . . . . . . : 10.201.86.252
Subnet Mask . . . . . . . . . . . : 255.255.128.0
Default Gateway . . . . . . . . . : 10.201.0.1

Ethernet adapter Bluetooth Network Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

___

The subnet Mask is automatically created, I didnt change anything.

When I try this new IP address in putty it gives me the same error

How to connect to the ssh, I tried many online resources but I didnt find an answer, thats why I chose serial port previously. 

Kindly guide me on HOW TO CONNECT TO SSH.

I am using Public Wifi at my university, And LAN to USB adaptor to connect to my laptop.

Thank you. 

Eagerly waiting for your reply.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
558 Views
Registered: ‎05-24-2019

Re: How to transfer files via serial port in Xilinx ZCU102

Jump to solution

@vignesh99 

Hopefully this will give you a better starting point.

[1] Boot the board, connect to the board via USB UART, 119,200 N81.  There are four COM ports, I generally open all of them, but I believe it is the first or second in the sequence of four that is relevant.

[2] Via the UART terminal, configure the IP address of the board such that it is on a subnet which is common to the Ethernet port on your laptop (I typically set the board using this command:  "ifconfig eth0 192.168.0.254").  If you want to double-check the setting, simply run "ifconfig".  This network address is not related to the network (and subnet) of my WiFi connection.

[3] In Windows, configure your wired ethernet IP address such that it is on the same subnet (192.168.0.1).  Set the subnet mask to 255.255.255.0.  Remove the gateway setting.  Windows will AND the subnet mask with the IP address of the board with the net result that only IP packets which have a destination address of 192.168.0.x will be passed on to PuTTY.

[4] Ping back and forth to ensure connectivity between the board and the laptop.  From the laptop, ping 192.168.0.254.  Via the UART terminal, ping the laptop from the board "ping 192.168.0.1".

[5] From the windows command prompt, you should be able to use the PuTTY pscp command to copy the files to the board.  For instance "pscp file.tar.gz root@192.168.0.254:/home".

Based on my recollection, this is all that should be required.

BTW, I wouldn't recommend extracting the tar.gz files on Windows as I recall that there may be some softlink issues that arise.  I generally use a Windows laptop to connect to my board and remote in to my Linux machine to run DNNDK.  Thus, what I do is pscp the ENTIRE tar.gz archives for both DNNDK and the AI SDK to the board and then use "tar -xzvf" to extract the entire archive on the board.  From there, I leverage the instructions found in the documentation to install the necessary board files. 

Also, make sure that after imaging the SD card that you boot the board fully from this fresh card (boot to the command prompt) and then reboot the board before attempting to copy the files.  Note that the Ethernet IP address will be reset on the board each time you power cycle.

Hope this helps!

--Quenton

 

View solution in original post

Highlighted
Observer
Observer
518 Views
Registered: ‎10-03-2019

Re: How to transfer files via serial port in Xilinx ZCU102

Jump to solution
I did the same as you stated in my linux pc
It gives me timeout error when i try to use pscp command and also ping.
Why does it give timeout error?
Kindly help
0 Kudos
Highlighted
Observer
Observer
512 Views
Registered: ‎10-03-2019

Re: How to transfer files via serial port in Xilinx ZCU102

Jump to solution
When i try to ping from putty terminal, it gives the following error:
Ping destination host unreachable

0 Kudos
Highlighted
Observer
Observer
479 Views
Registered: ‎10-03-2019

Re: How to transfer files via serial port in Xilinx ZCU102

Jump to solution

I initially forgot to do ifconfig in my linux terminal.  Now I did and successfully got connected to the board via ssh

However When I try to dpkg the transferred file.deb, it gives me some version error

I will try to boot my board via petalinux boot image. Hopefully that would solve the issue I guess. 

Thank you Once again 

0 Kudos