views:

50

answers:

1

Hello, I'm developing a compact-framework application for a Windows Mobile device to work with SQLServer Server trough 3G.

The problem is that the device disconnects automatically from 3G after some idle time, and i have reconnect manually, this is not bad at all, the customer doesn't need permanent 3G connection, and it extends the battery life.

But... is there any way to check (in c#) if the 3G connection is running and if not, activate it?

My device is an Intermec CN50.

Thanks and excuse my poor English.

+2  A: 

I guess you can use Connection Manager's API to do this. Here is an article of using some API in managed code.

You can check the connection status with ConnMgrQueryDetailedStatus and act based on that information.

OpennetCF already did the wrapping for you, if you are willing to use a free 3rd party assembly. Check out their Connection Manager.

Shaihi