OK, so the PC is not the important thing but the mystery device attached to the COM port is?
Unfortunately, the COM port is a very low-level connection with no automatically provided metadata, so there is no universal tool like
lsserial that could straight up tell you useful information to identify the device with 100% confidence.
If you cannot identify the software communicating with it (perhaps by using
fuser /dev/ttyS* and getting the process information on any PIDs revealed), and use that as a clue, or if there are no processes actively using the device, then you must try and "talk" to the device and see if it responds to a commonly-used protocol, as indicated by @mosvy.
If a COM port-connected device is in use, there is a reasonable probability that there might be some kind of serial-port-oriented terminal emulator installed, like
seyon or similar. Even an old-school UUCP serial port utility like
cu might be useful. If you can find signs that they've been used, or existing configuration files for them, you might be able to find out the serial port parameters used from them, otherwise there might be a lot of trial and error required.
Modems would generally respond to "ATEnter" with "OK", and would often auto-detect the COM port speed; once basic communication was established, you could use
ATI1 Enter and other ATI commands with increasing numbers to get basic identification information from the modem.
Things like GPS time receivers or UPSes might periodically output some data on their own, and might use a speed as low as 1200 bps. Switches, routers and similar network hardware might present a recognizable login prompt, typically using port speeds like 9600 bps, 38400 bps or 115200 bps. Another variation would be whether or not hardware handshaking (RTS/CTS and/or DSR/DTR) is required or not. For the bits/parity combinations, the overwhelmingly most common one is 8n1, i.e. 8 data bits, no parity, 1 stop bit.
You might also try more indirect methods like checking the shell history file of the
root user for any special commands used before in association with the COM port.
Getting someone on site to actually look at the device at the end of the COM port cable and e.g. taking a photo of the device with any identifying information like manufacturer's logos or model numbers clearly visible would be great, but I guess that you wouldn't be asking if that was easily doable.
Printers are probably the hardest to identify remotely over a COM port: for example, the Epson ESC/P printer command language does not seem to include any commands at all for status readback. If the printer understands PCL, it might also understand PJL. In that case, you might try this:
(exec <>/dev/ttySn; stty sane; printf "\e%-12345X@PJL INFO ID\n" >&0; cat)
If the printer understands PJL, it should respond with its model identification.By replacing the word
ID with either
VARIABLES, you might then get even more information from the printer.