简体   繁体   English

添加GSM功能以连接到azure移动服务

[英]Adding GSM function to connect to azure mobile service

I am a beginner in Windows store development, so not sure how to do it. 我是Windows商店开发的初学者,所以不知道该怎么做。

refer to this tutorial: Get started with Mobile Services 请参阅本教程: 开始使用移动服务

I want to add connection to my GSM modem(Sony Ericsson K750i) and capture the incoming SMS from the GSM to update to the Azure database. 我想添加到我的GSM调制解调器(索尼爱立信K750i)的连接,并从GSM捕获传入的SMS以更新到Azure数据库。

But I need some resources and tutorial on how to connect to my GSM in C# or VB.net. 但我需要一些资源和教程,如何在C#或VB.net中连接到我的GSM。 Can anyone help me with it? 任何人都可以帮助我吗?

I have searched in the web but there are too many different tutorial and installer/toolkit, so I am a little confused. 我在网上搜索过但是有太多不同的教程和安装程序/工具包,所以我有点困惑。

From your question, I understand that you are working in the Windows 8 UI (formerly known as Metro), not the Windows 8 desktop. 根据您的问题,我了解您使用的是Windows 8用户界面 (以前称为Metro),而不是Windows 8桌面。

In this case you need the Windows 8 Mobile Broadband API and the Windows 8 SMS API. 在这种情况下,您需要Windows 8移动宽带API和Windows 8 SMS API。

Here is the documentation for Windows.Networking.NetworkOperators, which includes Mobile Broadband. 以下是Windows.Networking.NetworkOperators的文档,其中包括Mobile Broadband。
Here is the documentation for Windows.Networking.Connectivity, which includes network adapters. 以下是Windows.Networking.Connectivity的文档,其中包括网络适配器。
Here is a tutorial about using Win 8 Mobile Broadband. 是一个关于使用Win 8移动宽带的教程。

Here is the documentation for Windows.Devices.SMS. 是Windows.Devices.SMS的文档。
Here is a tutorial about using the Windows 8 SMS API. 是一个关于使用Windows 8 SMS API的教程。

Note that these are different from the APIs that you would use for a Windows 8 desktop application - those APIs are documented here. 请注意,这些与用于Windows 8 桌面应用程序的API不同 - 这些API在此处记录。

EDIT: Windows 8 UI is the green part with the tiles that you see when you first start Windows 8. The Windows 8 desktop is the traditional Windows interface, that you can reach by clicking on the desktop tile. 编辑:Windows 8 UI是您第一次启动Windows 8时看到的磁贴的绿色部分.Windows 8桌面是传统的Windows界面,您可以通过单击桌面磁贴来访问它。 Applications in the UI must use different Windows APIs from applications in the desktop. UI中的应用程序必须使用桌面应用程序中的不同Windows API。

From another question that you posted, I saw that you haven't got the right drivers for Windows 8, and this also affects what you can do. 从您发布的另一个问题,我看到您没有适合Windows 8的驱动程序,这也会影响您可以执行的操作。
In order to use any Windows Mobile Broadband API, you must be able to see your device as a Windows network adapter. 要使用任何 Windows Mobile Broadband API,您必须能够将设备视为Windows网络适配器。 To check this, connect your device and open Windows Device Manager, and check if your device appears under Network Adapters. 要检查此项,请连接您的设备并打开Windows设备管理器,然后检查您的设备是否显示在网络适配器下。 If yes, then you can use Windows APIs. 如果是,那么您可以使用Windows API。 If no, then you can't use these APIs. 如果不是,那么您就不能使用这些API。

There is another possibility for using the device as a GSM modem, and that is AT commands, as suggested in the answer to your other question. 还有另一种可能性将设备用作GSM调制解调器,这是AT命令,如您对其他问题的回答中所建议的那样。
To be able to use AT commands, your phone must expose a modem port, and you should be able to see this in Windows Device Manager. 为了能够使用AT命令,您的手机必须暴露调制解调器端口,您应该能够在Windows设备管理器中看到这一点。 You will be able to access this modem port from a Windows 8 desktop application. 您将能够从Windows 8桌面应用程序访问此调制解调器端口。 BUT, I am almost sure that you can't access the modem port and use AT commands from the Windows 8 UI (but check that out). 但是,我几乎可以肯定您无法访问调制解调器端口并使用Windows 8 UI中的AT命令(但请检查出来)。

There are lots of examples on Stack Overflow and the rest of the internet of how to open the modem port and send and receive AT commands, from a .NET application. 在Stack Overflow和其他互联网上有很多关于如何从.NET应用程序打开调制解调器端口以及发送和接收AT命令的示例。
If you only get yellow triangles in Windows Device Manager, or if your device is not seen at all, then you must get the correct drivers, or get another modem that is recognised on Windows 8. 如果您只在Windows设备管理器中获得黄色三角形,或者根本看不到您的设备,那么您必须获得正确的驱动程序,或获得在Windows 8上识别的另一个调制解调器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM