#633 USB to RJ45 Adapter
Building a USB to RJ45 adapter with the CH340G and MAX3232 chipsets.
Occasionally one will run into a device that uses an RJ45 serial connector instead of the old DE-9 connectors. They are still carrying RS-232 serial
A RJ45 connector is a modular 8 position, 8 pin connector used for terminating Cat5e or Cat6 twisted pair cable.
RJ45 connectors used in this way are generally 8 position, 8 pin connector modular connectors used for terminating Cat5e or Cat6 twisted pair cable. The wiring usually follows the T568A or T568B assignments that are defined in ANSI/TIA-568.
I am using RJ45 T568B cables in this mini project.
The EIA/TIA-561 standard describes the use of 8P8C connectors for RS-232 serial interfaces.
However it appears many vendors have their own proprietary wiring schemes, which would explain why cables dont always work as expected! The table below shows the T568B wiring color scheme with EIA/TIA-561 pin assignments, compared with SGI Onyx2 pin assignments, and finally the pin assignments for the device I grabbed to test with (Nomadix AG2400).
|Pin||T568B color||EIA/TIA-561 Serial||SGI Onyx2||Nomadix AG2400|
The connector on my cat5 cable:
The construction builds upon a previous project LEAP#510 USB to RS-232 Adapter, adding as RJ45 adapter made from a spare length of Cat5 with RJ45M connector. A strip of 10-wire IDC cable is used to connect the RJ45 adapater to the main USB to RS-232 Adapter subsystem.
Connecting with Screen
NB: the CH340G may require drivers to be installed - see [LEAP#406 UsbUartCH340G] where I covered this in detail.
I’m using MacOSX, so (as with Linux) the most handy console utility is screen.
The device I am connecting to for a test requires 9600 baud, with 8 data bits, no parity and 1 stop bit.
The CH340G adapter was connected on
/dev/tty.wchusbserial1410 device, so a screen session
is started with the command:
$ screen /dev/tty.wchusbserial1410 9600,cs8,-parenb,-cstopb,-hupcl
…and communication is up and running without any problem:
Credits and References
- LEAP#510 USB to RS-232 Adapter
- RJ45M 8P8C - wikipedia
- AN-917 Popular Connector Pin Assignments for Data Communication - TI Application Report
- RJ45 Pinout
- SCSI Terminal Server (STS) and Etherlite Signal and Cable Pinout information -some good general connector information for various DCE/DTE configurations