PDA

View Full Version : HTC Battery Drainage Bug (Possible Fix)


weasel5i2
9th June 2008, 04:52 AM
Hello,

This is my first attempt at .NET CF programming. It is in reference to this thread (http://forum.xda-developers.com/showthread.php?t=371734).

It attempts to cycle the power to the GPS hardware eight times (at 200ms intervals) by calling GPSOpenDevice() and GPSCloseDevice().

It also shows the raw information provided by GetSystemPowerStatusEx2() if you need to troubleshoot your battery.

I'm not sure that it works, but it attempts to do programmatically what is described in the thread link above.

Full source code is included. I think it is also a great tutorial VB.NET project for anyone wanting to learn how to read the power on their device.

Please let me know what you think, and if it even works towards being a workaround for the HTC/Qualcomm chip standby-power drain bug. If it does work, I'll improve it (add autorun/exit-after capability, systray, etc..)

To use this without dealing with VS2005/compiling/etc, just copy HQPowerFix.exe from the bin/Release folder (in the zip) to your device (anywhere) and run it from there.

Note: These images are from my development machine. They look different on the device:
http://www.weasel.net/HQPF.png http://www.weasel.net/HQPF2.png

Regards,
--Weasel5i2

Vladimyr
9th June 2008, 07:03 AM
Nice idea! But it seems would be useful to cycle gps state not a fixed amount of times, but based on result of battery drainage (if it's below the certain level, the fix was succeed and no need to cycle gps anymore).
Also it would be useful to create a "command-line mode", when the program is starting and doing the fix without user interference. When done, it makes possible to launch iGo and this program from one script file, to implement the fix automatically after exit from iGo.

weasel5i2
10th June 2008, 02:28 AM
I found the MSDN documentation on the SYSTEM_POWER_STATUS_EX2 structure:

http://msdn.microsoft.com/en-us/library/aa926903.aspx.

It seems I didn't properly implement this structure's usage in my code, so I am planning to fix it tonight when I get home from the office.

@Vladimyr: That's a great idea, I do plan on doing that if this program turns out to be worthwhile and actually do the GPS power-drain fix as intended. Once I figure out how to more accurately read the mV/mA metrics, I will start working on that.

I'm also now working on a front-end/back-end for controlling a Car PC from a Pocket PC.. I think an older iPaq is cheaper than a Lilliput touchscreen ;)

--W5i2

khaytsus
15th June 2008, 04:43 PM
I found the MSDN documentation on the SYSTEM_POWER_STATUS_EX2 structure:

http://msdn.microsoft.com/en-us/library/aa926903.aspx.

It seems I didn't properly implement this structure's usage in my code, so I am planning to fix it tonight when I get home from the office.

@Vladimyr: That's a great idea, I do plan on doing that if this program turns out to be worthwhile and actually do the GPS power-drain fix as intended. Once I figure out how to more accurately read the mV/mA metrics, I will start working on that.

I'm also now working on a front-end/back-end for controlling a Car PC from a Pocket PC.. I think an older iPaq is cheaper than a Lilliput touchscreen ;)

--W5i2

Any updates to your program? Also, is it possible to edit the thread title and put GPS in it? I'd been meaning to reference back to this one and it took me a while to find it. :)

sirnone16
16th June 2008, 11:20 AM
HAVE ANYONE TRIED THIS ALREADY?
DID IT FIX THE PROBLEM?

Hello,

This is my first attempt at .NET CF programming. It is in reference to this thread (http://forum.xda-developers.com/showthread.php?t=371734).

It attempts to cycle the power to the GPS hardware eight times (at 200ms intervals) by calling GPSOpenDevice() and GPSCloseDevice().

It also shows the raw information provided by GetSystemPowerStatusEx2() if you need to troubleshoot your battery.

I'm not sure that it works, but it attempts to do programmatically what is described in the thread link above.

Full source code is included. I think it is also a great tutorial VB.NET project for anyone wanting to learn how to read the power on their device.

Please let me know what you think, and if it even works towards being a workaround for the HTC/Qualcomm chip standby-power drain bug. If it does work, I'll improve it (add autorun/exit-after capability, systray, etc..)

To use this without dealing with VS2005/compiling/etc, just copy HQPowerFix.exe from the bin/Release folder (in the zip) to your device (anywhere) and run it from there.

Note: These images are from my development machine. They look different on the device:
http://www.weasel.net/HQPF.png http://www.weasel.net/HQPF2.png

Regards,
--Weasel5i2

scilor
2nd July 2008, 11:37 PM
Doesnt work but nice idea