2

Currently we've got a Torrey LPC-40L Digital Scale connected via serial port to a Raspberry Pi. We found that if we send the letter "P" over the serial port to the scale, it sends back the current weight. And this already works. We've got a simple Java program running on the Pi that sends a "P," gets back the weight, and then uses that.

We're trying to port this over to a Windows machine (and deprecate the Pi), but unfortunately it seems like, sending the exact same signal in Windows, we get nothing back in response but dead air.

The Pi was connected with a regular serial cable (RS-232 to RS-232); the Windows machine is connected with a Serial to USB cable. When I plug everything in, the serial device successfully shows up in Device Manager (proving that Windows can see it).

I found a simple Serial Port debugging program called Serial Port Utility to test things out on the Windows box. The utility can see that the port is connected, it can open that port, and it can send data to it (again, just trying to send the letter "P"), but we're getting absolutely nothing back in response.

Why would this be different? I know that it should work, because when I plug it into the Raspberry Pi it does work. So why isn't it working in Windows? More importantly, what do I need to do to get it to start responding in Windows?

soapergem
  • 9,263
  • 18
  • 96
  • 152
  • 2
    Use a RS232 line monitor or oscilloscope to compare both situations. Flow control, especially HW flowcontrol, is a likely culprit. – sawdust Sep 24 '14 at 02:55
  • If you connect pin 2 and 3 together on the serial connector, do you receive the characters you type? What programming language are you using? – Jeff Sep 26 '14 at 03:46
  • Presumably you've established that baud rate, data bits, parity, stop bits, and flow control are identical on both systems? – Tremmors Sep 26 '14 at 11:52

1 Answers1

4

So, after ordering an RS-232 line monitor and bringing in an electrical engineer, we were able to figure the problem. Apparently, the USB-to-serial cable effectively reverses the pinouts. So it was as if we had a male serial device talking to a male receptacle, instead of male to female. By placing a null modem adapter in between, this solved everything.

soapergem
  • 9,263
  • 18
  • 96
  • 152