GSM 调制解调器与 Android 设备之间的通信

发布于 2024-12-02 18:43:18 字数 334 浏览 1 评论 0原文

我有一台运行 C# 服务器应用程序的服务器。该应用程序应该定期通过 GSM 调制解调器连接到一组设备(运行 android 2.2 的触摸板)并下载一些文件。 这是我第一次接触 GSM 通信,所以我真的很迷茫。到目前为止,我猜测我需要 AT 命令来进行通信,但我不确定如何进行。

我猜第一步是拨打 ATD。当我收到响应时,如何要求设备向我发送数据? 我是否需要在设备上编写一个应用程序/服务来接听我的电话?我需要的数据存储在我的 SD 卡上的 txt 文件中,但如果方便的话我可以将其放在任何地方。

如果您能帮助我编写一些执行类似操作的 AT 代码或任何帮助我理解如何完成这项工作的代码,那就太好了。

谢谢

I have a server running a C# server app. The app is supposed to periodically connect through a GSM modem to a set of devices(touchpads running android 2.2) and download some files.
It's the first time I come across GSM communication so I'm really lost. So far I'm guessing i need AT commands to communicate but I'm not sure how.

I'm guessing first step would be dialing ATD. When I get a response, how can i ask the device to send me data?
Do I need to code an app/service on the device that answers my calls? The data i need is stored into txt files on my SD card, but i can put it anywhere if it makes it easier.

It would be really nice if you could help me with some AT code that does similar things or anything that helps me understand how to make this work.

Thanks

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

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

发布评论

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

评论(2

心的憧憬 2024-12-09 18:43:18

您将需要一个互联网服务器来协调(或至少启动)移动网络设备之间的通信。这需要有一个服务器类型的互联网服务提供商 - 即允许所需传入连接请求的防火墙、至少在短期内静态的 IP 地址、指向它的域名等。

此时您的服务器运行 C# 程序不需要自己的 GSM 调制解调器(除非其位置不可用有线服务)。如果您确实通过 GSM 连接它,那么您将需要另一台具有服务器类型 ISP 的服务器来设置它和平板电脑之间的连接,因此您不妨只在那台计算机上运行 C# 程序。

本质上,您根本不会直接处理 GSM - 您只需编写在某种程度上受限的 IP 网络上运行的应用程序,该网络不允许向客户端发出连接请求。平板电脑上的 Android 堆栈完全向应用程序开发人员隐藏了与内置 GSM 调制解调器交互的过程 - 您只能看到 Java 或 C 语言中的普通网络套接字接口

。服务器和平板电脑在一个小区域内,看看 wifi 或类似 zigbee 的东西。

You will need an Internet server to mediate (or at least initiate) communication between the mobile-network devices. This will need to have a server-type Internet Service Provider - ie, firewall that allows the desired incoming connection requests, an IP address that's static at least in the short term, a domain name pointed at it, etc.

At that point your server running the C# program has no need for a GSM modem of it's own (unless wired service is unavailable to its location). If you do connect it via GSM, then you'll need yet another server with a server-type ISP to setup connections between it and the tablets, so you might as well just run your C# program on that machine.

Essentially, you will not directly deal with GSM at all - you'd just be writing applications to run on top of a somewhat limited IP network which doesn't permit connection requests to the clients. The android stack on the tablets entirely conceals the process of interacting with the built-in GSM modem from the application developer - you just see a normal network sockets interface, in java or C.

If you want to do something with direct radio communication between a server and tablets in a small area, look at wifi or something like zigbee.

躲猫猫 2024-12-09 18:43:18

对于这种类型的通信,C2DM 将非常适合您。但是您确实需要编写一个应用程序来响应您的请求并将数据上传到服务器以及为服务器编写推送消息脚本

For this type of communication C2DM would be perfect for you. But you do need to write an app to respond to your request and upload the data to the server as well as writing a push message script for the server

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