Toggle USB Charging - Windows Mobile Development and Hacking General

Hi All,
can anyone make a software to toggle usb charging? half the time my phone is connected to the usb for syncing but i dont want it to stuff up the battery since it charges it to full in about 3 hrs and i stay in office longer than that. would be good for the battery to be able to switch it off once in a while.
thank you

I know there's a reg key that can do what you said, depending on your device. I guess an app would be as simple as toggling that reg key. You can do it in mortscript or skschema.
But if you got a phone like Trinity that I own, then you are out of luck

Related

noob needs help

ok i have never done this stuff before, i work on computers/cars not phones. however i just purchased an 8125 of ebay (http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=160146080544&ssPageName=STRK:MEWN:IT&ih=006)
could you guys help me try and figure out why id doesnt charge? and also if you guys could point me in the right direction as far as overclocking, programs, and such. please remember that i dont due this stuff so bare with me.
thanks in advance
Caps
no idea as to the charging issue... if you plug it in and the green blinking light changes to a steady orange, it should be charging. If you plug it into a USB port connected to your computer it charges super slow, a wall charger is better. It won't charge? or it won't hold a charge? Perhaps you need a new battery
As for the overclocking and good programs and everything, you might want to spend a few hours in your spare time just reading past threads, and using Search! Actually I'm not sure if search works, but google does... go to google and use search term like...
site:http://forum.xda-developers.com wizard overclock
the site: part is essential, it means google will only search for results on that website.
(the overclocking program is omapclock or something but it's better to read the posts to discover more about it)
well i have been reading stuff all over the place. the best one that i can find seems to be this one:
http://www.howardforums.com/archive/topic/843374-1.html
but i wanted some input from people who have actually used some of these.
capsisking said:
ok i have never done this stuff before, i work on computers/cars not phones. however i just purchased an 8125 of ebay (http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=160146080544&ssPageName=STRK:MEWN:IT&ih=006)
could you guys help me try and figure out why id doesnt charge? and also if you guys could point me in the right direction as far as overclocking, programs, and such. please remember that i dont due this stuff so bare with me.
thanks in advance
Caps
Click to expand...
Click to collapse
Description
Up for bidding a a Cingular AT&T 8125 cell phone pda pocket pc. Physical condition of this phone is perfect, with no scratches or any wear. Phone has a problem charging, when phone is plugged in the status LED blinks orange and the battery icon shows charging, but does not actually charge. USB connection to computer works fine but does not charge. If you put a charged battery in the phone it works fine. Other than that, the phone has no issues or problems and all of the features work fine. Auction includes: Phone, stylus, charger, wired stereo headphones, usb cable, quick start guide and software cd-rom. Bidding will start at $1.00 with no reserve. Shipping will be $12.00 and paypal is preferred. Any questions, feel free to ask. Thanks for looking.
My guess is it would be easier to by an external battery charger and whip the battery out to charge it something like this i guess?
http://cgi.ebay.com/USB-cable-CHARG...ryZ15034QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
As for overclocking try searching for an app called battery status. Can't remember which version is best for wizard overclocking but should be easy enough to find.
PJ
thanks for the info man, i bought this;
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=120152590410&ssPageName=STRK:MEWN:IT&ih=002
cause i can charge the battery on the back while i sync the phone, but (and remember this is my first phone like this) i was told that if i take out the battery, or it dies that i will lose all my memory on the phone.
I'm thinking your mini usb connector on the phone is faulty. Does it sync?
he says it does, i dont know yet the phone gets here in the morning if usps doesnt suck today... so it might be here wednesday
I can safely say i know sod all about usb connections but the one on my old wizard started playing up (wouldn't charge and wouldn't sync).
By pure coincidence after leaving it in a drawer with about 40% battery for a couple of weeks i thought i'd see about fixing it got it out and it just worked (from usb and mains charger) so i didnt need to tinker with it at all
Good luck
anyone else?
anyone? any advise at all?
capsisking said:
ok i have never done this stuff before, i work on computers/cars not phones. however i just purchased an 8125 of ebay (http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=160146080544&ssPageName=STRK:MEWN:IT&ih=006)
could you guys help me try and figure out why id doesnt charge? and also if you guys could point me in the right direction as far as overclocking, programs, and such. please remember that i dont due this stuff so bare with me.
thanks in advance
Caps
Click to expand...
Click to collapse
Are you talking about the battery not charging when you are at home? If so, it's possible you could have the wrong charger. You can find this out by charging the battery from the USB cable to a PC. I've attached the new version of battery status for the overclocking and other options. I would suggest you search first in the future for any other issues that may arise. Search Forum
8125
2.25.11.1
capsisking said:
thanks for the info man, i bought this;
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=120152590410&ssPageName=STRK:MEWN:IT&ih=002
cause i can charge the battery on the back while i sync the phone, but (and remember this is my first phone like this) i was told that if i take out the battery, or it dies that i will lose all my memory on the phone.
Click to expand...
Click to collapse
That's "horse hockey". You'll lose only data that has not already been saved in memory. When you hard re-set the device is when all data will be lost if it's not backed up on a computer, and not by removing or your battery being drained....

Batch file

Hi,
Is there something like a batch file for Windows Mobile 6 ?
I want to execute several EXE files via single command.
Problem description:
I want to turn off USB charging before executing WM5Storage, and then turn it on again after finished.
So, I was thinking of using something like a batch file in Windows command prompt.
@ECHO OFF
set_usb_charging.exe 0
wm5storage.exe
set_usb_charging.exe 1
The set_usb_charging.exe is an application that set a key in the registry to turn off USB charging.
Thanks for any help.
You can use the freeware program mortscript for that.
You can also use a Pocket CMD for it.
It works with .bat files.
gogol said:
Hi,
The set_usb_charging.exe is an application that set a key in the registry to turn off USB charging.
Click to expand...
Click to collapse
whoa, can you post that file?
i never knew its possible.
But what's the use of turning USB charging off? What if your WM5torage session is several hours...
I have not made that application yet, I am still busy reading .NET CF book + .NET step-by-step lol ...
Here is the registry key:
Try creating this:
Registry Key: HKLM\Drivers\BuiltIn\Usbfndrv\EnableUsbCharging
Value: 0 (to turn off) or 1 (to turn on)
shlomki said:
whoa, can you post that file?
i never knew its possible.
Click to expand...
Click to collapse
I have submitted a suggestion to Softick (the maker of Card Export) to add an option for this, but yeah, I am not sure if it will be implemented
For me personally, I am not sure if I will use WM5torage for hours ... what for?
Transferring 6 GB (my SDHC card) is not that long
I am now thinking of creating an application that will have:
- A checkbox "[ ] Disable USB Charging"
- A button "[ Launch WM5torage ]" , then use something like "system()" or shell execute to launch the WM5torage.exe
But as I said, I am still busy reading the books !
Poor me, the only Win32 language that I know is Delphi 7
PS: Btw, I successfully create the "Hello World" using .NET CF 2.0 ... lol !!!
Maggy said:
But what's the use of turning USB charging off? What if your WM5torage session is several hours...
Click to expand...
Click to collapse
Lots of people use portable apps nowadays. You install Office, Photoshop, whatever on your USB stick, it instantly runs on any computer and writes all data only to your USB stick. So yes, a USB stick session or in this case a WM5torage session can take all day.
You've still not aswered my question WHY oh why oh why do you want to turn charging off???
BTW I'd never use dot net to write something simple like this.
In mortscript it's as easy as
write reg key 1
start wm5torage
wait till it ends
write reg key 2
exit
(free translation but actually your script would look much like this)
Well, like I said, that is just me ... I will not run anything via USB stick.
Mostly, I will use USB storage mode to transfer large files, movies, etc.
Or when ActiveSync is not available (for small files).
And why I want to "have option" to turn off USB charging when using USB storage mode? Simply 2 reasons:
1. I dont want to drain the laptop battery when it is also not connected to the power source (to preserve the laptop battery).
2. I dont want to initiate battery charging in short time quite often, because I will only charge the battery if I have enough time to charge it until 100%. I found this a good way to preserve the performance of the battery.
People tend to disagree with reason 2. But having this option will give you more choice when you are in situation like option 1.
Again, I tend to create this as an option, you may or may not activate USB charging when using USB storage mode
Mortscript is one option, thanks for that.
But I also want to learn this WM coding thingie
Hope that explain my thought and goal ...
Maggy said:
You've still not aswered my question WHY oh why oh why do you want to turn charging off???
Click to expand...
Click to collapse
USB charging seriously drains my laptop battery. With Ultra Low Voltage devices every little bit counts. Turning off USB charging would save me almost an hours worth of battery on a full charge.
fluxist
for me its mainly reason 2.
usually i only need to transfer something quickly, and then unplug.
i don't want the battery to charge for just a minute, as it seems not quite healthy for the battery life, thats it.
BTW, the reg doesn't work for me.
when plugging in the pc, orange light turns on and charging starts... tried to softreset - same result.
I found another registry key which is working fine with my HTC Kaiser (Windows 6 Pro device).
HKLM\\Drivers\BuiltIn\Battery\EnableUSBCharging
if EnableUSBCharging = 1 --> Phone will be charged when connected to a USB power (laptop, etc.)
if EnableUSBCharging = 0 --> Phone will not be changed
I just did a test :
- Unplug PPC from USB cable
- Set the above registry to 0
- Plug PPC to the USB cable
I saw it did not charge the battery
- Unplug PPC from USB cable
- Set the above registry to 1
- Plug PPC to USB cable
I saw it was charging the battery
So, that registry key works At least in my HTC Kaiser !
shlomki said:
for me its mainly reason 2.
usually i only need to transfer something quickly, and then unplug.
i don't want the battery to charge for just a minute, as it seems not quite healthy for the battery life, thats it.
BTW, the reg doesn't work for me.
when plugging in the pc, orange light turns on and charging starts... tried to softreset - same result.
Click to expand...
Click to collapse
I've got a same issue...
When I listen to music I hear sound threw my speaker and headset. Is it possible to hear it only from the headset?
The registry key when the headset is connected:
HKLM:/system/state/hardware/headset dword @ 1
Disconnected:
HKLM:/system/state/hardware/headset dword @ 0
Whats the registry key for the speaker?
*ontopic
I think this is very useful for the battery life. It's useless to charge the battery for a minute!
Ok, thanks for the suggestion to use MortScript
It works!
Here is the script that I use to start Softick Card Export II without USB Charging.
Code:
v = RegRead("HKLM", "Drivers\BuiltIn\Battery", "EnableUSBCharging")
RegWriteDWord("HKLM", "Drivers\BuiltIn\Battery", "EnableUSBCharging", 0)
SleepMessage(5, "Disabling USB Charging ...", "Wait")
RunWait("\Program Files\Softick\Card Export II\CardExport.exe")
SleepMessage(3, "Setting back USB Charging ...", "Wait")
RegWriteDWord("HKLM", "Drivers\BuiltIn\Battery", "EnableUSBCharging", v)

[HELP] Automatic Vibrate App based on light and G sensor

I should have asked this before starting work on my program but I should ask it before I work too long. Has someone made a program that monitors the light sensor and g sensor and based on that set vibrate?
I am working on a program for my Touch Pro that will do that following before setting vibrate but I could use some help. I am not too great of a programmer!
1) make sure it is dark
2) make sure the device hasn't been moved for x number of seconds
3) make sure device is plugged into AC power
I am making it in C# in Visual Studio
I have 1 and 2 nailed. I am having problems with number 3 though.
I can not get a reliable way to make sure the device is plugged in. Anyone know how to do it? I tried p/invoke GetSystemPowerStatusEx2 but that doesn't seem to work correctly, it still says AC when it is on battery and battery when it is on AC for quite some time after it is changed.
I am using a combination of that, whether the device is charging or not, and whether battery is at 100% (it seems the p/invoke switches to AC from battery when the battery reaches 100%) to determine if the program should poll the light and g sensors.
I would love a method which can tell me accurately if the device is plugged in or not and also has an event it can call so that I can enable/disable polling quickly and efficiently.
Another problem I am having is I need to make sure this program sets the device to unattended mode but only when it is in AC power. Is it possible for the device to come out of suspended and into unattended mode without the user turning the phone on first so that my program can run?
Thanks to anyone who can help.

[Q] hearted-shaped icon over battery

Sorry guys actually I am not a wp7 user but my friend who owns a HTC Surround ATT Version T8788 insisted to ask me for help on his phone. His phone has a little heart-shaped icon over the battery bar which i believed that it is battery save mode for htc wp7 phone based on my research. I do actually did all possible ways to get rid of this problem but still it cannot be resolved.
What I did:
1: I tried to charge the phone (via pc usb cable and adapter) in long term but it failed, in contrast the phone would switch on and off rapidly. My Zune and PC cannot detect the phone via pc usb cable.
2: I pressed on the settings mode in order to try to disable the battery save mode but when I was getting in there it freeze for a while and it popped out to the main home screen. It did not allow me to get into the settings mode every time unfortunately. Same goes to any other apps and modes in the phone.
3: I failed to get into recovery mode since there has not much battery left. The purpose I did so is because I wanted to try to do a factory reset over the phone.
4: I tried pulling out and in the battery for 30seconds but still not gonna switch on the phone unless it is charging (but still i face the problem on (1) while charging).
5: I bought a new battery which i believed it has at least 50% of the battery life in it but it is still not allowing me to get into settings mode to disable the battery save mode. Not just settings mode but other apps and modes as well.
My apology again because I really lack of idea on resolving my friend's phone so the only way I can do now is to post this thread in htc surround ATT Version T8788 xda forum. Lastly, I do appreciate someone who can help out to solve this. Million thanks for any of your reply and co-operations.
keithltk91 said:
Sorry guys actually I am not a wp7 user but my friend who owns a HTC Surround ATT Version T8788 insisted to ask me for help on his phone. His phone has a little heart-shaped icon over the battery bar which i believed that it is battery save mode for htc wp7 phone based on my research. I do actually did all possible ways to get rid of this problem but still it cannot be resolved.
What I did:
1: I tried to charge the phone (via pc usb cable and adapter) in long term but it failed, in contrast the phone would switch on and off rapidly. My Zune and PC cannot detect the phone via pc usb cable.
2: I pressed on the settings mode in order to try to disable the battery save mode but when I was getting in there it freeze for a while and it popped out to the main home screen. It did not allow me to get into the settings mode every time unfortunately. Same goes to any other apps and modes in the phone.
3: I failed to get into recovery mode since there has not much battery left. The purpose I did so is because I wanted to try to do a factory reset over the phone.
4: I tried pulling out and in the battery for 30seconds but still not gonna switch on the phone unless it is charging (but still i face the problem on (1) while charging).
5: I bought a new battery which i believed it has at least 50% of the battery life in it but it is still not allowing me to get into settings mode to disable the battery save mode. Not just settings mode but other apps and modes as well.
My apology again because I really lack of idea on resolving my friend's phone so the only way I can do now is to post this thread in htc surround ATT Version T8788 xda forum. Lastly, I do appreciate someone who can help out to solve this. Million thanks for any of your reply and co-operations.
Click to expand...
Click to collapse
1. Are you using OEM cable? No adapter should be required, if you are using a different cable pc might not acknowledge phone.
2. How are you accessing settings? Settings can be accessed from "Settings" app on app list; swipe to left, swipe up, tap to open.
3. ?
4. See 1., also try charging @ wall outlet it will charge much facter than through USB, again OEM cable recommended.
5. I do not think that batteries com with 50% charge. I could be wrong but when I purched my device it had only a residual charge ( enough to boot and make a few short calls).
If low battery charge is issue you should also receive message "Battery Critically Low" upon boot. If you cannot access any apps once booted and icon is still appearing over battery you do not have enough of a charge. If your only option is to charge though pc give it plenty of time it should chare even if not using recommended cable. Charging will be indicated by flashing red LED. Turning off your screen should speed up the process (it will take several hours plugged in to USB).
Hope this helps.
Thanks for your response and patience! Actually i just resolved the phone problem Monday ago.
keithltk91 said:
Thanks for your response and patience! Actually i just resolved the phone problem Monday ago.
Click to expand...
Click to collapse
can you tell me how did you resolved this problem as I also have same problem with my Surround.
thanks in advance.

Looking for a spezial ROM for my Samsung Note4

Hallo
I am looking for a new ROM for my rooted Note4.
I will use the phone only in my car.
Do anyone know a Rom were it is possible to start the phone automatically during plug in the charger and maybe switch of the phone during plug out?
Many thanks
Ralph
I don't know of a ROM like that. It would probably sit in a different part of the phone from where usual ROMs sit.
My phone uses almost no battery when in flight mode. So a simpler solution would be to switch to flight mode when power is not connected.
You can do that with Tasker.
Yeah I don't think there is a rom like that you could probably use a Tasker or other automation app to power off when you unplug it. To get it to start on plug in is harder. I think the kennel would need to be changed so instead of charge animation it would start. So it's probably possible but I don't think any developer is going do it.

Categories

Resources