1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Cisco USB to Serial

Discussion in 'Mac OS X Server, Xserve, and Networking' started by systole, Mar 26, 2011.

  1. macrumors member


    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?
  2. macrumors member

    Try logging or pipe fitting

    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,
  3. macrumors member

    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:

  4. macrumors member

    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 :)


  5. macrumors 6502

    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.
  6. macrumors member

  7. systole, Apr 3, 2011
    Last edited: Apr 3, 2011

    macrumors member


    I just found a student pricing form buried on the site for a $20 educational license here. 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

Share This Page