Using an Rj45 to D9 RS232 Adaptor with a laptop to control an RS232 device

Solution 1:

No. Ethernet ports can't transmit or receive RS-232 signals.

If your laptop has a traditional DB9 RS-232 serial port, use that with the appropriate serial cable. If it doesn't, use a USB to RS-232 serial adapter.

Solution 2:

If you have something like this item, then it is merely a pinout adapter and not a serial/ethernet device.

https://cdn3.volusion.com/uvrp7.f3o9w/v/vspfiles/photos/319016-2.gif?1401188765

You could use one of these on each end of a RJ45 cable to make a serial cable. That serial cable could run through structured cable installed inside a wall or similar, but it cannot run through an ethernet switch or vlan.

Solution 3:

I've got an RJ45 to D9 RS232 Adapter that I want to use to control an RS232 device in the following config:

Whether you can accomplish your goal depends on exactly what this "adapter" that you have can do.
There certainly are "serial to Ethernet converters" designed for the connection you proposed:

Laptop RJ45 Ethernet port -> Cat6 patch lead -> D9 RS232 adapter -> RS232 Device

which looks a lot like the product application: enter image description here.

So what is a serial Ethernet converter used for?

Most commonly it is used for connecting a serial RS232, RS485 or RS422 device such as a serial printer, barcode scanner, scale, GPS, sensor or any other consumer or industrial device with a serial interface, to a computer over a standard LAN network.
The advantage of this is obvious; you will be able to control, monitor and communicate with your serial device remotely from a central computer.


How does a serial Ethernet converter work?

The circuitry inside the converter can convert IP/TCP packets to serial data and also convert serial data to IP/TCP packets, so it works in both directions. Before you can start using the converter you need to install driver software on your computer. This driver software is also called virtual COM software because it creates a virtual COM port in your computer's Device Manager when the converter is connected to your computer. Virtual COM software is usually included with the converter, at least if you buy from a reputable seller.

Once the virtual COM port has been created by the Serial to Ethernet converter's driver software the COM port will show up in your computer's Device Manager as if it was a standard built-in COM port, however it actually is the COM port in the converter at the other end of the Ethernet.


Images of serial to Ethernet converters


Solution 4:

The physical signalling, and even more so the logical protocols, used by Ethernet are completely different from those of serial ports, so it's impossible to directly connect a laptop's LAN port to a device's serial port.

However, the same connector is often used for both. I think the usage of an "RJ45" connector for serial console was made popular by Cisco, but network devices from other vendors use the same connector. If you have an adapter with a DE-9 on the other end, and an "RJ45" on the other, it's most likely a Cisco-style console cable. Like this one (image from Wikipedia):

enter image description here

To connect your laptop to a serial port of a device locally, just get a USB serial port adapter. They should be readily available and drivers for the common ones (FT232R and PL2303) can be found for most operating systems.

However, if your use case is to connect to a serial port remotely, as in over the network, then that won't work. You'll need something that connects to the network and talks with the serial port of your device. There are commercially available devices that do just that (terminal servers), but you could solve that with another serial-equipped computer too.