Cisco USB to Serial

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

  1. macrumors member

    systole

    Joined:
    Mar 24, 2011
    Location:
    Minnesnowta
    #1
    I have been using screen in the osx terminal to get serial access, using the following:

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

    Joined:
    Jun 26, 2010
    #2
    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,
    Trebor.
     
  3. macrumors member

    Joined:
    Jun 4, 2009
    #3
    Are you sure thats the command you use?
    Code:
    screen telnet /dev/tty.usbserial
    would start screen and run
    Code:
    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
    Code:
    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.

    Code:
    cu -l /dev/cu.usbserial
    You can drop your session with:

    Code:
    ~.
    Andrew
     
  4. macrumors member

    Joined:
    Jun 4, 2009
    #4
    Code:
    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
     
  5. macrumors 6502

    Joined:
    Dec 9, 2010
    #5
    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

    Joined:
    Feb 19, 2007
    #6
  7. systole, Apr 3, 2011
    Last edited: Apr 3, 2011

    thread starter macrumors member

    systole

    Joined:
    Mar 24, 2011
    Location:
    Minnesnowta
    #7
    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