2

I'm currently looking at options for interfacing with an RS-232 modem that only supports half-duplex communication.

At first, I thought setting up a PPP connection would be viable, but it sounds like it anticipates a full-duplex connection even with hardware flow control enabled. The application I'm looking into is mostly upload on the "field" side and I'd like to have it configure the channel as such. IE the "field" side should mostly have a CTS during normal operations.

A few options I've considered...

I may just "try" PPP once I have access to the modems and see how it behaves but looking through the code it appears it does not ever assert RTS.

Create my own HDLC framed protocol handler stack in Netty.

Create a TTY pair with PPP on one side and a half-duplex handling application on the other which communicates with the actual serial port and modem.

Any thoughts or best approaches?

Thanks.

steveturner
  • 189
  • 9
  • The modem may be half duplex across the other side, but on the RS-232 the idea of half-duplex makes no sense at all. RS-232 uses separate pins for Tx and Rx data. Since the physical medium isn't shared between Tx/Rx, I can't see why anyone would have created a half-duplex RS232 device. Even if it was the case, your half-duplex modem can use standard HW flow control to enforce half-duplex (when it Transmits, it can deassert RTS to make sure you don't send data at the same time) – TJD Jun 19 '13 at 17:57
  • I'm confused as well. I'm not certain how it communicates as it says the port supports PPP. But, I would think switching channel direction is expensive which I foresee happening if TCP is in use over PPP with a substantial RTT. In your second case, using HW flow control to enforce half-duplex I would guess I don't assert RTS on the host side of the RS232 interface. Instead relying only on the modem to assert CTS indicating that I can send...? Guess I really need a more detailed specification... – steveturner Jun 19 '13 at 20:00
  • Is PPP especially chatty? IE if one side is primarily transmitting UDP over the connection, transmission won't be interrupted unless the PPP protocol issues a "ping"? – steveturner Jun 19 '13 at 20:11

1 Answers1

0

The reason it is half-duplex (even though it is RS232) is probably because the data line out of the modem is half-duplex. The RS-232 interface is for connecting to the local PC; which RS-232 is fairly common. The other end (the modulated end), is probably RS-485 or some other hardware protocol that supports half-duplex. A dead giveaway would be the number of data lines required on the modulated interface. if it is less than 4, then it is more than likely a half-duplex hardware protocol of some sort.