PDA

View Full Version : Cisco USB to Serial




systole
Mar 26, 2011, 08:19 PM
I have been using screen in the osx terminal to get serial access, using the following:

screen telnet /dev/tty.usbserial

Unfortunately I can't scrollback in screen, which makes copying long config files a process of :apple:-C, :apple:-V, and repeat. Any suggestions for native serial support in the osx terminal app WITH scrollback?



TreborM
Mar 27, 2011, 10:29 AM
I have been using screen in the osx terminal to get serial access, using the following:

screen telnet /dev/tty.usbserial

Unfortunately I can't scrollback in screen, which makes copying long config files a process of :apple:-C, :apple:-V, and repeat. Any suggestions for native serial support in the osx terminal app WITH scrollback?

I do not understand why you are using screen to launch telnet instead of invoking it directly, but try using logging in screen (-L if memory serves right)

Personally I would use tee to make a copy of the output in a file and extract your config files from this file.

Also IIRC Cisco's iOS lets you save and load config files directly. I do not remember the exact syntax but try built-in help...

Hope this helps,
Trebor.

cqexbesd
Mar 28, 2011, 05:52 AM
I have been using screen in the osx terminal to get serial access, using the following:

screen telnet /dev/tty.usbserial

Unfortunately I can't scrollback in screen, which makes copying long config files a process of :apple:-C, :apple:-V, and repeat. Any suggestions for native serial support in the osx terminal app WITH scrollback?

Are you sure thats the command you use? screen telnet /dev/tty.usbserial would start screen and run telnet /dev/tty.usbserial in it which I would expect to fail straight away as telnet doesn't deal with serial ports AFAIK.

What you probably want to use, assuming you are connecting over a serial line is screen /dev/cu.usbserial

If you are the only serial port user on your system it probably doesn't really matter if you use cu or tty but cu is the norm when your connecting out via serial (as opposed to waiting for something to connect in).

With that out of the way I can say that screen does have a scroll back buffer. Perhaps the easiest way to use it, assuming you are using the default key bindings, is CTRL-A ESC and then use your cursor keys to scroll around. ESC again to go back to normal mode. Screen also has copy and paste support built in but you don't need to use it if you are using a modern windowing system like OSX. Remember screen was built for use on dumb terminals where, I can assure you, it's the best thing since sliced bread but thats why it emulates its own terminal within your window.

If you do want to use something built in that does't do its own terminal emulation then there is the cu command. Depending on the permissions setup you might need to be root to run it (or use sudo) - I haven't really used it under OSX.

cu -l /dev/cu.usbserial

You can drop your session with:

~.

Andrew

cqexbesd
Mar 28, 2011, 06:04 AM
Also IIRC Cisco's iOS lets you save and load config files directly. I do not remember the exact syntax but try built-in help...

copy <src> <dest>

src or dest could be one of:


conf - the config saved in the routers NVRAM that is loaded to RAM on boot
run - the running config (i.e. the one the router is actually using atm and is stored in RAM)
te - the terminal
tftp - a tftp site
flash - the flash card


That's from memory and it's been a long while for me so I'd check anything you are planning on typing into a real router :-)

HTH

Andrew

dime21
Mar 29, 2011, 08:54 AM
I wish someone would do a native OSX build of Putty. I'm pretty surprised it hasn't been done. Doesn't seem like it would even take much effort if you have the original linux or BSD source code as a starting point.

Heinekev
Mar 29, 2011, 01:49 PM
http://www.vandyke.com/products/securecrt/mac_osx.html

Best serial and terminal emulator available on the Mac. This was my one holdout from the PC world for the longest time

systole
Apr 3, 2011, 03:41 PM
http://www.vandyke.com/products/securecrt/mac_osx.html

Best serial and terminal emulator available on the Mac. This was my one holdout from the PC world for the longest time

I just found a student pricing form buried on the site for a $20 educational license here (http://www.vandyke.com/pricing/educational/applications/student.html). Will hatve to shoo them an email.


Thanks for all the replies, Guess I just need to create a basic template with ssh access enabled and a dhcp pool to enable direct ssh access. I'll have to try cu now that I have my new mac. thanks for the tip Andrew