Sunday, February 22, 2009

HTC reveals successors to the Diamond and Pro!

Woot! HTC has unveiled the successors to the Touch Diamond and Touch Pro! Despite the crappy names (they are simply called Touch Diamond2 and Touch Pro2), the devices themselves do pack some worthy upgrades and they look gorgeous to boot! The screenshot on top is the Touch Pro2 while that on the bottom is the Touch Diamond2.

For one, both get larger screens and slimmer dimensions. Battery life is also supposedly improved; up to 50% more juice for the Diamond which will be a much welcomed relieve! Other upgrades for the Diamond include double the RAM and ROM, expandable memory instead of a fixed internal storage and a 5 megapixel camera!

In terms of availability, both models are expected to hit our shores in Q2 2009 which is really soon! Time to start looking for a new owner for my Touch Diamond!

Oh, and it will run on the Windows Mobile 6.1 instead of the recently announced Windows Mobile 6.5 as Microsoft has put its (version 6.5) GA date to be in the second half of 2009. Darn!

Thursday, February 19, 2009

Switching audio output device on HTPC via Harmony remote

In my HTPC setup, I have two audio output devices connected; The first is my plasma TV via HDMI and the second is my home theater sound system via optical S/PDIF connection. Now normally, I will pipe the audio from the PC via my TV speakers for TV and general purpose use (such as Skype conferencing, watching youTube videos, some games etc). On the occasions where I'm listening to my music collection or watching movies, I will want to switch over to my 6.1 home theater sound system.

Unfortunately, there is no OOTB feature provided in Windows, VMC or the IR receiver software (SoundTech iMon) to allow me to switch the audio outputs via the remote. Hence I will have to use the mouse to enter the dreaded Windows interface, call up the audio devices control panel applet and change it manually. Typically, a five minutes process not including the need to walk up to my HTPC since I don't have a wireless mouse handy. Bummer!

Fortunately, you can maintain your couch potato laziness (and maximise your investment in the expensive Harmony remote!) by using a combination of AutoHotKey (a Windows scripting engine) and custom commands in iMon.

Here's how it works:
  1. An AutoHotKey script will be running on the PC at all times waiting for certain keyboard shortcut to be triggered. In my case, CTRL+F5 to trigger HDMI output and CTRL+F6 to trigger S/PDIF.
  2. Map two unused remote keys via the iMon custom command feature to CTRL+F5 and CTRL+F6 respectively. In my case, star (*) key to trigger CTRL+F5 and sharp (#) key to trigger CTRL+F6.
  3. In summary, when you hit the (*) or (#) keys on the Harmony (or MCE for that matter) remote, the iMon software will capture it and send the respective CTRL+F5 or CTRL+F6 keyboard shortcut in Windows. The AutoHotKey script will pick it up and execute the main sequence to open the audio device control panel applet, select the right audio output device and close (my script actually does more than that like sanity checks and reopening VMC if it is open at the time the script is called).

And here's how to get it working on your setup:
  1. Download and install AutoHotKey.
  2. Download and extract the two necessary addon scripts (COM standard library and Vista Audio Control Functions) to the \Lib folder (create if its not already present) of AutoHotKey's program folder. These two addon scripts are needed to enable AutoHotKey to talk to the Vista audio device APIs.
  3. Now create a text file with name "Audio device switch helper.ahk" and copy the following text into it:
    ; CTRL+F5 = Change audio device to Digital Output
    ^F5::
    ; check if HDMI output is already set
    COM_Init()
    device := VA_GetDevice()
    device_name := VA_GetDeviceName(device)
    COM_Release(device)
    COM_Term()

    vmcOpen := "nothing"

    if InStr(device_name, "Digital")
    {
    ;already set, so lets pop a message and return
    if WinActive("ahk_class eHome Render Window")
    {
    vmcOpen := "VMC Open"
    WinMinimize
    }
    SplashTextOn, 250, , Digital audio output already selected
    Sleep, 1500
    SplashTextOff
    ; TrayTip, ,Digital audio output already selected, 10,1
    if InStr(vmcOpen, "VMC Open")
    {
    WinMaximize, ahk_class eHome Render Window
    }
    return
    }

    if WinActive("ahk_class eHome Render Window")
    {
    vmcOpen := "VMC Open"
    ; Close application with Alt-F4
    WinClose
    ;Send !{F4}
    }

    Run, mmsys.cpl
    WinWait,Sound
    ControlSend,SysListView321,{Down 2}
    Sleep, 200
    ControlClick,&Set Default
    ControlClick,OK

    if InStr(vmcOpen, "VMC Open")
    {
    Run, C:\Windows\ehome\ehshell.exe, , max
    }
    return

    ; CTRL+F6 = Change audio device to HDMI Output
    ^F6::
    ; check if HDMI output is already set
    COM_Init()
    device := VA_GetDevice()
    device_name := VA_GetDeviceName(device)
    COM_Release(device)
    COM_Term()

    vmcOpen := "nothing"

    if InStr(device_name, "HDMI")
    {
    ;already set, so lets pop a message and return
    if WinActive("ahk_class eHome Render Window")
    {
    vmcOpen := "VMC Open"
    WinMinimize
    }
    SplashTextOn, 250, , HDMI audio output already selected
    Sleep, 1500
    SplashTextOff
    ; TrayTip, ,HDMI audio output already selected, 10,1
    if InStr(vmcOpen, "VMC Open")
    {
    WinMaximize, ahk_class eHome Render Window
    }
    return
    }


    ; check if VMC is open, if yes, close it
    if WinActive("ahk_class eHome Render Window")
    {
    vmcOpen := "VMC Open"
    ; Close application with Alt-F4
    WinClose
    ;Send !{F4}
    }

    Run, mmsys.cpl
    WinWait,Sound
    ControlSend,SysListView321,{Down 3}
    Sleep, 400
    ControlClick,&Set Default
    ;Sleep, 1000
    ControlClick,OK

    ;if vmc was open previously, we open it again
    if InStr(vmcOpen, "VMC Open")
    {
    Run, C:\Windows\ehome\ehshell.exe, , max
    }
    return
  4. Notice that in the above code, there are two lines with text in red. You will need to change them according to the order your devices are listed in the audio device control panel applet! So for example, in my case, my HDMI audio device is the first item in the list while the S/PDIF audio device is listed fourth. So to switch between them, the script will need to move up three items to select HDMI (assuming the current selection is at S/PDIF) and move down three items to select S/PDIF (assuming that the current selection is at HDMI).
  5. Save the script and test it (double click on the file to launch).
  6. Once you have it working, open up iMon manager and select "Custom Command" on the left.
  7. Click on the "Add" button, give the new function a name (e.g. "Select HDMI Audio"), configure the shortcut CTRL+F5, followed by selecting the remote key STAR.
  8. Click on the "Add" button again, give the new function a name (e.g. "Select S/PDIF Audio"), configure the shortcut CTRL+F6, followed by selecting the remote key SHARP.
  9. Now select "Program Command" followed by selecting "XPMediaCenter" as the program and finally, remove the (*) and (#) keys from the mapping. You need to do this to allow the custom command to work when VMC is the active application.
  10. Click on "OK"
  11. At this point, you should be able to start using the (*) and (#) keys on the remote to switch between the two audio outputs.
  12. To enable this feature to survive a reboot, add a shortcut to this script in the "Startup" folder of all users.
For those with a Harmony remote, you can add these keys into the startup sequence of your activities so that you don't even need to manually click the (*) or (#) buttons! e.g. in my case, when I start the "Watch Movie" or the "Listen to Music" activities, at the end of the startup sequence, a (#) key will be sent to ensure that the S/PDIF audio output is selected.

Ahhh.... a true couch potato's blessing indeed!

Wednesday, February 11, 2009

My Mobiler - remote control your windows mobile device from desktop

I know of a number of utilities that allow you to remote control your desktop from your Windows Mobile device, including the native Remote Desktop application bundled with the Windows Mobile OS.

However, there are very few tools that allow you to do the reverse; i.e. control your Windows Mobile from your Windows desktop. Why would you need such a software? Well, for one thing, if you use a Windows Mobile software that does not have a desktop counterpart and you need to do alot of data entry (and your device does not have a keyboard), then I bet you will appreciate the usefulness of this type of utility.

An excellent choice for this is My Mobiler. It is small (just 500kb!), easy to install (just download the zip package and unpack to a directory of your choice, fire it up and click connect from the tray menu; no installation on BOTH the desktop and your mobile device!), stable and best of all, its a freeware!

Sunday, February 8, 2009

RSS Hub doesn't auto-update or download podcasts when set to update when ActiveSync is connected

If you are having problems with RSS Hub not updating your news feeds automatically when your device is connected to the PC, it could be due to the following issue: [Info extracted from NewsBreak FAQ (NewsBreak is the engine behind RSS Hub)]

Windows Mobile 5.0 has a new connection method which may prevent NewsBreak from detecting that ActiveSync or Windows Mobile Device Center is connected. To fix this, you need to do the following:
  • On your device, go to Start -> Settings -> Connections and look for the "USB to PC" item. If you have it, un-check "Use Advanced Networking."

OR

  • If you don't have a "USB to PC" item, you may have a "USB Switch" program in your Start -> Programs list. This does the same thing. You want to switch the connection to "USB Serial" instead of "RNDIS".


Not quite sure what "Advanced Networking" does but so far I have not noticed any adverse impact so I'm keeping it that way since its more important that I get my feeds for my hour long journey to work!

Tuesday, February 3, 2009

More Anti-Virus problems! This time its McAfee!

OK, a couple of days ago, I was contemplating shelling out for McAfee as replacement for my household anti-virus standard after my bad experience with Avast!. Good thing I am using it in Office and have the opportunity to discover just how crappy McAfee is when it comes to memory consumption.
The screenshot above shows just how much memory the Mcshield service consumes... a whopping 660MB! And this is when it is idle (note the CPU consumption was only three percent!). This, coupled with a whole lot of Vista bloat, effectively caused my reasonably powerful laptop (Intel Core2 Duo T5600 with 2GB RAM) to slow to a crawl due to all the frequent swapping to virtual memory.

For what its worth, the Mcshield service does not consume that ridiculous amount of memory all the time. What I have observed so far is that it happens after I resume from hibernation or from a long period of inactivity in screen-saver mode. This really hurts productivity and user experience since those are the crucial times when I do want to use my computer immediately and not wait another fifteen minutes (sometimes even half an hour!) for all that virtual memory swapping activity to die down.

Suffice to say, McAfee is now off my list of potential replacement anti-virus products!