with USB port we can search Product ID (PID) and Vender ID (VID) of connected devices by using
lsusb command. Is there a similar way to get PID and VID if the same device is connected to RS232 serial port
USB has a standardized method to learn device information including PID and VID. This information is available by the enumeration phase and takes place of the control endpoint. This is possible because there is an additional protocol on top of the raw data signals.
The RS232 serial port is much simpler and does not have similar functionality defined. Data is data, and its interpretation is up to the user/ program using that port. There is no VID nor PID defined for a RS232-connected device such as a printer.