Hi folks,
Some of our customers have reported a strange intermittent problem with thier WM5.0 devices.
Apparently our application loses it's GPRS connection, and when the user tries to make a call, they are informed that the phone is "turned off" and they are asked if they want to turn it on. Once they do that, our app reconnects and starts sending data again. The app works fine after a device starts up, this happens after the device has been working for a while, it's almost like the device has gone into flight-mode.
1. Any ideas why this might be happening
2. Is there a way we can programatically (vb.net 2005, .netCF 2.0, WM5.0) check to for this condition and turn the phone back on Our app will try to send data every 10 mins or so, but the device doesn't reconnect automatically when we try to consume a web-service, as it normally does. (i.e. we don't try to make a conenction, but let the device handle that when we try to call a web-service)
3. I don't want to use any 3rd party components, not even OpenNetCF
thanks

how to detect if phone is "turned off"
customization
Hi Liviu
Your options depend on wheter your device runs Windows Mobile 2003 or a 'general embedded' Windows CE 4.2 OS. Posting the device details (Brand, Model ...) will help here.
With Windows Mobile 2003, your options are already outlined in this thread:
use the lineSetEquipmentState API.
Instead of using the avilable managed TAPI wrapper either
- write your own (which involves quite some work)
- or implement a small Native C++ DLL that does the job.
Samples how to use the Extended TAPI functions are available in the Win32\Cellcore\Extapi folder of the Windows Mobile SDK
With general embedded Windows CE 4.2:
There is no support Cell(GSM) available - this came with Windows Embedded CE 6.0.
So your best option is to contact the vendor and ask how to get this done.
You may have talk to the GSM modem directly over the serial line and send some AT commands.
Michael
lukef01
Hello Michael,
How do I do this I am not even able to refer to this API, can't even find the namespace.
Please advice.
Regards,
Suman
theycallhimtom
Hi
The State and Notification Broker API provides the infos you want. Check the SystemState class documentation on MSDN.
The externed TAPI API lineSetEquipmentState can be used to turn the radio back on. Just be aware that this is a privileged API - your app must be signed with cert allowing privileged execution.
Saravanan.Chinnusamy
Regards,
Suman
Escape
Hi Michael,
I was following last messages...I am also interested in solving this issue
We have a Windows CE 4.2 on our devices and need to turn on/off the flight mode. there is no documentation (at least I could not find it) on how to do that. Also I am not interested in OpenNETCF code that refers to a TAPI1.6 compiled library that has no support and it is not stable.
What are our options We see samples with PhoneAPI, SIM, or SMS code, but no sample on flight mode on/off.
Could you help please Thank you in advance.
Best regards,
Liviu
Thomas Tomiczek
Hi Suman
You can use this API on the following type of devices:
- Windows Mobile 5.0 for Pocket PC (like i-Mate JASJAR, Qtek 9000...)
- Windows Mobile 5.0 for Smartphone (like: i-Mate FlipSmart)
Everything else like a Pocket PC 2003 (SE), Smartphone 2003, do not support this API.
Regards
Michael
Bowen294671
Does this mean I cannot use this for Pocket PC or Smart Phones Sorry to ask this once again, but I am very new to Smart Device Application programming.
Regards,
Suman
j.Mcguire
Hi Suman
The 'State and Notification Broker' API is new to Windows Mobile 5.0. You cannot use this API on older devices.
If you are using a WM5 device - just add a reference to the assembly 'Microsoft.WindowsMobile.Status' and you sould be fine.
Michael