Terminal Server Handshake

I have a Cisco 2610 router (older model, not the XM version) with a

4- Port Async/Sync Network Module (NM-4A/S). I'm trying to control a serial device through an IP connection to the router.

I will be sending small messages (about 100 bytes at a time using a winsock connection) but the frequency of those messages will be faster than the serial port can handle. For testing, I wrote a small app that sends a bunch of messages one right after another to HyperTerminal sitting on the end of the serial Comm port. The result is that the first message gets there, but the rest are dropped. The winsock send command thinks that the messages got there and reports no error. If I add enough delay between messages, then it seems to work OK. Nothing is returned on the receive end of the socket, even when I turned on flowcontrol { software} on the line and enabled XON/XOFF on the HyperTerminal side.

Is there a way to get some kind of handshake between the Winsock connection and the serial device?

Thanks

Chris Nelson

Reply to
MtbRoadie
Loading thread data ...

Hi again,

~ I have a Cisco 2610 router (older model, not the XM version) with a ~ 4- ~ Port Async/Sync Network Module (NM-4A/S). I'm trying to control a ~ serial ~ device through an IP connection to the router. ~ ~ I will be sending small messages (about 100 bytes at a time using a ~ winsock connection) but the frequency of those messages will be faster ~ than the serial port can handle. For testing, I wrote a small app that ~ sends a bunch of messages one right after another to HyperTerminal ~ sitting on the end of the serial Comm port. The result is that the ~ first message gets there, but the rest are dropped. The winsock send ~ command thinks that the messages got there and reports no error. If I ~ add enough delay between messages, then it seems to work OK. ~ Nothing is returned on the receive end of the socket, even when I ~ turned on flowcontrol { software} on the line and enabled XON/XOFF on ~ the HyperTerminal side. ~ ~ Is there a way to get some kind of handshake between the Winsock ~ connection and the serial device? ~ ~ Thanks ~ ~ Chris Nelson

Well ... if you're using TCP (stream sockets), then you SHOULD have a reliable, flow controlled connection between your app and the router. No data should be lost.

The router will drain the data arriving on TCP connection at the nominal bit rate of the async line. Assuming that the device hanging off the async line can handle all the data arriving at the port speed, then you should use no data. If that device cannot handle data at the full port speed, then use software or hardware flowcontrol.

Are you SURE all the data that your app thinks it's writing, is making it into the TCP connection? You might use windump/wireshark to do a capture and verify this.

Aaron

Reply to
Aaron Leonard

Yes, I have a reliable TCP connection to the router. I also have a reliable device hanging on the async line that can easily handle data at the connected port speed. The problem is that I can pump data into the router from the TCP connection at speeds much faster than the port speed, so something has to give. I was hoping for the router to carry the flow control from the serial device back to the TCP socket client so it can pause until the port is ready to take on more data.

I am using Ethereal as the network analyzing tool. It is a free download and very cool.

Chris

Reply to
MtbRoadie

~ On Apr 30, 4:32 pm, Aaron Leonard wrote: ~ > Hi again, ~ >

~ > ~ I have a Cisco 2610 router (older model, not the XM version) with a ~ > ~ 4- ~ > ~ Port Async/Sync Network Module (NM-4A/S). I'm trying to control a ~ > ~ serial ~ > ~ device through an IP connection to the router. ~ > ~ ~ > ~ I will be sending small messages (about 100 bytes at a time using a ~ > ~ winsock connection) but the frequency of those messages will be faster ~ > ~ than the serial port can handle. For testing, I wrote a small app that ~ > ~ sends a bunch of messages one right after another to HyperTerminal ~ > ~ sitting on the end of the serial Comm port. The result is that the ~ > ~ first message gets there, but the rest are dropped. The winsock send ~ > ~ command thinks that the messages got there and reports no error. If I ~ > ~ add enough delay between messages, then it seems to work OK. ~ > ~ Nothing is returned on the receive end of the socket, even when I ~ > ~ turned on flowcontrol { software} on the line and enabled XON/XOFF on ~ > ~ the HyperTerminal side. ~ > ~ ~ > ~ Is there a way to get some kind of handshake between the Winsock ~ > ~ connection and the serial device? ~ > ~ ~ > ~ Thanks ~ > ~ ~ > ~ Chris Nelson ~ >

~ > Well ... if you're using TCP (stream sockets), then you SHOULD have ~ > a reliable, flow controlled connection between your app and the router. ~ > No data should be lost. ~ >

~ > The router will drain the data arriving on TCP connection at the nominal ~ > bit rate of the async line. Assuming that the device hanging off the ~ > async line can handle all the data arriving at the port speed, then you ~ > should use no data. If that device cannot handle data at the full port ~ > speed, then use software or hardware flowcontrol. ~ >

~ > Are you SURE all the data that your app thinks it's writing, is making ~ > it into the TCP connection? You might use windump/wireshark to do a ~ > capture and verify this. ~ >

~ > Aaron ~ ~ Yes, I have a reliable TCP connection to the router. I also have a ~ reliable device hanging on the async line that can easily handle data ~ at the connected port speed. The problem is that I can pump data into ~ the router from the TCP connection at speeds much faster than the port ~ speed, so something has to give. I was hoping for the router to carry ~ the flow control from the serial device back to the TCP socket client ~ so it can pause until the port is ready to take on more data.

Right, that's the way it's supposed to work. If it doesn't work like this, then that would be a bug.

~ I am using Ethereal as the network analyzing tool. It is a free ~ download and very cool.

Definitely, that's the one (although it's been renamed to Wireshark now.)

Regards,

Aaron

Reply to
Aaron Leonard

A bug or I don't have the right setup on the line.

line 34 modem DTR-active no exec transport input telnet flowcontrol software

interface Serial1/1 physical-layer async no ip address encapsulation slip

Is there anything else there that I need? The serial device is set up for FlowControl - XOn/XOff.

There are no messages returning to the TCP socket client indicating that the line is busy.

Chris

Reply to
MtbRoadie

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.