如何用C#像超级终端一样通过调制解调器将数据发送到另一台计算机

发布于 2024-09-13 06:28:05 字数 236 浏览 3 评论 0原文

我需要创建一个程序,让我可以通过调制解调器发送一串数据或一个文件,就像超级终端一样。我正在尝试创建一个程序,让我可以将电子账单数据发送到 Medicare,并且由于 Medicare 只通过调制解调器接受电子账单,因此只能使用超级终端或另一个名为 PC ACE Pro32 的程序。

我想创建自己的程序,因为超级终端对用户不友好,而另一个程序有太多用于发送数据的东西。

我以前从未有过为数据通信创建代码的经验。有人可以帮我吗?

I need to create a program that lets me send a string of data or a file through modem, like hyper-terminal does. Im trying to create a program that lets me send electronic billing data to Medicare, and since Medicare only accepts e-bills through modem, only hyper-terminal or another program called PC ACE Pro32 can be used.

I want to create my own program, since hyper-terminal is not user friendly, and the other program has too many things for just sending data.

I've never before had experience creating code for data communication. Can somebody please help me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

靖瑶 2024-09-20 06:28:05

这里有很多部分,所以让我将其分解为几个子问题给您:

1)如何在 C# 中进行串行通信?

互联网上有很多例子。快速搜索就会发现这个 和这个,两者似乎都是好的。这里还有很多关于 C# 串行通信的问题。

2) 如何控制调制解调器?

调制解调器由AT 命令集的某些版本操作。如果您熟悉在超级终端中手动操作调制解调器,那么您实际上是在做同样的事情,但是是在代码中。例如,要测试您的调制解调器是否正在注意(即,您的串行线路正在与调制解调器正常通信),您可以发送 AT,并查看调制解调器是否回复 OK.要拨号,请发送调制解调器 ATDT <电话号码>。一旦调制解调器建立了运营商,那么您通过串行端口发送的任何内容都会传输到远程计算机。

3) 我如何与 Medicare 的电子索赔系统通信?

这个就看你的了!如果他们没有基于网络的索赔服务,我会感到惊讶。我希望这比通过调制解调器进行要容易得多。

There are a lot of pieces here, so let me break this down into sub questions for you:

1) How do I do serial communication in C#?

There are plenty of examples on the internet. A quick search turns up this one and this one, both of which seem to be ok. There are also lots of questions here on SO about C# serial communication.

2) How do I control a modem?

Modems are operated by some version of the AT command set. If you're familiar with manually operating a modem in HyperTerminal, you're essentially doing the same thing, but in code. For example, to test if your modem is paying attention (i.e., that your serial line is talking to the modem properly), you send AT, and see if the modem replies with OK. To dial, you send the modem ATDT <phone number>. Once a modem establishes carrier, then whatever you send down the serial port is transmitted to the remote computer.

3) How do I communicate with medicare's electronic claims system?

This one is up to you! I'd be surprised if they didn't have a web-based claims service though. I would expect that would be a lot easier than doing it over a modem.

少女七分熟 2024-09-20 06:28:05
  1. 在远程计算机中定义接收连接。
  2. 像任何拨号连接一样设置与远程计算机的连接。
  3. 使用套接字编程 (TCP) 向远程计算机发送数据/从远程计算机接收数据。请注意,您必须创建驻留在远程和本地计算机上的客户端/服务器应用程序。
  1. Define a receiving connection in remote computer.
  2. Set up a connection to remote computer just like any dial-up connection.
  3. Use socket programming (TCP) to send/receive data to/from remote computer. Note that you must create a client/server application that resides in both remote and local computer.
薄荷→糖丶微凉 2024-09-20 06:28:05

赛斯,你的答案实际上非常有希望。我会立即查看这些建议的链接。

(是的,医疗保险应该转移到以太网,但现实是他们陷入了拨号,因为他们说“它比以太网更安全”,但实际上并非如此。

Seth, your answer is actually very promising. Ill be taking a look at those suggested links right away.

(yes, medicare should be moving to ethernet, but reality is that they are stuck in dialup because they say that "it's more secure than ethernet", when in reality it's not.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文