Re: [CentOS] resetting a serial port

2023-12-14 Thread Simon Matter
Hi,

> 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?

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

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


Re: [CentOS] resetting a serial port

2023-12-14 Thread Christer M. Fekjan
Typo correction:
ls -l /hello.txt # is it 6 bytes? (text+newline)

On Thursday 14 December 2023 16:06:13 Christer M. Fekjan wrote:
> On serial link type:
> echo hello >> /hello.txt
> 
> Via ssh:
> ls -l hello.txt # is it 6 bytes? (text+newline)
> cat /hello.txt
> # Anything in /var/log/messages or other logs?
> 
> Kind regards,
> Christer
> 
> On Thursday 14 December 2023 02:45:31 Robert Moskowitz wrote:
> > 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
> >
> >
> >
> > ___
> > CentOS mailing list
> > CentOS@centos.org
> > https://lists.centos.org/mailman/listinfo/centos
> 
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] resetting a serial port

2023-12-14 Thread Christer M. Fekjan
On serial link type:
echo hello >> /hello.txt

Via ssh:
ls -l hello.txt # is it 6 bytes? (text+newline)
cat /hello.txt
# Anything in /var/log/messages or other logs?

Kind regards,
Christer


On Thursday 14 December 2023 02:45:31 Robert Moskowitz wrote:
> 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
> 
> 
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
> 
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] resetting a serial port

2023-12-14 Thread Robert Moskowitz
the system I am connected to over the serial uart is one of my major 
servers and I REALLY dislike rebooting it.


On 12/13/23 23:21, Fred wrote:

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

On Wed, Dec 13, 2023 at 8:46 PM Robert Moskowitz 
wrote:


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



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


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


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


Re: [CentOS] resetting a serial port

2023-12-14 Thread Robert Moskowitz

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.

On 12/14/23 00:04, Jon LaBadie wrote:

On Wed, Dec 13, 2023 at 08:45:31PM -0500, Robert Moskowitz wrote:

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



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.



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