Quote of the day
"Aber wisst Ihr: Das schöne an der Zeit ist, dass sie vergeht."
Christina Enders am 1.12.2012
Repurposing the O-Key quick launch touch sensor on the MSI Windpad 110W
Short story: I have written a piece of software for the MSI windpad 110W that repurposes the touch sensor "O-Key" to work like the windows key. This allows you to use that key in order to flip between Metro Modern UI and desktop. Download location is here.
Longer essay: I still like my Windpad 110W, it is a tablet computer that runs Windows 8 quite nicely, although it hasn't been designed to run Windows 8. It ships with Windows 7 and comes with a bunch of crap software from MSI, among it the horrible G-Sensor app for which I have already created a replacement that works much better than MSI's software. Part of that software is also an app named o-easy.exe that is executed during each login and is lingering in the background after it has been started during login. There is also a touch sensor key on the right side of the tablet that makes this application visible if pressed. This app will then allow the user to turn on or off bluetooth or WIFI or whatever else.
Being an avid user of a Windows RT surface tablet as well, I have become accustomed to the windows key on my surface tablet. This is a hardware key which is placed below the bottom of the touch screen on the surface, horizontally centered. If you press it, it works as if you had pressed the windows key on a keyboard, had you attached one. Pressing the windows key on Windows 8 makes the screen flip between the Metro Modern UI state and the traditional desktop style So I wondered if it would be possible to repurpose the sensor button that MSI had reserved for their O-easy application to emulate the windows key.
Enter project "So-Lazy". It can be downloaded here as an MSI. Install it on your windpad 110W, log out and log in again and you will be able to use the O-Key as the Windows-Key. If you feel the desperate need to start O-Easy for configuration purposes, you can still do so, but you will have to run it from the desktop shortcut.
I have only tested the binary on x64 Windows 8. I would be glad to hear from folks who installed it on x86 Windows 8. The installer will come with the full source code for the binaries and it is distributed under the terms and conditions of GPL version 3. The fine folks from Certum in Poland gave me a code signing certificate for free, so it is even digitally signed.
Have fun with So-Lazy.
Most critical infrastructure (@home, that is...)
Seit gut zwei Monaten tickt jetzt mein Raspi zuhause in Crailsheim im 24-by-7 headless Betrieb und ich möchte ihn nicht mehr missen. Er ist mit Kabelbinder auf den Plasterouter von arcor draufgetaped und ist eine wahre Augenweide in seinem selbstgebauten Lego-Case. Auf der Maschine läuft ein OpenVPN-Gateway, das es mir gestattet, per DynDNS aufgelöst, einen Tunnel von meiner Filderstädter Wohnung (oder von sonstwo) in das heimische Netzwerk zu machen (auf Layer 2, d.h. ich bekomme eine IP aus dem heimischen Netzwerk) und dort den zweitwichtigsten Dienst des Raspi (oder auch den wichtigsten?) zu erreichen: Er hostet meine Subversion Repositories. Damit kann ich endlich, endlich, von Filderstadt aus ein- und auschecken und ein Subversion Backup anlegen, juchhu! Und er löst damit meinen alten Subversion-Server ab, der 300W Leistung hatte und nicht so viele Funktionen abdeckte wie der Raspi, der sich mit schlanken 3,5 Watt, und das nur unter Volllast, begnügt.
Nebenbei ist der Raspi natürlich noch WINS-Server, Sambaserver, Symbolserver, und was mir sonst noch so an Späßchen in der Zukunft so einfällt. Stress gab es nur am Anfang, weil die SD-Card von (ausgerechnet!) Kingston nicht so wirklich gut lief und es Datenverluste damit gab. Jetzt läuft eine SD-Card von Fuji und damit ist die Welt schön. Mein nächstes Projekt mit einem zweiten Raspi ist ein mobiler Wireless Access Point, mal sehen, wie das dann läuft.
Hier ein paar Bilder, die Uptime ist schon mal gar nicht so schlecht:
At long last, decent G-Sensor functionality for my WindPad 110W
I have decided to write today's blogpost in English because it might affect an international audience, namely those people who, like me, have purchased an MSI WindPad Tablet in the hope to get it running with Windows 8 smoothly.
(Update (2012/10/10): Version 1.0.13.0 is available under the download link below. Just update from 1.0.7.0 or do a fresh install and all problems with MSI's dual camera app should be gone)
Short abstract: I have written a decent G-Sensor App for the MSI WindPad 110W tablet computer which works nicely under Windows 8 even with the newfangled Windows 8 UI (formerly dubbed "Metro") running. You can grab it here: Download wpdgspot. Full source code for the wpdgspot binary is available here.
Longer essay: The MSI WindPad 110W is a nice piece of hardware. I bought mine sort of like a year ago to have a tablet computer to run the various Windows 8 previews, betas and RCs. Unfortunately, the G-Sensor ("G" as in "Gravity") in this tablet computer, which is supposed to make the screen rotate while the user rotates the tablet computer, does not adhere to the new Windows 8 hardware standards. Incidentally, this tablet computer ships with Windows 7 and a companion software package from MSI is available that includes an application that works with the G-Sensor in the tablet. That software package is called "O-Easy" and the particular application that rotates the screen is MSIGSensorHid.exe which is added to the run key in the registry so it is started after each user login. And this software sucks big time.
The problem with MSIGSensorHid.exe is, that it only works on Windows 8 while a desktop application is running in the foreground. If a new Windows 8 UI application is running (aka "Metro App"), it doesn't rotate the screen while the user rotates the tablet computer. Bummer!
Since non-working G-Sensor functionality renders a Windows 8 tablet computer almost useless, I decided to rewrite the G-Sensor app and create one that is much better than the one that MSI ships.
How do you go about rewriting such an app? Fortunately MSI made this quite easy for me. If you run spy++ (a development tool that should be familiar to every windows programmer), you will notice that while MSIGSensorHid.exe is running, a hidden top level window with tons of child controls exists. So you only need two lines of code (FindWindow and ShowWindow, that is) in an application of your own to show this hidden top level window:
(click on the image for a higher resolution image in a separate browser window)
From there you can easily determine the USB Vid/Pid of the sensor, and monitor the HID data exchange between the application and the sensor device. Now some further reading on MSDN about HIDs (Human Input Devices) and you are halfway done with your own application. But wait, what is this if we watch with process explorer what the app is doing?
(click on the image for a higher resolution image in a separate browser window)
Not only doesn't it work properly on Windows 8, after a few minutes it has 509 threads running, half a Gigabyte of committed memory from the pagefile (which is quite a lot on a machine with only 2GB of RAM) and more than 3000 handles. And this app is doing nothing than wait for a user to rotate the screen! This is just insane. Further investigation reveals that this app is creating one thread per second until the thread pool of the app domain is exhausted. Oh my dear, how peculiar!
On the screenshot above you also see the numbers for my replacement app, wpdgspot.exe: 2 threads, 84 handles, 808k of private bytes.
It took me a week's evenings work to write this app, and I spent most of the time thinking about a funny name for this pet project. I came up with wpdgspot (which you may pronounce "Whipped G-Spot" if you like). The "wpd" is derived from "WindPad" and since the "G" as in "G-Sensor" or "Gravity-Sensor" is also in the word "G-Spot" and since the "G-Spot" is considered a sensory receptor (at least this is what wikipedia says about the whole topic), I decided to give it this name.
How to install it:
Download the msi file (no pun intended) for the "Whipped G-Spot" from the download link. Bring your WindPad 110W into horizontal position and now install the msi file. Log out while in horizontal position and log in again. MSIGSensorHid.exe will now be gone and wpdgspot will be running instead. You have to do the installation in horizontal position because MSIGSensorHid.exe will always store the rotation position permanently which wpdgspot.exe does not by design. So we have to make MSIGSensorHid.exe save the horizontal position for the very last time it runs now, so the horizontal position is the one that is saved permanently but from now on changed dynamically by wpdgspot without permanent persistence while you are using the tablet computer.
Update (2012/10/10): I have adopted MSI's way of changing the screen rotation "permanently" with version 1.0.13.0 because it creates less hassle for everyone when installing over an existing O-Easy installation and it is a per-user setting anyway. Their choice wasn't that bad after all in that case.
How to build it on your own:
Download the source code, unpack it recursively. You need Visual Studio 2010 (Express edition should suffice) in order to build it, and a recent windows DDK (I used the Windows 7 DDK). Create a new environment variable "WINDDKDIR" which points to your DDK installation and now launch the solution file with Visual Studio and build the whole shebang. You have the right to inspect the source code, learn from it, find errors in it (and tell me about them), build it for your own purposes, but not to distribute it, sell it or distribute binary derivatives of wpdgspot.
Limitations:
I have only tried to run the "Whipped G-Spot" app on Windows 8 RTM x86. I assume it also runs well on Windows 7 and all x64 versions of Windows 7 and Windows 8. I would welcome any report of success on these OS versions as well as reports of this software on other variants of the WindPad tablet family.
Update (10/10/2012): People on the MSI forum have run wpdgspot.exe successfully with their windpad device on Windows 8 x64 RTM. I have successfully tested on Windows 7 x64, so I think we are good to go on all relevant platforms with my x86 build of wpdgspot.exe.