On Wed, 1 Dec 2021 07:10:49 -0700 Charles Curley <charlescur...@charlescurley.com> wrote:
> On Wed, 1 Dec 2021 09:14:11 +0100 > john doe <johndoe65...@mail.com> wrote: > > > I'm using a RS232 cable to connect to a server everything is > > properly set up and works fine. > > For some reasons I lost the connection to my server that is I can > > not control the server using serial console. > > ... > > > > > In other words, how can I reconnect when the cable has been > > disconnected > > The first thing I would do is find out why your cable is being > disconnected, and see to it that it does not happen again. > > But why RS-232? Why not SSH over Internet Protocol (IP)? If it's a > server, it should have some sort of networking. > > Original information is indeed scarce. The OP mentions using a serial console, but that may have been for troubleshooting, and we do not know if the console is the usual client. Many proper servers have at least an option of an RS-232 connection into the BIOS or equivalent, allowing remote control of BIOS parameters and rebooting when necessary. It's an unfitted option on my HP microserver. Many UPS devices have an RS-232 connection to a server to notify of loss of mains, low battery etc. SSH would not normally be an alternative for these functions. Serial may be ancient, but it still has its uses, particularly with PIC/Arduino-level home-made peripherals. Not every job requires a Raspberry Pi. As it happens, one of the functions of my home server is to record outside temperatures from a radio link. That's done with RS-232 (more accurately, RS-485 simplex, there is little genuine 25-pin RS-232/V24 hardware around now) because that's what the radio module provides, and indeed, what the original temperature sensor produces. I'd agree, the ideal solution would be to fix the disconnections, but troubleshooting the occasional drop of a serial link is not a trivial matter. One assumes the receiver is resetting for some reason, as asynchronous serial ('RS-232') doesn't actually have the concept of 'connection', and if the signal is lost or temporarily corrupted, will just pick up again when valid signals resume and the receiver can re-sync. It should be possible to literally pull the plug out of an async serial stream, replug it and have the stream recover after a couple of failed re-syncs. This is clearly not happening here. -- Joe