Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serial connection using RJ45 and CAT 5 cable

Status
Not open for further replies.

JDMcB

Programmer
Nov 12, 2002
3
IE
I am trying to connect to a printer from my P.C.
Serial connections only on the printer, therefore I am trying to communicate through Serial port (Comm 1) on my P.C, using Serial - RJ45 adapter, and plug directly into comm 1 on the printer (Also RJ45). It doesn't work, but I suspect it's because I'm using a length of Ethernet cable.
I can crimp a new cable, but am not sure of the wire configuration required.
 
JDMcB,

Not much information here.

Are you sure your printer only has a serial connection?
If it has an RJ45 connector, that may be an ethhernet, not serial, connector.

Also, the serial connector on the PC is usually not the RJ45 connector. It could be an RJ11 phone connector or an RS-232 connector.

Serial printers are most often connected with a cable that is usually DB25 or DB9 but it can done with RJ45. The pin-outs for RS-232 over RJ45 are RS-232D in the link below:

Even with the right cable, however, it will not work if you are mixing ethernet and serial ports. Check a little further into what connectors you actually have and then post back.

Hope that helps.
The Old Man
 
Hi Old Man,

Thanks for your reply... I'm sorry, I ain't used to using these forum's, and didn't explain very clearly... I'm trying to go out through COM1 on the back of my PC, and have plugged in a DB9 to RJ45 converter. On the Printer, there are three ports, all RJ45, 1 which is for LAN connectivity, and the other 2 which are COMM1 and COMM2.
I am now under the impression that it may be the adapter I am using which is incorrect. I have looked at the link, but I don't understand which wire is the 'DTE Ready' for example. Is there anywhere I can look to educate myself with this kind of stuff?
 
Here is a couple easy links:


In my experience, there is quite a bit of non-standard serial stuff available. So...get the manual for the printer and see what connections are actually on which pins of the 'serial' port you are trying to connect to. Also, the modular jack to DB-25 or DB-9 adapters are not all built the same. I usually buy the ones that allow us wire them however we want.

That being said, you probably need to build a straight RS-232 cable, and which control pins you use will be somewhat experimental.

It's sometimes tough with printers, many times I have made straight cables for the printer, and found that the program on the PC end doesnt implement the necessary control functions so it would never print. Confusing, let me see if I can give you some basics.

Ground needs to connect to ground
Transmit needs to connect to Receive
Receive needs to connect to Transmit

that is technically all you need....however if the PC or printer or both are looking for handshaking to be implemented, you need to make these wires connect:

RTS ----------- CTS
CTS ----------- RTS
DSR ----------- DTR
DTR ----------- DSR

That should give you full handshaking between the two devices, it MAY be necessary to tie CD to DSR on EACH end of the circuit (the CD pin just gets jumpered to the DSR on each end)

Now, if one end is in need of handshaking, but the other end isnt providing it, you may have to FOOL the device. We do that by wiring each end thusly:

Ground -------- Ground
Transmit ------ Receive
Receive ------- Transmit

CTS -| |- CTS
RTS -| |- RTS

DSR -| |- DSR
DTR -| |- DTR
CD -| |- CD

In case the ascii art is unclear, you only need three wires between the two plugs (ground, transmit, receive). At each plug, CTS connects to RTS, and DTR, DSR and CD get connected together.

As you can see, we are fooling each end into thinking that it is always ready to send and receive data. A few problems that might occur with this set up is data overflow. If you pump tons of data at the printer and it can't digest it all, it could try to tell the PC to stop, but it won't.

Geez I wish serial was easy, but frankly, it can be real trial and error. I use a serial breakout box to monitor the signals and turn things on and off, makes figuring out what you have to do a lot easier.

Hope that helps, good luck!
It is only my opinion, based on my experience and education...I am always willing to learn, educate me!
Daron J. Wilson, RCDD
daron.wilson@lhmorris.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top