LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-14-2017, 09:29 AM   #1
adithyakrish
LQ Newbie
 
Registered: Mar 2017
Posts: 5

Rep: Reputation: Disabled
Question ttyUSB0 Disconnected


Hello All,

I'm a newbie at Linux and I have a problem which I definitely need your help.
I am using Vivado 2015.2 and I am trying to configure Zynq 7000 SoC to my system using the USB Serial Port.
I do all that is necessary for the program but there is a small issue with the USB port.

When I use the command ( "dmesg | grep tty" ) to check the connection of ttyUSB0, it shows its connected. Then I tried "gtkterm" to view my output but the ttyUSB0 is not visible at the list of existing ports.

When I try the " dmesg | grep tty ", it shows it's disconnected.

What should I do? Please help me with this!
 
Old 03-14-2017, 04:58 PM   #2
amp_man
Member
 
Registered: Feb 2005
Location: Maine
Distribution: Ubuntu
Posts: 58

Rep: Reputation: 16
Is your user a member of the modem or dialout group? I don't know which Vivado uses, you should be able to find out with 'stat -c "%G" /dev/ttyS0'. Have you tried running with elevated privileges (su/sudo)?

If that doesn't work, it would be helpful to know why it disconnected - 'dmesg | tail' should give some indication.

Last edited by amp_man; 03-14-2017 at 05:00 PM.
 
Old 03-14-2017, 05:09 PM   #3
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 186

Rep: Reputation: 50
You can find out current owner group and permissions with
ls -l /dev/ttyUSB0
If that doesn't show anything you also know that your device isn't there.
 
1 members found this post helpful.
Old 03-15-2017, 04:43 AM   #4
adithyakrish
LQ Newbie
 
Registered: Mar 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Smile Thanks a lot guys!

Thanks a lot guys for your suggestion!

Nevertheless, I found the solution!

All I did was simple, "ps -ef | grep tty" and the all the tty ports were shown.
I reset them all with the "kill" switch and restarted the computer.

It then started working in ttyUSB1 (ttyUSB0 is still not functioning though!) and problem was gone!

Please let me know if there is anything that could also be done!
 
Old 03-17-2017, 06:38 AM   #5
Akvo
LQ Newbie
 
Registered: Apr 2014
Location: Brazil
Posts: 7

Rep: Reputation: Disabled
ttyUSB0 Disconnected

In my project:

http://www.c2o.pro.br/en/automation/...ml#idp31931212

I used the information at:

http://hintshop.ludvig.co.nz/show/pe...erial-devices/

and

http://www.redhat.com/magazine/002dec04/features/udev/

to define a persistent, descriptive device name for the Arduino board.

Check if you can use the same strategy for your device.

Best Regards,
Akvo
 
Old 03-24-2017, 10:03 AM   #6
adithyakrish
LQ Newbie
 
Registered: Mar 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Help Needed!

The problem is still not solved.
it randomly occurs.
I wanna know how to fix this issue. Please help me!
 
Old 03-24-2017, 01:10 PM   #7
Akvo
LQ Newbie
 
Registered: Apr 2014
Location: Brazil
Posts: 7

Rep: Reputation: Disabled
This suggestion only works if your device disconnects and then reconnects with another number.

In my case the Arduino connected as /tty/USB0 closed suddenly, and reconnected with another number (/dev/ttyUSB1).

In the messages: https://groups.google.com/forum/#!ms...0/dgzket-_jbcJ, https://groups.google.com/forum/#!to...ew/wiE_lHBPN7Y and http://www.linuxquestions.org/questi...abling-841593/, I found information about EMI and observed the message in dmesg:


FTDI USB Serial Device converter now attached to ttyUSB1
[15145.280088] hub 2-0:1.0: port 2 disabled by hub (EMI?), re-enabling...
[15145.280098] usb 2-2: USB disconnect, address 18
[15145.280409] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
...

We used the information at: http://hintshop.ludvig.co.nz/show/pe...erial-devices/ and http://www.redhat.com/magazine/002dec04/features/udev/ to define a persistent, descriptive device name for the Arduino board.

We use as unique identifier the Serial Number:

dmesg

usb 2-1: new full speed USB device using uhci_hcd and address 33
[25696.874956] usb 2-1: New USB device found, idVendor=0403, idProduct=6001
[25696.874963] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[25696.874968] usb 2-1: Product: FT232R USB UART
[25696.874973] usb 2-1: Manufacturer: FTDI
[25696.874977] usb 2-1: SerialNumber: A100P7VZ
...

And the command udevadm:

# udevadm info -a -n /dev/ttyUSB2 | grep '{serial}' | head -n1
ATTRS{serial}=="A100P7VZ"

We used the serial number to create an UDEV ruleset that'll make a nice symbolic link for the arduino board.

UDEV rules are usually scattered into many files in /etc/udev/rules.d. So we created a new file called 99-usb-serial.rules with the line:

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A6008isP", SYMLINK+="arduino"

And reloaded the rules with the command:

#udevadm control --reload-rules

This is useful because we don't need to worry about the number of the device, we use only /dev/arduino.

(Source: http://www.c2o.pro.br/en/automation/...ml#idp31931212)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ttyUSB0 not found narcissus7166 Linux - Newbie 7 08-18-2011 02:18 PM
ttyUSB0 not showing up in /dev nikgra Linux - Server 1 08-20-2010 06:43 PM
How do I define ttyUSB0 ? OralDeckard Linux - Newbie 9 05-03-2006 10:51 PM
ttyUSB0 an pl2303 H2O-linux Slackware 3 12-08-2004 05:30 PM
/dev/ttyUSB0 js72 Linux - Networking 1 01-05-2003 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration