LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-18-2015, 02:54 PM   #1
caleb star
Member
 
Registered: Nov 2003
Location: Blankette Blankolina
Distribution: Blank Linux
Posts: 107

Rep: Reputation: 15
How can I find emulated serial port info in Linux???


I have a Cisco 871 router and a Catalyst 3500XL Switch connected via rollover cables to a 4 port RS-232 switch. From an IN/OUT serial port on that switch, I have a serial cable connected to a Tripp-Lite Keyspan USA-19HS Serial to USB converter. Which is obviously connected to my pc through a USB cable.

I am using putty to connect to both of the devices. When I open putty on windows I can set and key in the COM port number with ease, then choose the serial option in putty and key that com port in and go. How can I find the info to key into putty for this device in linux???

I am running Kali.
 
Old 08-18-2015, 03:17 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,890

Rep: Reputation: 5985Reputation: 5985Reputation: 5985Reputation: 5985Reputation: 5985Reputation: 5985Reputation: 5985Reputation: 5985Reputation: 5985Reputation: 5985Reputation: 5985
You can look at the output of the dmesg command after you plug in the cable. If the device is recognized it should be like /dev/ttyUSB0.
 
1 members found this post helpful.
Old 08-18-2015, 03:49 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Every USB serial adapter I've ever used in any Linux distribution has shown up at /dev/ttyUSB0 (or 1, or 2 if there are already a couple plugged in).

Quote:
Originally Posted by caleb star View Post
How can I find the info to key into putty for this device in linux???
Putty has a Linux version? Even if they did, I don't know why you'd use it. Much simpler alternatives exist for basic serial comms...minicom, kermet, screen, etc.

Last edited by suicidaleggroll; 08-18-2015 at 03:51 PM.
 
1 members found this post helpful.
Old 08-18-2015, 03:55 PM   #4
caleb star
Member
 
Registered: Nov 2003
Location: Blankette Blankolina
Distribution: Blank Linux
Posts: 107

Original Poster
Rep: Reputation: 15
[ 4.159584] usbserial: USB Serial support registered for generic
[ 4.162166] usbcore: registered new interface driver keyspan
[ 4.162175] usbserial: USB Serial support registered for Keyspan - (without firmware)
[ 4.162180] usbserial: USB Serial support registered for Keyspan 1 port adapter
[ 4.162186] usbserial: USB Serial support registered for Keyspan 2 port adapter
[ 4.162191] usbserial: USB Serial support registered for Keyspan 4 port adapter
[ 4.162203] keyspan 3-7:1.0: Keyspan 1 port adapter converter detected
[ 4.162408] usb 3-7: Keyspan 1 port adapter converter now attached to ttyUSB0

This is the output that I got after reading through dmesg so you were totally right and thank you. However when I tried to key this into puttys Serial line as /dev/ttyUSB0/1/2/4 or /ttyUSB0/1/2/4 it still says that it is unable to open a connection to that serial port. Am I not seeing something in the dmesg read out????

Now that I'm looking at it a little closer could it be the RS-232 switch getting the way???? I thought that as long as the proper selector was connected that it would act as a straight through.

Last edited by caleb star; 08-18-2015 at 04:05 PM.
 
Old 08-18-2015, 04:05 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Two possibilities:

1) There are permissions issues at play. Run "ls -l /dev/ttyUSB0" and post the output. Chances are you need to add your user to the "dialout" group in order to have the necessary permissions to use it. Don't forget to log out and back in after modifying your group.

2) From what I can gather, the Linux version of putty is a beta port of the Windows version. I wouldn't be surprised in the slightest if parts of it didn't work properly, like serial comms. There are much simpler pieces of software for serial comms on Linux, I highly recommend you use one of them instead. They will work without a doubt and you'll get much better forum support for them. I've used kermit, minicom, and screen all successfully in the past. Screen is the easiest IMO, but minicom has more functionality.
 
1 members found this post helpful.
Old 08-18-2015, 04:12 PM   #6
caleb star
Member
 
Registered: Nov 2003
Location: Blankette Blankolina
Distribution: Blank Linux
Posts: 107

Original Poster
Rep: Reputation: 15
crw-rw---T 1 root dialout 188, 0 Aug 18 13:55 /dev/ttyUSB0
Is the output that I received from that command.

I also am very grateful for your recommendation for minicom and all the other terminals which I will be giving a try immediately.

Last edited by caleb star; 08-18-2015 at 04:13 PM.
 
Old 08-18-2015, 04:18 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You'll definitely want to add your user to the dialout group then, regardless of what software you decide to use. From the command line as root you can run "usermod -a -G dialout user" or "gpasswd -a user dialout", replacing user with your username, and then log out and back in. Or you can use whatever GUI tools your distro provides for user account management. If you run "id user" before and after, you should see the addition of the dialout group to your group list.

Last edited by suicidaleggroll; 08-18-2015 at 04:20 PM.
 
1 members found this post helpful.
Old 08-18-2015, 04:25 PM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,286
Blog Entries: 24

Rep: Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238Reputation: 4238
I strongly recommend minicom as well. The man page for it is a good place to start, with emphasis on learning your way around the Ctl-A options. Ctl-A z will give you a summary refresher.
 
1 members found this post helpful.
Old 08-18-2015, 04:40 PM   #9
caleb star
Member
 
Registered: Nov 2003
Location: Blankette Blankolina
Distribution: Blank Linux
Posts: 107

Original Poster
Rep: Reputation: 15
Hey thank you soo much suicidaleggroll you were absolutely correct. When I ran it as root which I didn't think to do, it connected with the putty terminal with no issues. So I will definitely be adding my other user account to that group.
 
  


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
Is a USBtty (USB serial port) treated the same as tty (normal serial port) in C? spudgunner Programming 1 11-12-2010 01:19 PM
How to find serial port information in OLE(Oracle Linux Enterprise)?? deedhnd Linux - Enterprise 1 09-29-2008 01:18 AM
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:59 PM.

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