Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Adding a separate USB-Serial console to SG-2440 - /etc/ttys woes?

    Official Netgate® Hardware
    3
    3
    892
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Strider3000 last edited by

      Running 2.4 Beta on official SG-2440 hardware.

      Netgate SG-2440 hardware comes with a built-in USB console for debugging.
      I'm trying to add a separate "physical" serial port console to the SG-2440, mainly for the purposes of "cheap" out of band debugging from devices that support physical serial redirect function, such as some Cradlepoint routers, SpiderDuo KVM (etc).
      I got a suggestion to try using an FTDI-based USB to serial adapter: http://a.co/56uzg9F
      When plugged into a SG-2440 USB port, pfSense "sees" it as a serial adapter /dev/cuaU0, and I can send and receive data by running "cu -l /dev/cuaU0 -s 9600" from pfSense command-line. So far so good.
      I added uftdi_load="yes" to /boot/loader.conf, and after a reboot I can send and receive data via /dev/ttyU0 by running "screen /dev/ttyU0 115200". Not sure editing /boot/loader.conf is necessary, but again it seems to work fine.

      Now I want to turn /dev/ttyU0 into a console port that I can use to access pfSense CLI.
      From what I've read (http://www.plugged.in/linux/linux_help/serial-console-redirection-in-pfsense.html), this should be possible. However, any changes I make to the /etc/ttys file seem to be overwritten after boot.
      For instance, if I add the following to /etc/ttys:

      ttyU0  "/usr/libexec/getty Pc"  vt100  on    secure

      It gets overwritten with this on the next boot:

      ttyU0  "/usr/libexec/getty al.3wire"  vt100  onifconsole    secure

      At this point I'm still able to send/receive data on ttyU0 by connecting from pfSense command line, but this isn't what I want to do. I want to be able to access the physical serial end and have it be a command-line interface to pfSense.

      Am I going about this wrong? Is adding another serial console to the SG-2440 impossible to do, or does FreeBSD have issues with creating console ports out of serial-USB devices? Any thoughts or suggestions are appreciated.

      1 Reply Last reply Reply Quote 0
      • N
        n3by last edited by

        Like you I wanted to have serial console for out of band management and I succeed to assign serial console to AMT instead of local COM port. The only disadvantage is that I lost local serial console from COM port…. not a big problem if computer have a VGA port.

        If you want to have other adapter assigned to serial console you have to edit:
        /boot/loader.conf.local

        with your COM settings:
        comconsole_speed="115200"
        comconsole_port="0xPORT"

        or with device:
        #Determine this value from the pciconf -l
        comconsole_pcidev=”0:3:3″

        thanks to Derelict you can have a look here:
        https://forum.pfsense.org/index.php?topic=132860.msg730615#msg730615

        and here for AMT related:
        http://blog.ignoranthack.me/?p=51

        and freebsd doc:
        https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html

        1 Reply Last reply Reply Quote 0
        • jimp
          jimp Rebel Alliance Developer Netgate last edited by

          You can't add a USB serial adapter as a console, at least not that I've ever seen work. The USB device is not present early enough for it to be viable as a console for debugging purposes. It's a path that only leads to anger, heartache, and disappointment.

          You can turn a cheap rpi or similar into a network/OOB USB serial console mux/server that connects to loads of other USB serial consoles quickly and easily with off the shelf hardware and without modding anything. Just USB hub(s) and such.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post