Surface Pro 7 deal! Save big at Amazon right now

  1. G-funkster's Avatar
    As we all know, we cannot have our Qs do a nightly soft reset or a scheduled backup because of the stupid charging screen that Motorola continues (I can't believe they didn't fix this in their latest firmware update) to ship with their devices upon it being reset when plugged in (USB or Wall):
    To Combat memory leaks, which are plentiful, a nightly soft reset really helps. A scheduled backup (with Sprite at least) requires a reboot so that's an even better solution. But if you require your phone to be working (as I do), you cannot afford it being stuck in the screen above.

    You'll Need:
    1. Mortscript installed
    2. To be charging at night
    ---- A) with your computer's USB.
    ---- B) with a wall appliance timer such as this one.

    Idea Flow:
    1. Power goes off that charges the device (PC's case: USB Port).
    2. The device itself checks if it's plugged in
    : Yes = Don't do anything.
    : No = Ok we can restart the device safely
    3. If Not Plugged, Do action (either restart or backup)
    4. Power is restored to the device so you're 100% Charged by the time you get up.

    Let's Go: Appliance Timer
    1. Set timer to turn off power at some point like 3AM.
    2. Set timer to turn power back on, say, 30 minutes later.
    3. Skip to Section "Q Side of things"

    Let's Go: PC Side of Things
    Turning off the USB Ports
    The way I'm going about this is I'll be showing you how to turn off one specific USB Port. So remember to plug your cable into the same port every night. But remember, it's 'safe' so even if you forget one night, you'll be ok!

    1. Install the Microsoft Tool called DevCon (attached, 'devcon.exe' inside) into your C:\Windows\System32 folder.
    2. Open the command prompt: XP/2K: Start->Run->type 'cmd' (no Quotes)
    3. Type 'devcon listclass USB' (no quotes). You'll see something like this:
    [CODE]C:\Documents and Settings\Admin>devcon listclass USB
    Listing 8 device(s) for setup class "USB" (Universal Serial Bus controllers).
    PCI\VEN_8086&DEV_24C2&SUBSYS_45418086&REV_01\3&61AAA01&0&E8 : Intel(R) 82801DB/D
    BM USB Universal Host Controller - 24C2
    PCI\VEN_8086&DEV_24C4&SUBSYS_45418086&REV_01\3&61AAA01&0&E9 : Intel(R) 82801DB/D
    BM USB Universal Host Controller - 24C4
    PCI\VEN_8086&DEV_24C7&SUBSYS_45418086&REV_01\3&61AAA01&0&EA : Intel(R) 82801DB/D
    BM USB Universal Host Controller - 24C7
    PCI\VEN_8086&DEV_24CD&SUBSYS_011D1028&REV_01\3&61AAA01&0&EF : Intel(R) 82801DB/D
    BM USB2 Enhanced Host Controller - 24CD
    USB\ROOT_HUB\4&1B96DD0A&0 : USB Root Hub
    USB\ROOT_HUB\4&23036E4B&0 : USB Root Hub
    USB\ROOT_HUB\4&A2AFF59&0 : USB Root Hub
    USB\ROOT_HUB20\4&18075F55&0 : USB Root Hub
    We'll focus on those formatted as shown in bold, above. One of those is the USB port we want to disable, so we'll go ahead and disable each one at a time until we find the right one. So make sure your device is connected so we can test it. If your only keyboard is a USB Keyboard, make sure you have other USB ports you can flip to if the keyboard one goes out.
    4. One By One disable: In the command prompt enter the commands like this WITH the quotes as shown:

    devcon disable "@USB\ROOT_HUB\4&23036E4B&0"
    and to enable it again use:
    devcon enable "@USB\ROOT_HUB\4&23036E4B&0"

    Do this for each until you hit the one that disables the Q's port (hint: you'll hear the device disconnect and activesync will go gray).

    5. Set up a scheduled task:
    Start->Programs->Accessories->System Tools->Scheduled Tasks
    I won't go into scheduled tasks, if you want to know more, go here. You'll want to set up two almost identical tasks, one to disable, one to enable. They should look like this:

    For the Disabler, the run field should be:

    c:\windows\system32\devcon.exe disable "@USB\ROOT_HUB\4&BLAHYOURS"
    and the Enabler should be:
    c:\windows\system32\devcon.exe enable "@USB\ROOT_HUB\4&BLAHYOURS"

    And the other difference being the time (above image, left). I run my disable at 3AM, then the Enable at 3:30AM. The softreset should be quick, but the backup only takes about 5 minutes for me. But, better safe I guess.

    Q Side of Things!
    You'll Need:
    1. Scheduled Launching via something like CT Scheduler.
    2. Mortscript (install the Cab under the 'cab' folder that ends in 'SP' for smartphone).
    Mortscript files are just text files, with extension 'mscr'.

    Soft Reset Script:
    "reset.mscr" : If not plugged in, Reset
    [CODE]If (ExternalPowered() = 0)

    Sprite Backup Script

    "Sprite.mscr" : If Not plugged, run Sprite, wait 15 seconds, then hit left softkey that does the backup. This requires Sprite to be in "Advanced Mode" (see image, square #1) and I have it without the encryption (General Backup Options -> unchecked 'Encrypt Backup').
    Without Encryption:
    [CODE]If (ExternalPowered() = 0)
    Run "\Program Files\Sprite Backup\Sprite Backup.exe"
    Sleep 15000
    Message "Backup Not Completed: Device Charging!"
    With Encryption: (Must send another left softkey, see image square #2). If you have run a backup before, then the password will already be filled out (as shown).
    [CODE]If (ExternalPowered() = 0)
    Run "\Program Files\Sprite Backup\Sprite Backup.exe"
    Sleep 15000
    Sleep 5000
    Message "Backup Not Completed: Device Charging!"
    How will you know it went well? You'll see the Completed message (image, square #4) when you wake up. Nothing will happen if the device was plugged in, the script would only display the message "Backup Not Completed..", (image, square #3).

    Schedule the Script
    Using CT Scheduler, create a 'Weekly' entry that runs the script on the days you want (I run it everyday) at, hmm say 5 minutes after your disable time on the PC, so in my case, 3:05AM. See highlighted entry:

    Whoosh! That's all there is to it ;) Sure stinks to get it all set up, but having backups is very important to me. But getting the soft-reset is probably more important on a day to day basis. In my experience, by the second day of uptime, my memory (with all apps closed) is around 13MB from the 25MB it should be, due to leaks :censored: .

    Let's hope if Moto has another firmware rev, they fix this charging nonsense, as well as for their future Qs. In the meantime, this has worked very well for me.
    Last edited by g-funkster; 03-05-2007 at 03:07 PM.
    03-04-2007 04:45 PM
  2. G-funkster's Avatar
    Updated to mention that an appliance timer can be used to bypass the PC in case you charge at nights via the wall charger.
    03-05-2007 03:10 PM
  3. bubbatex's Avatar
    g-man - great job - you should roll these together with all of your others somewhere! This one is a little complicated, but me and Mr. Flair (:D ) might give it a go. Thanks for the other one on Qusers - that was giving me a fit as Profileswitcher and the built in alarm would not work properly with that "charge complete" screen on.
    03-05-2007 05:54 PM
  4. G-funkster's Avatar
    yeah that Charge Complete dialog has got to GO! I wish we could find the registry setting to kill it altogether, but the morning thingy works well enough if we never find that.
    03-05-2007 06:12 PM
  5. bubbatex's Avatar
    just noticed - you like the "blue" earpiece? ;)
    03-06-2007 10:36 PM
  6. G-funkster's Avatar
    hah that's not my Q! I found that img on google images :)
    03-07-2007 10:56 AM
  7. bubbatex's Avatar
    g - any stability problems with all of this programming? I have had some issues the past two days - loss of speed dial - which we know is a problem, but it has been stable for me for the last 3-4 weeks, but I have lost it 3 times in two days. About an hour ago, the phone reset itself. All I have added is CTAlarm and CTScheduler. I am running the latest version of DontForget (which I am not 100% sure does not cause some problems). Have you seen any odd behavior since you did all of this scripting?
    03-07-2007 03:39 PM
  8. G-funkster's Avatar
    that's totally weird man, I'm really not sure. I've heard of the disappearing speed dial problem with the Q before, i think that's unfortunately common. You can see the scripts themselves are pretty basic so I wouldn't suspect they're causing any issues :(
    03-07-2007 04:25 PM
  9. bubbatex's Avatar
    I am thinking that DontForget conflicts with some other things, I turned it off and will monitor.

    Did you see on the front page - I won day 13!
    03-07-2007 07:19 PM
  10. G-funkster's Avatar
    Oh as for any stability changes, nah my phone never resets, ever. I also use phoneAlarm instead of dontForget.. just used to the other proggy from my PPC days.
    03-07-2007 07:19 PM
  11. G-funkster's Avatar
    Hey I did see that congrats! Celebrations for all!
    Last edited by G-funkster; 11-27-2015 at 03:48 PM.
    03-07-2007 07:21 PM
  12. bubbatex's Avatar
    hey - congrats to you too! Ur secret is safe w/me.
    03-10-2007 01:07 AM