# [SOLVED] need to connect linux laptop to cisco router

## stringchopper

I need to go out tomorrow to a site and connect to a cisco router with a rollover cable.

My HP Pavilion Laptop with Gentoo has no serial connector, so ...

1) since I'm gonna have to buy a (USB?) dongle, can anyone offer suggestions as to which Brand, Make, Manufacturer will give me the least problems.

2) How do I console in?  I'm accustom to windows, hyperterminal, where all I do is set baud, parity, stop bits, etc... click and go...

----------

## username234

 *stringchopper wrote:*   

> I need to go out tomorrow to a site and connect to a cisco router with a rollover cable.
> 
> My HP Pavilion Laptop with Gentoo has no serial connector, so ...
> 
> 1) since I'm gonna have to buy a (USB?) dongle, can anyone offer suggestions as to which Brand, Make, Manufacturer will give me the least problems.
> ...

 

I've never messed with usb-serial adapters, I can't make a recommendation there... though I'd think just about anyone of them would do...

as for how to get in, there's several ways... Kermit, screen, minicom, to name a few... 

my personal favorite is screen.  

to connect to my 871 all I do is type

```
sudo screen /dev/ttyS3
```

and everything works fine.

----------

## jordanwb

For software you could use PuTTY, it requires GTK 1.something which is unfortunate.

----------

## stringchopper

username234:

Assuming I get a usb serial adapter plugged in and recognized, how will I know which tty to use?

jordanwb:

Putty does this

```
Gtk-WARNING **: Failed to load module "libgnomebreakpad.so": libgnomebreakpad.so: cannot open shared object file: No such file or directory
```

which isn't surprising, since it gave me this when emerging:

```
 * Messages for package dev-libs/glib-1.2.10-r5:

 * Appending a library link instruction (-ldl); libraries to link to should not be passed through LDFLAGS
```

anyway, I thought putty was only a telnet and ssh client (not what I need at the moment)

----------

## doctork

You might try "minicom" -- I see that's in portage.  I haven't done any serial communications for years, so I couldn't offer any further advice.

doc

----------

## xbmodder

90% of usb-serial devices will work. They're mostly PL2303 or FTDIs. Then just setup minicom, this is easy.

----------

## fangorn

Or if you have QT anyway you could use cutecom as an alternative. Even more easy than minicom (with less features, but for serial console it is more than sufficient).

----------

## DirtyHairy

After plugging the converter, look in dmesg, it will tell you the nodes. I assume it will be /dev/ttyUSBx (at least that's what my palm gets mapped to)...

----------

## Monkeh

You may want to be aware that most USB serial adapters will operate at 5V, and won't work with 10V or 12V devices (many, if not most).

If the router doesn't work with 5V devices, you'll need to make sure you get an adapter with a charge pump, so it'll operate at around 9V (which will work with 12V devices).

----------

## jordanwb

 *stringchopper wrote:*   

> anyway, I thought putty was only a telnet and ssh client (not what I need at the moment)

 

No it can do serial communications as well.

----------

## stringchopper

Thanks for the heads-up Monkeh

jordanwb: is there another way to telnet... I get those errors with putty.  I thought if I can plug my eth0 into the company switch, I could telnet from the inside, but I couldn't get an IP assigned to me anyway so it didn't work... but for future reference, I would've thought that linux would have a simple telnet client by default.

--------------

Here's my update / current situation. (and thanks for all the help above)

I got a Gigaware USB-A Serial, plugged into a USB slot in my laptop, and lsusb shows it, but I don't have a ttyUSB in output from ls /dev/tty* - though I do have some usb "stuff" that shows up (output included at end of this post). 

How do I know which device to use for the screen program?

dmesg | tail shows this

```
[  693.621644] usb usb3: wakeup_rh

[  693.653081] hub 3-0:1.0: hub_resume

[  693.653130] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000

[  694.750062] usb usb3: suspend_rh (auto-stop)

[  696.000142] hub 1-0:1.0: hub_suspend

[  696.000159] usb usb1: bus auto-suspend

[  696.000164] ehci_hcd 0000:00:1d.7: suspend root hub

[  696.000203] hub 3-0:1.0: hub_suspend

[  696.000209] usb usb3: bus auto-suspend

[  696.000213] usb usb3: suspend_rh

```

lsusb (note: "Y.C. Cable U.S.A., Inc" is the usb/serial adapter)

```
Bus 001 Device 001: ID 1d6b:0002  

Bus 005 Device 002: ID 03f0:171d Hewlett-Packard 

Bus 005 Device 001: ID 1d6b:0001  

Bus 004 Device 002: ID 045e:00f9 Microsoft Corp. 

Bus 004 Device 001: ID 1d6b:0001  

Bus 003 Device 001: ID 1d6b:0001  

Bus 002 Device 002: ID 05ad:0fba Y.C. Cable U.S.A., Inc. 

Bus 002 Device 001: ID 1d6b:0001  

```

ls -al /dev/tty*

```
crw-rw-rw- 1 root tty  5,  0 Feb 13 11:20 /dev/tty

crw--w---- 1 root root 4,  0 Feb 13 11:20 /dev/tty0

crw------- 1 root root 4,  1 Feb 13 11:20 /dev/tty1

crw--w---- 1 root tty  4, 10 Feb 13 11:20 /dev/tty10

crw--w---- 1 root tty  4, 11 Feb 13 11:20 /dev/tty11

crw------- 1 root root 4, 12 Feb 13 11:36 /dev/tty12

crw--w---- 1 root tty  4, 13 Feb 13 11:20 /dev/tty13

crw--w---- 1 root tty  4, 14 Feb 13 11:20 /dev/tty14

crw--w---- 1 root tty  4, 15 Feb 13 11:20 /dev/tty15

crw--w---- 1 root tty  4, 16 Feb 13 11:20 /dev/tty16

crw--w---- 1 root tty  4, 17 Feb 13 11:20 /dev/tty17

crw--w---- 1 root tty  4, 18 Feb 13 11:20 /dev/tty18

crw--w---- 1 root tty  4, 19 Feb 13 11:20 /dev/tty19

crw------- 1 root root 4,  2 Feb 13 11:20 /dev/tty2

crw--w---- 1 root tty  4, 20 Feb 13 11:20 /dev/tty20

crw--w---- 1 root tty  4, 21 Feb 13 11:20 /dev/tty21

crw--w---- 1 root tty  4, 22 Feb 13 11:20 /dev/tty22

crw--w---- 1 root tty  4, 23 Feb 13 11:20 /dev/tty23

crw--w---- 1 root tty  4, 24 Feb 13 11:20 /dev/tty24

crw--w---- 1 root tty  4, 25 Feb 13 11:20 /dev/tty25

crw--w---- 1 root tty  4, 26 Feb 13 11:20 /dev/tty26

crw--w---- 1 root tty  4, 27 Feb 13 11:20 /dev/tty27

crw--w---- 1 root tty  4, 28 Feb 13 11:20 /dev/tty28

crw--w---- 1 root tty  4, 29 Feb 13 11:20 /dev/tty29

crw------- 1 root root 4,  3 Feb 13 11:20 /dev/tty3

crw--w---- 1 root tty  4, 30 Feb 13 11:20 /dev/tty30

crw--w---- 1 root tty  4, 31 Feb 13 11:20 /dev/tty31

crw--w---- 1 root tty  4, 32 Feb 13 11:20 /dev/tty32

crw--w---- 1 root tty  4, 33 Feb 13 11:20 /dev/tty33

crw--w---- 1 root tty  4, 34 Feb 13 11:20 /dev/tty34

crw--w---- 1 root tty  4, 35 Feb 13 11:20 /dev/tty35

crw--w---- 1 root tty  4, 36 Feb 13 11:20 /dev/tty36

crw--w---- 1 root tty  4, 37 Feb 13 11:20 /dev/tty37

crw--w---- 1 root tty  4, 38 Feb 13 11:20 /dev/tty38

crw--w---- 1 root tty  4, 39 Feb 13 11:20 /dev/tty39

crw------- 1 root root 4,  4 Feb 13 11:20 /dev/tty4

crw--w---- 1 root tty  4, 40 Feb 13 11:20 /dev/tty40

crw--w---- 1 root tty  4, 41 Feb 13 11:20 /dev/tty41

crw--w---- 1 root tty  4, 42 Feb 13 11:20 /dev/tty42

crw--w---- 1 root tty  4, 43 Feb 13 11:20 /dev/tty43

crw--w---- 1 root tty  4, 44 Feb 13 11:20 /dev/tty44

crw--w---- 1 root tty  4, 45 Feb 13 11:20 /dev/tty45

crw--w---- 1 root tty  4, 46 Feb 13 11:20 /dev/tty46

crw--w---- 1 root tty  4, 47 Feb 13 11:20 /dev/tty47

crw--w---- 1 root tty  4, 48 Feb 13 11:20 /dev/tty48

crw--w---- 1 root tty  4, 49 Feb 13 11:20 /dev/tty49

crw------- 1 root root 4,  5 Feb 13 11:20 /dev/tty5

crw--w---- 1 root tty  4, 50 Feb 13 11:20 /dev/tty50

crw--w---- 1 root tty  4, 51 Feb 13 11:20 /dev/tty51

crw--w---- 1 root tty  4, 52 Feb 13 11:20 /dev/tty52

crw--w---- 1 root tty  4, 53 Feb 13 11:20 /dev/tty53

crw--w---- 1 root tty  4, 54 Feb 13 11:20 /dev/tty54

crw--w---- 1 root tty  4, 55 Feb 13 11:20 /dev/tty55

crw--w---- 1 root tty  4, 56 Feb 13 11:20 /dev/tty56

crw--w---- 1 root tty  4, 57 Feb 13 11:20 /dev/tty57

crw--w---- 1 root tty  4, 58 Feb 13 11:20 /dev/tty58

crw--w---- 1 root tty  4, 59 Feb 13 11:20 /dev/tty59

crw------- 1 root root 4,  6 Feb 13 11:20 /dev/tty6

crw--w---- 1 root tty  4, 60 Feb 13 11:20 /dev/tty60

crw--w---- 1 root tty  4, 61 Feb 13 11:20 /dev/tty61

crw--w---- 1 root tty  4, 62 Feb 13 11:20 /dev/tty62

crw--w---- 1 root tty  4, 63 Feb 13 11:20 /dev/tty63

crw--w---- 1 root root 4,  7 Feb 13 11:20 /dev/tty7

crw--w---- 1 root tty  4,  8 Feb 13 11:20 /dev/tty8

crw--w---- 1 root tty  4,  9 Feb 13 11:20 /dev/tty9

crw-rw---- 1 root uucp 4, 64 Feb 13 11:20 /dev/ttyS0

crw-rw---- 1 root uucp 4, 65 Feb 13 11:20 /dev/ttyS1

crw-rw---- 1 root uucp 4, 66 Feb 13 11:20 /dev/ttyS2

crw-rw---- 1 root uucp 4, 67 Feb 13 11:20 /dev/ttyS3

```

ls -al /dev/usb*

```
crw-rw---- 1 root root 250,  1 Feb 13 11:20 /dev/usbdev1.1_ep00

crw-rw---- 1 root root 250,  0 Feb 13 11:20 /dev/usbdev1.1_ep81

crw-rw---- 1 root root 250,  3 Feb 13 11:20 /dev/usbdev2.1_ep00

crw-rw---- 1 root root 250,  2 Feb 13 11:20 /dev/usbdev2.1_ep81

crw-rw---- 1 root root 250, 24 Feb 13 11:29 /dev/usbdev2.2_ep00

crw-rw---- 1 root root 250, 22 Feb 13 11:29 /dev/usbdev2.2_ep02

crw-rw---- 1 root root 250, 21 Feb 13 11:29 /dev/usbdev2.2_ep81

crw-rw---- 1 root root 250, 23 Feb 13 11:29 /dev/usbdev2.2_ep83

crw-rw---- 1 root root 250,  5 Feb 13 11:20 /dev/usbdev3.1_ep00

crw-rw---- 1 root root 250,  4 Feb 13 11:20 /dev/usbdev3.1_ep81

crw-rw---- 1 root root 250,  7 Feb 13 11:20 /dev/usbdev4.1_ep00

crw-rw---- 1 root root 250,  6 Feb 13 11:20 /dev/usbdev4.1_ep81

crw-rw---- 1 root root 250, 12 Feb 13 11:20 /dev/usbdev4.2_ep00

crw-rw---- 1 root root 250, 10 Feb 13 11:20 /dev/usbdev4.2_ep81

crw-rw---- 1 root root 250, 11 Feb 13 11:20 /dev/usbdev4.2_ep82

crw-rw---- 1 root root 250,  9 Feb 13 11:20 /dev/usbdev5.1_ep00

crw-rw---- 1 root root 250,  8 Feb 13 11:20 /dev/usbdev5.1_ep81

crw-rw---- 1 root root 250, 20 Feb 13 11:20 /dev/usbdev5.2_ep00

crw-rw---- 1 root root 250, 15 Feb 13 11:20 /dev/usbdev5.2_ep02

crw-rw---- 1 root root 250, 17 Feb 13 11:20 /dev/usbdev5.2_ep03

crw-rw---- 1 root root 250, 19 Feb 13 11:20 /dev/usbdev5.2_ep04

crw-rw---- 1 root root 250, 13 Feb 13 11:20 /dev/usbdev5.2_ep81

crw-rw---- 1 root root 250, 14 Feb 13 11:20 /dev/usbdev5.2_ep82

crw-rw---- 1 root root 250, 16 Feb 13 11:20 /dev/usbdev5.2_ep83

crw-rw---- 1 root root 250, 18 Feb 13 11:20 /dev/usbdev5.2_ep84

crw-rw---- 1 root root 251,  0 Feb 13 11:20 /dev/usbmon0

crw-rw---- 1 root root 251,  1 Feb 13 11:20 /dev/usbmon1

crw-rw---- 1 root root 251,  2 Feb 13 11:20 /dev/usbmon2

crw-rw---- 1 root root 251,  3 Feb 13 11:20 /dev/usbmon3

crw-rw---- 1 root root 251,  4 Feb 13 11:20 /dev/usbmon4

crw-rw---- 1 root root 251,  5 Feb 13 11:20 /dev/usbmon5

```

----------

## jordanwb

```
crw-rw---- 1 root uucp 4, 64 Feb 13 11:20 /dev/ttyS0

crw-rw---- 1 root uucp 4, 65 Feb 13 11:20 /dev/ttyS1

crw-rw---- 1 root uucp 4, 66 Feb 13 11:20 /dev/ttyS2

crw-rw---- 1 root uucp 4, 67 Feb 13 11:20 /dev/ttyS3

```

Give any of those a try. I think the "S" denotes serial port. But I don't know.

What series router do you have to connect to?

----------

## stringchopper

It's actually a PIX, but I'm not on site right now, so I'm practicing with a Cisco 2500 series router. 

jordanwb, I made an edit to the previous post asking about telnet as well (not to get off topic of the usb), but you were too quick in your response for my edit  :Smile: 

Wouldn't it more likely *not* be an "S" tty?  since linux would see it as a USB?  Is there a better way to see what references what, other than guessing?  I've run into this before on a different issue, and it'd be nice to know "what's what".

Many thanks.

----------

## jordanwb

 *stringchopper wrote:*   

> It's actually a PIX, but I'm not on site right now, so I'm practicing with a Cisco 2500 series router. 
> 
> jordanwb, I made an edit to the previous post asking about telnet as well (not to get off topic of the usb), but you were too quick in your response for my edit 
> 
> Wouldn't it more likely *not* be an "S" tty?  since linux would see it as a USB?  Is there a better way to see what references what, other than guessing?  I've run into this before on a different issue, and it'd be nice to know "what's what".
> ...

 

We used 2500's in networking class in High School. I missed the bit about putty ot working (my bad). It would be more likely that it would be the one with an "S" (at least for me). The driver knows that it provides a Serial port so it creates a Dev tty node with an "S" to mark that it's used for Serial. But that's just my thinking.

I found this about the error. Maybe it can be of help.

----------

## stringchopper

when trying "screen /dev/ttyS0" the terminal title bar shows this text briefly...

"/dev/ttyS0 is not a tty"

then it changes to this...

"Sorry, could not find a PTY"

same for ttyS1 thru ttyS3

I also tried plugging the USB into a different USB port.  dmesg showed the disconnect and connect.

----------

## jordanwb

Can we see a list of all the nodes in /dev? My laptop has a serial port, I'll see if I included a driver and the nodes it created (if any).

----------

## Monkeh

It would be ttyUSB0. You need a driver.

----------

## stringchopper

I ran makeconfig and recompiled the kernel with "-> device driver -> usb  support->  usb serial converter support"

using the USB generic serial driver

still no ttyUSB0 in /dev/

per xbmodder, I'm recompiling with PL2303 or FTDI drivers, will report back later

ls -al /dev/tty*

```
crw-rw-rw- 1 root tty  5,  0 Feb 13 15:02 /dev/tty

crw--w---- 1 root root 4,  0 Feb 13 15:02 /dev/tty0

crw------- 1 root root 4,  1 Feb 13 15:03 /dev/tty1

crw--w---- 1 root tty  4, 10 Feb 13 15:02 /dev/tty10

crw--w---- 1 root tty  4, 11 Feb 13 15:02 /dev/tty11

crw------- 1 root root 4, 12 Feb 13 15:03 /dev/tty12

crw--w---- 1 root tty  4, 13 Feb 13 15:02 /dev/tty13

crw--w---- 1 root tty  4, 14 Feb 13 15:02 /dev/tty14

crw--w---- 1 root tty  4, 15 Feb 13 15:02 /dev/tty15

crw--w---- 1 root tty  4, 16 Feb 13 15:02 /dev/tty16

crw--w---- 1 root tty  4, 17 Feb 13 15:02 /dev/tty17

crw--w---- 1 root tty  4, 18 Feb 13 15:02 /dev/tty18

crw--w---- 1 root tty  4, 19 Feb 13 15:02 /dev/tty19

crw------- 1 root root 4,  2 Feb 13 15:03 /dev/tty2

crw--w---- 1 root tty  4, 20 Feb 13 15:02 /dev/tty20

crw--w---- 1 root tty  4, 21 Feb 13 15:02 /dev/tty21

crw--w---- 1 root tty  4, 22 Feb 13 15:02 /dev/tty22

crw--w---- 1 root tty  4, 23 Feb 13 15:02 /dev/tty23

crw--w---- 1 root tty  4, 24 Feb 13 15:02 /dev/tty24

crw--w---- 1 root tty  4, 25 Feb 13 15:02 /dev/tty25

crw--w---- 1 root tty  4, 26 Feb 13 15:02 /dev/tty26

crw--w---- 1 root tty  4, 27 Feb 13 15:02 /dev/tty27

crw--w---- 1 root tty  4, 28 Feb 13 15:02 /dev/tty28

crw--w---- 1 root tty  4, 29 Feb 13 15:02 /dev/tty29

crw------- 1 root root 4,  3 Feb 13 15:03 /dev/tty3

crw--w---- 1 root tty  4, 30 Feb 13 15:02 /dev/tty30

crw--w---- 1 root tty  4, 31 Feb 13 15:02 /dev/tty31

crw--w---- 1 root tty  4, 32 Feb 13 15:02 /dev/tty32

crw--w---- 1 root tty  4, 33 Feb 13 15:02 /dev/tty33

crw--w---- 1 root tty  4, 34 Feb 13 15:02 /dev/tty34

crw--w---- 1 root tty  4, 35 Feb 13 15:02 /dev/tty35

crw--w---- 1 root tty  4, 36 Feb 13 15:02 /dev/tty36

crw--w---- 1 root tty  4, 37 Feb 13 15:02 /dev/tty37

crw--w---- 1 root tty  4, 38 Feb 13 15:02 /dev/tty38

crw--w---- 1 root tty  4, 39 Feb 13 15:02 /dev/tty39

crw------- 1 root root 4,  4 Feb 13 15:03 /dev/tty4

crw--w---- 1 root tty  4, 40 Feb 13 15:02 /dev/tty40

crw--w---- 1 root tty  4, 41 Feb 13 15:02 /dev/tty41

crw--w---- 1 root tty  4, 42 Feb 13 15:02 /dev/tty42

crw--w---- 1 root tty  4, 43 Feb 13 15:02 /dev/tty43

crw--w---- 1 root tty  4, 44 Feb 13 15:02 /dev/tty44

crw--w---- 1 root tty  4, 45 Feb 13 15:02 /dev/tty45

crw--w---- 1 root tty  4, 46 Feb 13 15:02 /dev/tty46

crw--w---- 1 root tty  4, 47 Feb 13 15:02 /dev/tty47

crw--w---- 1 root tty  4, 48 Feb 13 15:02 /dev/tty48

crw--w---- 1 root tty  4, 49 Feb 13 15:02 /dev/tty49

crw------- 1 root root 4,  5 Feb 13 15:03 /dev/tty5

crw--w---- 1 root tty  4, 50 Feb 13 15:02 /dev/tty50

crw--w---- 1 root tty  4, 51 Feb 13 15:02 /dev/tty51

crw--w---- 1 root tty  4, 52 Feb 13 15:02 /dev/tty52

crw--w---- 1 root tty  4, 53 Feb 13 15:02 /dev/tty53

crw--w---- 1 root tty  4, 54 Feb 13 15:02 /dev/tty54

crw--w---- 1 root tty  4, 55 Feb 13 15:02 /dev/tty55

crw--w---- 1 root tty  4, 56 Feb 13 15:02 /dev/tty56

crw--w---- 1 root tty  4, 57 Feb 13 15:02 /dev/tty57

crw--w---- 1 root tty  4, 58 Feb 13 15:02 /dev/tty58

crw--w---- 1 root tty  4, 59 Feb 13 15:02 /dev/tty59

crw------- 1 root root 4,  6 Feb 13 15:03 /dev/tty6

crw--w---- 1 root tty  4, 60 Feb 13 15:02 /dev/tty60

crw--w---- 1 root tty  4, 61 Feb 13 15:02 /dev/tty61

crw--w---- 1 root tty  4, 62 Feb 13 15:02 /dev/tty62

crw--w---- 1 root tty  4, 63 Feb 13 15:02 /dev/tty63

crw--w---- 1 root root 4,  7 Feb 13 15:02 /dev/tty7

crw--w---- 1 root tty  4,  8 Feb 13 15:02 /dev/tty8

crw--w---- 1 root tty  4,  9 Feb 13 15:02 /dev/tty9

crw-rw---- 1 root uucp 4, 64 Feb 13 15:02 /dev/ttyS0

crw-rw---- 1 root uucp 4, 65 Feb 13 15:02 /dev/ttyS1

crw-rw---- 1 root uucp 4, 66 Feb 13 15:02 /dev/ttyS2

crw-rw---- 1 root uucp 4, 67 Feb 13 15:02 /dev/ttyS3

```

----------

## stringchopper

ok, it was either the 2303 driver or the FTDI... because it works now and I was able to get into my router with 

```
screen /dev/ttyUSB0
```

Please accept a huge thanks for all your help (and xdanx77 in #gentoo on freenode)

no, I have to figure out how to close a screen session  :Smile: 

----------

## jordanwb

 *stringchopper wrote:*   

> ok, it was either the 2303 driver or the FTDI... because it works now and I was able to get into my router with 
> 
> ```
> screen /dev/ttyUSB0
> ```
> ...

 

To detach you press Ctrl+A followed by D. I don't remember how you close it.

----------

## username234

 *stringchopper wrote:*   

> ok, it was either the 2303 driver or the FTDI... because it works now and I was able to get into my router with 
> 
> ```
> screen /dev/ttyUSB0
> ```
> ...

 

Wow, sorry for the delay in responding....  Glad its working though.  The easiest way to kill a screen session is to close all screen windows.  If you have a shell prompt you just type exit in every window.  Once screen has no more windows it'll close.  For the window with the router, though you'll need to use ctrl+a then immediately follow it with shift+k (iirc, this is slightly different from man pages as when screen gets installed via portage, some of the keys get remapped.)

Screen also has the ability to kill all windows and exit using a single command, but this appears to have been disabled when portage installed it.

(to see the gentoo remappings look at /etc/screenrc)

Word of warning with screen though:  If you have more than one session connect to your USB-serial adapter then you could get strange behavior when communicating with the router (characters you type don't show up, output looks garbled, etc.).  To fix this all you have to do is close all the other screen sessions (so that you only have 1 using the adapter).

----------

