简体   繁体   English

Windows Mobile 6.5-.NET CF连接管理

[英]Windows Mobile 6.5 - .NET CF connection management

I'm developing a Win32 mobile application (.NET CF 2.0/3.5) that has to communicate with a WebService. 我正在开发必须与WebService通信的Win32移动应用程序(.NET CF 2.0 / 3.5)。 The mobile computer will be used in places called "Dispatch" where good WLAN coverage is provided and company offers its own AP with defined SSID name. 该移动计算机将在提供良好WLAN覆盖且公司提供具有定义的SSID名称的自己的AP的“派遣”位置使用。 This means that the mobile computer must use those APs (knowing their SSID name) for Internet connection. 这意味着移动计算机必须使用那些AP(知道其SSID名称)进行Internet连接。 The other use of mobile computer is by driver. 移动计算机的其他用途是通过驱动程序。 In that case to commuicate with WebService, GPRS/EDGE connection must be used because of lack of WIFI access. 在这种情况下,为了与WebService通信,由于缺少WIFI接入,必须使用GPRS / EDGE连接。 I want to provide a way of "intelligent connection management" in my application so that the mobile computer detects if there is a known SSID (WIFI) and then connects to it and WebService communication is established through this connection. 我想在我的应用程序中提供一种“智能连接管理”方法,以便移动计算机检测是否存在已知的SSID(WIFI),然后连接到它,并通过此连接建立WebService通信。 If no WIFI is in range, the mobile computer connects through GPRS/EDGE via the GSM ISP. 如果没有WIFI,则移动计算机将通过GSM ISP通过GPRS / EDGE连接。 How to approach this by using .NET CF and/or Win32 API? 如何通过使用.NET CF和/或Win32 API来解决此问题?

Regards 问候

Use the Connection Manager API to let Windows automatically determine the best connection to use based on available connections. 使用连接管理器API,Windows可以根据可用连接自动确定要使用的最佳连接。 It will always use the Wi-Fi connection if it is available. 如果可用,它将始终使用Wi-Fi连接。 If there is no Wi-Fi connection available then it will use the GPRS/EDGE connection. 如果没有可用的Wi-Fi连接,则它将使用GPRS / EDGE连接。 There is a C# wrapper for ConnMgr in OpenNETCF. OpenNETCF中有一个ConnMgr的C#包装器。

You can programatically configure your Wi-Fi and GPRS connections using the DMProcessConfigXML function with some XML data. 您可以使用DMProcessConfigXML函数以一些XML数据以编程方式配置Wi-Fi和GPRS连接。 See CM_GPRSEntries Configuration Service Provider and the Wi-Fi Configuration Service Provider. 请参阅CM_GPRSEntries配置服务提供程序和Wi-Fi配置服务提供程序。 Example XML is included at the bottom of the links. 示例XML包含在链接的底部。

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

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