• 0
jacobfeder

Zybo serial port in Ubuntu

Question

Hi,

I have a design running on a Zybo (basically the Hello World example project) and am trying to connect to the device post-programming over the serial port. The device programs fine (I installed the Digilent USB drivers) but I can't figure out how to connect to view the incoming serial port data. I have tried connecting both from Xilinx SDK using the terminal and also with mini/picocom. SDK says "nothing found at port: ttyUSBx" for both USB0 and USB1. Picocom cannot detect anything on ttyUSB0. It connects to USB1 but nothing is displayed. Which should I be connecting to, USB0 or USB1?

 

Thanks,

Jacob

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Hi @jacobfeder,

Here is some information that should help. I used screen on Thursday to get my VM  with ubuntu running my vivado/sdk 2016.4 project working with the terminal. Remember the baud for zynq architecture is 115200. 

cheers,

Jon

Share this post


Link to post
Share on other sites
  • 0

Can you explain more please? What do I need to do exactly? More info: after programming the device from SDK, /dev/ttyUSB0 disappears and can't be connected to.

 

Thanks,

Jacob

Share this post


Link to post
Share on other sites
  • 0

Hi @jacobfeder,

I first made sure that i was part of the dailout group  

sudo adduser $USER dialout

then I

sudo apt-get install screen

then I'n my case I needed to use ttyUSB1

look in dev to see if ttyusb0 or ttyusb1 is available?

I believe the command i used was:

screen /dev/ttyUSB1 115200

the bottom picture is the terminal showing the serial terminal data.

cheers,

Jon

screenshots.odt

Share this post


Link to post
Share on other sites
  • 0

@jacobfeder

 

I had your same problem once. This is my configuration for Putty.

You can get Putty by opening up and terminal and typing

sudo apt-get install putty

As jpeyron said, you should make sure you are added to the user group, but you can also bypass that by opening a terminal and doing

sudo putty

The pictures show the configuration I use. You may have to edit the /dev/ttyUSB1 and try like /dev/ttyUSB0, /dev/ttyUSB2, /dev/ttyUSB3. The last number depends on which USB port you plug the device into.

It doesn't really matter whether you use screen, putty, or the SDK console, as long as the computer knows where to look for your device and the communication settings are like in the second picture.

 

 

 

PuttyConfig1.png

PuttyConfig2.png

Share this post


Link to post
Share on other sites
  • 0

Hi,

When I open screen or putty from my terminal and configure serial port /dev/ttyUSB0 with baud rate 115200, putty opens with black screen and green cursor.

Can somebody help me with this?

 

Regards,

Share this post


Link to post
Share on other sites
  • 0

@jacobfeder,

Here's some handy tips for using serial ports in Linux

Open a terminal window in Linux

Find out what USB devices have been enumerated: Enter the command 'lsusb' to see a list of enumerated devices. You can get more information by adding -v or -vv command line arguments

Find out what Serial port devices are available: Enter the command 'dmesg | grep tty' to see what serial ports are available and what name to use.

If you are not sure what device is what try using the dmesg command with the USB UART disconnected and again with it connected.

On 7/10/2018 at 9:09 AM, melisa said:

When I open screen or putty from my terminal and configure serial port /dev/ttyUSB0 with baud rate 115200, putty opens with black screen and green cursor.

If you run Putty and hit the open button you will either get the screen that you mention if Putty successfully connects to an available device with the specifications you assigned to the current Putty session. Otherwise you get an error message and Putty exits. Now that you have a connection all that's left is to have a conversation between the computer and whatever is connected on the other end,. If what's connected on the other end is listening, try typing into the Putty terminal window and hit enter. If the connected device is able to transmit you should get some sort of reply back. Of course if Putty is connected to the wrong serial port that's a problem.

Here is an edited example session telling me to use Putty with ttyUSB0:

lsusb
Bus 005 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

dmesg | grep tty
console [tty0] enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0b: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
usb 5-2.1: pl2303 converter now attached to ttyUSB0

 

happy communicating!

 

Edited by zygot

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now