PDA

View Full Version : How to keep GPS power on, when device in standby?


vlad69uk
14-09-2007, 06:24 PM
Hi,
I'm now the proud owner of 2 HTC TyTN II's. Does anybody know of a way of keeping the GPS powered on even when the device is in standby? We are developing a tracking application which needs to send positions at pre-defined intervals, and if the GPS is off (device in standby) the position fails to be sent.

I received this reply from MS
-----------
"Base on my understanding, you want to keep the GPS hardware on even when the device is in standby. If I have understood you , please let me know.

Device standby status always close some devices , like bluetooth, GPS to save power. It is designed by OEM. you can't keep GPS hardware on while device is in standby. As a workaround, you can use SystemIdleTimerReset method to prevent the device from standby status.

For how to use SystemIdleTimerReset , click the link below:
http://msdn2.microsoft.com/en-us/library/aa930260.aspx"

-----------

Does anybody know enough about the GPS harware calls to be able to give me a pointer in the right direction?

Cheers
Paul

wpbear
14-09-2007, 06:29 PM
Hi,
I'm now the proud owner of 2 HTC TyTN II's. Does anybody know of a way of keeping the GPS powered on even when the device is in standby? We are developing a tracking application which needs to send positions at pre-defined intervals, and if the GPS is off (device in standby) the position fails to be sent.

I received this reply from MS
-----------
"Base on my understanding, you want to keep the GPS hardware on even when the device is in standby. If I have understood you , please let me know.

Device standby status always close some devices , like bluetooth, GPS to save power. It is designed by OEM. you can't keep GPS hardware on while device is in standby. As a workaround, you can use SystemIdleTimerReset method to prevent the device from standby status.

For how to use SystemIdleTimerReset , click the link below:
http://msdn2.microsoft.com/en-us/library/aa930260.aspx"

-----------

Does anybody know enough about the GPS harware calls to be able to give me a pointer in the right direction?

Cheers
Paul


You probably cant do this. Just as the Wifi goes off when in standby. And while I agree it is a PITA, they are right that the battery would drain too fast. And if you are on ext pwr then set the power settings to never goto standby.

PhilipL
14-09-2007, 06:33 PM
Hi

You would need to register a notification event for the time span you need, which will wake the device up, and then you do your processing. This would be in unattended mode so the device still looks of or you could force the device to display.

You would need to build some delay into your program to allow the GPS to get a fix.

I would look at the OpenNETCF framework here: http://www.opennetcf.com/CompactFramework/Products/SmartDeviceFramework/tabid/65/Default.aspx

Look at the OpenNETCF.WindowsCE.Notification.Notify.RunAppAtTi me method, this will run a program at a specified time or use the OpenNETCF.WindowsCE.LargeIntervalTimer both will wake the device up if it has gone to sleep in the interval requested.

Regards

Phil

vlad69uk
14-09-2007, 06:36 PM
Thanks for the super fast reply. I've tested the device with GPS on permanently, and never going into standby. I get about 30 hours use with moderate calls and moderate push email. I also get the same bettery life out of the Artemis.

I'm sure there's got to be a way to hack the power management code in the OS, just can't seem to find any info on it :(

Cheers
Paul

vlad69uk
14-09-2007, 06:46 PM
Thanks PhilipL, i'll have a look into that and see what i can come up with.