Debugging DB9 to RJ45 cables - Loop-back Test
The schematic at right is for the
DB9 to RJ45 adaptor cable
used on WBo2 units starting with version 2.
Note that although the WBo2 unit uses an RJ45 connector, the port is NOT compatible with Ethernet networks
and is simply a convenient and readily available multi point connector we use.
Do not use an RS232 cable designed for other equipment, or Ethernet cables with RJ45 plugs.
Follow this procedure to find where "RS232 is broken":
- A. We recommend you use one of the Tech Edge utilities like WButil Terminal.
Firstly note that windows software cannot share COM ports used by other programs.
The COM ports shown on WButil's General Tab are COM ports not being used by other programs.
If another application has grabbed the COM port you should be using, then you'll have to close that other program.
You then should be able to select the COM port you need to use (clicking on the COM port select [down-arrow] button scans for new COM ports automatically).
If you're unsure of the COM port you'll have to try them one by one as follows.
Note: make sure you connect the WB unit (or power the WB unit up) AFTER you have booted your PC.
This is because Windows may try to auto detects a serial mouse, and the default
- B. Select the COM port to try from WButil's drop down menu under the General tab.
Go to the Terminal tab.
Now, when you typed into the Cmd: box, and press the ENTER key,
that text will be sent out on the RS232 line. If there is an electrical loop back, the character(s) type will be sent back
and received. WButil will display them in the large text area.
Note that if Keep Text? was checked then to generate text data, simply type
[ENTER] while the cursor is in the Cmd: area, and your existing text will be sent.
- check the [√]Keep Text? option.
- check the [√]Auto CLS? option.
- uncheck the [ ] [History]? option.
- On the unlabelled drop down menu, select [No Translation]
First, to test that you have selected the correct COM port, you create a loop back on the PC's DB9 connector (or
the PC's USB to serial adaptor's DB9 connector).
Use a small screwdriver to short between pins 2 and 3 of the male DB9 - that is, the COM port from your PC (see image at right).
Make sure you don't short to the metal connector shell .
(for the purist: you could make up a short piece Of wire with two minifit terminals covered with heatshrink).
Remember that you should NOT accidently short pins 2 & 3 to the metal shell of the DB9 as this will short the drive signal to GND.
It may be easier, if you have a spare unsoldered DB9 female (ie. a mating) connector - plug it into the COM port (male) DB9 connector
and then it easier to short pins 2 & 3 together and there is no metal surround.
- C. When you get characters echoing then you know your PC's COM port is working at the most basic level - go to F below.
Remember, as noted above, you do NOT have to set the COM port parameters under your operating system as WButil sets them on-the-fly.
If you do not have male pins on the DB9 (but rather female socket holes), then you may be using the wrong connector -
some PCs use something like a O|0|O||O symbol to identify the COM port.
Another possibility is you have a cable or other adaptor between the COM port (typically at the back or your PC) and where you are connecting to it -
this adaptor must be female-to-male, one-to-one, and straight-through, but you only need to have pins 2, 3, and 5 connected
(so your adaptor cable is 2-2, 3-3, & 5-5 with one male plug end and another female socket end).
A typical extension adaptor cable is shown at right.
- D. If you are "sure" your COM port is working but cannot get it to echo, then something is still amiss!
You must get characters to echo before moving to the next step.
Check you are
- are you using the right physical port?
- selecting the correct port from the drop down menu?
- Shorting pins 2 and 3 (they are the second and third from the left on the top row of the MALE plug.)?
- Are you shorting either 2 or 3 to GND (don't!)?
- Do you have another application using the COM port you think is free.
- The least likely scenario is a bad COM port, but this is possible, so see next step!
- E. As a last resort you should try an application and physical device you know should work on your COM port.
Perhaps this is the first step in checking the COM port, but if all else fails ...
Another option is to use a USB to serial adaptor, but these have their own set of possible issues.
But if you have one, then try it out!
Simply go back to step A above but note that when you plug in a USB-to-serial adaptor, you should see that there's
now another COM port in WButil's drop down menu.
- F. Lets assume you got characters to echo at step B.
Now we have to make sure the DB9 to RJ45 adaptor cable, that came with your wideband controller, is doing the job properly.
The first cable schematic shows that the Tech Edge supplied cable swaps pins 2 and 3, and connects 5 to 5.
To loop-back, simply connect a wire between pins 2 and 3 on the RJ45 and see if you can get character echoes.
OK! Easier said than done - try two single edged razor blades held together at one end, with the blades
resting on pins 2 and 3 as shown in the image.
If no luck then make sure that when looking at the RJ45 clear plug, pin 2 has the red wire, and pin 3 has the white wire,
and that you are connecting to those two pins.
If no luck then use a multi-meter (or other low current device) to measure continuity between pin 3 on the DB9 to pin 2 on the RJ45,
and from pin 2 on the DB9 to pin 3 on the RJ45, as well as pins 5 to 5.
- G. If you do get echo at the previous step make sure you don't get an echo when you now take the wire (or razor blades) away.
This ensures there's not an inbuilt short that can prevent comms from happening.
- H. At this point you should have found the problem with your cable and/or your COM port, but there is still the possibility
that the wideband unit can still not be seen from your PC. In this case it's probably that the RS232 inside the wideband
unit has a problem. If you have a DIY unit then it should be easy to trace the problem using the supplied schematics.
for a DIY unit you may have a bad RS232 transceiver (typically an ST202 or HIN202 DIP-16 package).
A remote, but still possible, scenario is that the RS232 comms within the CPU has somehow died, and a CPU can fix the problem,
but it's more probable you have a short or open circuit somewhere, or have not selected the correct port (or it's taken by another application).
- I. If you can't find the problem, then emailing me with extra information may help me find your problem
(and I will update this page), but I'm not a clairvoyant, and will be very unhappy if you ask me questions that are
answered here, or are posed here for you to answer yourself!
- J. Here's where you give up and send it for us to look at!