سؤال

I am a beginner in Windows store development, so not sure how to do it.

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.

But I need some resources and tutorial on how to connect to my GSM in C# or VB.net. 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.

In this case you need the Windows 8 Mobile Broadband API and the Windows 8 SMS API.

Here is the documentation for Windows.Networking.NetworkOperators, which includes Mobile Broadband.
Here is the documentation for Windows.Networking.Connectivity, which includes network adapters.
Here is a tutorial about using Win 8 Mobile Broadband.

Here is the documentation for Windows.Devices.SMS.
Here is a tutorial about using the 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.

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. Applications in the UI must use different Windows APIs from applications in the desktop.

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.
In order to use any Windows Mobile Broadband API, you must be able to see your device as a Windows network adapter. To check this, connect your device and open Windows Device Manager, and check if your device appears under Network Adapters. If yes, then you can use Windows APIs. If no, then you can't use these APIs.

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.
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. You will be able to access this modem port from a Windows 8 desktop application. 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).

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.
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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top