开发者

Using SerialPort class for modem to modem communication

开发者 https://www.devze.com 2023-03-23 19:20 出处:网络
I\'m rewriting a legacy app that sends pager messages via TAP and modems. So I\'m having to write a new TAP client in C#. Using SerialPort is trivial but I\'m not sure about how to handle conditions s

I'm rewriting a legacy app that sends pager messages via TAP and modems. So I'm having to write a new TAP client in C#. Using SerialPort is trivial but I'm not sure about how to handle conditions such as:

  • excessive ringing with no answer
  • no dialtone
  • busy signal detection (I understand that this isn't enabled in every modem so this is optional开发者_JS百科)
  • remote modem answers

Then also how do I read received data in a synchronous manner? TAP is synchronous so I will be issuing commands and then expecting some type of response from the remote machine. I think my biggest issue is figuring out how data will be terminated. Is it standard for modem data to be terminated by a CR or maybe CR-LF?

Some pointers would be great and any references that I could go read myself is wonderful too.


Is this a question regarding Serial Communication or the TAP? I've never had to work with TAP, but I have had to work with serial communication hardware (albeit quite a few years ago.)

I just found this PDF specification document and I searched for "terminat". It brings up 8 different words with that series of text, 7 of which appear to be in reference to your request.

I'm not sure of how much experience you have with serial communication or legacy communication systems & hardware but you may find HyperTerminal to be immensely useful and it is part of Windows. There is other serial/terminal software out there, but HyperTerm is free and simple to use.

You can use HyperTerm to send and receive codes to your devices and inspect the data that is sent/received. Then, you can use the communication dumps to reverse-engineer the TAP communication.

-- EDIT --

In regards to interacting with the modem, I'd research a bit about the Hayes command set. Hayes was a company that made modems in the early 80's. According to what I've read their modem commands have become pretty standard ever since then. Glancing at the available modem commands, I think there is a solution for your questions but you may need to do a bit of experimentation.

I'll be honest, I've never had to work directly with modem hardware, so the information that I am providing is based off of the research I've found this afternoon. These tips are what I would assume and attempt if I were in your shoes. For more information, google "Hayes Command Set" or check this article.

Hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消