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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RS232 woes, hoping someone can point out my mistake 1

Status
Not open for further replies.

DrB0b

IS-IT--Management
May 19, 2011
1,438
US
Gentlemen,
I am having an issue communicating 2 devices via RS232. That sounds simple in theory but it gets more complicated. Between "Machine 1" and my XP laptop, when I am hard wired to "Machine 1" I can transfer data back and forth.

The pinout for the RS232 cable between the laptop and "Machine 1" is :

1-1
2-2
3-3
5-7

9 pin to 25 pin serial

Since this "special" pinout is needed, I cant just plug in a "regular" serial cable and have it transfer anything.

With all that being said, I purchased a RS232 Bluetooth adapter to essentially make this wireless. Since the special pinout is needed, I cant hook the Bluetooth adapter to "Machine 1" and have it work. I tried hooking up a known working serial cable, with the correct pinout, between the Adapter and "Machine 1" but still couldnt get it to transfer files. To the best I can tell, "Machine 1" and my laptop are set correctly with baud, parity, stop bit, total bits, and sync.

Any ideas what I am missing?

What I am using:
Along with this:
Which creates a virtual Com port to talk over. The Adapter has a DCE or DTE mode to physically switch back and forth too.

"You don't now what you got, till its gone..
80's hair band Cinderella or ode to data backups???
 
You're missing handshaking. Even if you are not using handshaking some serial ports won't work if they don't have some indication that you thought about them.

On the 25 you short 4/5 and 6/20. Can't remember on the 9 pin.

With the wireless adapters you probably use standard serial cables, although you may need 9/25 converters to fit and possibly a null adapter.

I've generally found the patch kits to be of help. Thay allow you to do the wiring changes in a small device.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
Even if the cable functions fine without 4/5 and 6/20 shorted? With the cable I made, I just followed the exact pinout above and it transfers files back and forth fine without any shorted pins.

If the "handshaking part is "Xon-Xoff" or the like then I believe I have it set as well. Is synchronization and handshaking two words for the same thing?

I have a basic 25 to 9 adapter on my Bluetooth adapter to fit the 25 pin RS232 port on "Machine 1" I havent tried with a null modem yet, just seems like this is a bit more confusing than it should be.....

"You don't now what you got, till its gone..
80's hair band Cinderella or ode to data backups???
 
That is because you are following RS-232 standards, which is an industry joke for basically no standards at all at the best or about 100 different standards, depending on how many are still supporting 232.

If you are xon-xoff and transferring neither port is one of the weird ones requiring the handshaking to be forced.

I would suspect that you could use standard modem cables 25/25 or 9/25 from their respective machines and only switch from DTE to DCE to have them communicate. Modem cables have the handshaking wired in. I have used a 3rd machine's serial port using xon-xoff to look at the send and receive lines for what is going in and out in similar setups. Or get a 232 tattletale (leds on 8 lines) to see what is active.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
By any chance do both machines have USB ports ? There is a product - I think I've it at Staples or Office Depot or Office Max - that has two flat USB connectors on it and a bump in the middle - plug it into two PCs, and the each see the other as an additional drive.

Fred Wagner

 
Thanks edfair, you were correct in a couple aspects that I was missing.

After getting the machine set up, with Xon/Xoff, and laptop with the same, I could, with a null modem adapter, use my Bluetooth adapter set to DTE. As it turns out, "Machine 1"'s settings weren't holding and were reverting to XMODEM(proprietary?).

@Fred and others - "Machine 1" is a non-Windows based CNC machine with no USB ports and only RS232 to communicate. We are trying to be able to send programs to it from the programmers office to avoid walking around the big machine shop.
That being said, one of the newer CNC machines only has USB and not RS232 and Ive heard of a USB to RS232 adapter. Do they exist? This newer machine is Windows based, XP or 2000 don't remember.

"You don't now what you got, till its gone..
80's hair band Cinderella or ode to data backups???
 
USB to RS232 does exist and does work some come with better drivers than others.
I have used one of them to access a CMTS and it worked OK using Putty (windows 7 no hyper terminal)and have now found that i can get hyper terminal from XP to work on windows 7.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top