How do you get the RS232 working on Ubuntu server?

Raymond DayRaymond Day New Member Posts: 67
I got it so when it boots up it will show some text but then it stops and don't show any more. It's like it works at the very start then don't.

It looks like this:
error: serial port `com0' isn't found.
error: terminal `serial' isn't found.
error: terminal `serial' isn't found.

                    GNU GRUB  version 2.02~beta2-36ubuntu3.9

 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Ŀ
 ▒*Ubuntu                                                                     ▒
 ▒ Advanced options for Ubuntu                                                ▒
 ▒ System setup                                                               ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

      Use the  and  keys to select which entry is highlighted.
      Press enter to boot the selected OS, `e' to edit the commands
      before booting or `c' for a command-line. ESC to return previous
      menu.
   The highlighted entry will be executed automatically in 0s.

How can I get it working all the way to the command line?

-Raymond Day

Comments

  • Raymond DayRaymond Day New Member Posts: 67
    Got it working so at lest it sends but I can't type any thing back on it.

    Did this command to see what serial port it is using.

    [email protected]:~# setserial -g /dev/ttyS[0123456789]
    /dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4
    /dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
    /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
    /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
    /dev/ttyS4, UART: 16550A, Port: 0x0000, IRQ: 4
    /dev/ttyS5, UART: 16550A, Port: 0x0000, IRQ: 5
    /dev/ttyS6, UART: unknown, Port: 0x0000, IRQ: 0
    /dev/ttyS7, UART: unknown, Port: 0x0000, IRQ: 0
    /dev/ttyS8, UART: unknown, Port: 0x0000, IRQ: 0
    /dev/ttyS9, UART: unknown, Port: 0x0000, IRQ: 0
    [email protected]:~#
    

    Then I edit the /etc/default/grub.d/serial.cfg file with IRQ:4 it was 0. so it looks like this now.
    GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX console=tty0 console=ttyS4,115200n8"
    GRUB_TERMINAL_INPUT="console serial"
    GRUB_TERMINAL_OUTPUT="gfxterm serial"
    GRUB_SERIAL_COMMAND="serial --unit=4 --speed=115200"
    

    I did have the 1st line tty0 to 4 all so but 0 or 4 don't make it so I can type back.

    Here is the last few lines I get on the serial after it boots.
    [  OK  ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand".
    [  OK  ] Started LSB: daemon to balance interrupts for SMP systems.
             Starting Terminate Plymouth Boot Screen...
             Starting Hold until boot process finishes up...
    [  OK  ] Started Terminate Plymouth Boot Screen.
    [  OK  ] Started Hold until boot process finishes up.
             Starting Set console scheme...
    [  OK  ] Started Getty on tty1.
    [  OK  ] Reached target Login Prompts.
    [  OK  ] Started LSB: automatic crash report generation.
    [  OK  ] Started Set console scheme.
    [  OK  ] Created slice User Slice of root.
             Starting User Manager for UID 0...
    [  OK  ] Started Session 1 of user root.
    [  OK  ] Started User Manager for UID 0.
    [  OK  ] Started LSB: Apache2 web server.
    [  OK  ] Started LSB: Start or stop the Webmin server.
    [  OK  ] Reached target Multi-User System.
    [  OK  ] Reached target Graphical Interface.
    [  OK  ] Started Stop ureadahead data collection 45s after completed startup.
             Starting Update UTMP about System Runlevel Changes...
    [  OK  ] Started Update UTMP about System Runlevel Changes.
    
    

    I get nothing back till I reboot it.

    Like to get it so I can type commands on it. Any one know a fix?

    -Raymond Day
  • Raymond DayRaymond Day New Member Posts: 67
    Tested this out some with commands like this:
    [email protected]:~# ls -l /dev/ttyS4
    crw-rw---- 1 root dialout 4, 68 Jun  4 07:56 /dev/ttyS4
    [email protected]:~# echo "Hello world" > /dev/ttyS4
    [email protected]:~# echo "ls" < /dev/ttyS4
    ls
    [email protected]:~#
    

    The Hello world did come though the serial port but the ls did not it just went on the log in window.

    So I guess I don't have /dev/ttyS4 set every place it needs to be.

    -Raymond Day
  • BartekBartek New Member Posts: 16
    Hello,

    Thanks for the clue!
    Based on this info I have found easy solution how to enable Up Squared serial console on Ubuntu 16.04. It is as easy as running two simple commands:
    systemctl enable [email protected]
    service [email protected] start
    
    It works great for me. However I couldn't get console on grub as you have described. I am using Ubuntu desktop.

    Thanks
    Bartek
Sign In or Register to comment.