Resetting A Serial Port

Home » CentOS » Resetting A Serial Port
CentOS 6 Comments

I have CentOS 7 arm32 running on a Cubieboard and I am logged in as root on its serial uart from another system.

On that system I use

screen /dev/ttyUSB0 115200

Well it was working well for a couple days, but now only garbage comes across.  Something messed up the serial link.

pulling the usb cable to the usb/serial adapter does not reset things.

I can SSH into the server and see root logged into ttyS0

How do I reset that serial port so that I can work on the system?

thanks

6 thoughts on - Resetting A Serial Port

  • have never used usb-to-serial devices, so I’m probably wrong here… wondering if, on the system where you work, have you tried using the reset or tset command?

    otherwise, though *being a Linux user I hate to suggest this*, but have you tried the “universal-fix-all-problems” technique that Windows users learn early on, i.e., reboot one or both systems? rebooting one of the systems then trying to connect may tell you which system is wedged. maybe.

    Good luck!

    Fred

    CentOS mailing list CentOS@CentOS.org https://lists.CentOS.org/mailman/listinfo/CentOS

  • Channeling old memories of serial communications :((

    Sounds like you are still connected. One way to tell is to pretend things are working even if you only see garbage.

    For example, if you press several times, do you get the same garbage each time (likely the shell prompt coming back to you).

    If after an Enter and return garbage you type ls
    is the garbage different, probably larger, and likely ending with the same garbage as a solo
    (the prompt)

    Then try to reset your stty communication settings by carefully typing

    stty sane

    Don’t try to correct typo’s, just hit enter and start again.

    Should that not work, SSH back in and kill the shell session on ttyS0. Typically the communication settings are returned to a default set by a program called getty which then exec’s into the login program.

    Good luck.

  • How do I kill the shell session on ttyS0?

    ls did nothing. nor stty sane

    but I think I saw all those characters echoed back.

  • the system I am connected to over the serial uart is one of my major servers and I REALLY dislike rebooting it.

  • Hi,

    I don’t know how you can handle the wedged connection. But, I think you troubles may come from the settings used. 115200 baud can be too fast to run for a long time without errors. Also, I don’t know how the default handshaking is configured but maybe you have to add such settings as well. Maybe something like “screen /dev/ttyUSB0 19200,ixoff,ixon” would work?

    Regards, Simon