Wiimote Whiteboard fun

by Daniel 28. May 2008 01:27

In meinem letzten Blog Eintrag schrieb ich über die spannende Reise das "Wiimote Whiteboard" auf Windows Vista x64 zum laufen zu bringen. Nachdem nun alles funktioniert, konnte die "Testphase" beginnen. Wie wir gelernt habe, testem wir am besten nicht selbst, sondern lassen testen. Schaut selbst, was dabei heraus gekommen ist:

Neben seriösen Anwendungen, haben wir auch "Montagsmaler 2008" gespielt ;-)

Hat jemand eine Idee, welcher Begriff hier gemalt wurde?

 

Tags: ,

Wiimote Whiteboard in Windows Vista

by Daniel 27. May 2008 05:59

Recently I watched this YouTube Video and was very impressed about what I saw. As I often make presentations and training, I thought to me this would be a really catchy solution for my next presentation. A low-cost solution for a touch Whiteboard simply by utilizing the Nintendo WII Controller :-) That's it!

I investigated my old hardware box, found an old remote, captured the infrared LED from the old remote, soldered the infrared LED to a battery and a switch, assembled it into an old marker.

That's it - I built my own electronic touch whiteboard pen:

That was the fun part. Now I wanted to test it with my Windows Vista Laptop (DELL Precision M65). I fetched my WII Controller, started the Bluetooth detection and - after some tries - I got it into my Vista as a Human Interface Device (HID). Some strange thing happened: When I wanted to connect the WII remote again, I had to remove it from the Bluetooth device list. Only then was it recognized as a "connected" device. So - if you have problems connecting the WII remote to you PC, try removing it completely from the Bluetooth device list first!

Now came the relly exciting part! I downloaded the Wiimote Whiteboard from here and ran the tool. The calibration of my monitor with my newly assembled "electronic touch whiteboard pen" was no problem at all - it simply worked as expected. Mark the top/left edge, top/right edge, bottom/left edge and the bottom/right edge - fine...

But then - nothing... no Mouse cursor movement... ...no clicks... ...nada... did I do something wrong? Was the "Wiimote Whiteboard" program not compatible to Vista? I instantly tried it on my old Windows XP Desktop (EPOX BT-DG02 USB-Bluetooth Dongle) - and it worked!!!

The next day I could not stop thinking about it - as I do not want to install Windows XP on my Laptop for my presentations. Luckily the Author of "Wiimote Whiteboard" provided the Source Code and more luckily - it was written in .NET!!!

So I could load it into my Visual Studio (I converted it to a VS2008 Project) and tried to find out where the problem with Vista could be. The C# code seemed really simple to me - the mouse cursor was positioned by using "SendInput" of the Wine32 API via P/Invoke. Hmm - this is not working under Vista? And yes - after googleing around - it seemed the most likely issue. In the MSDN API Documentation of SendInput there is a talk about "UIPI" - the User Interface Privilege Isolation. What's that? Never heard about it... Besides - here is a PDF with deep technical information about Vista UIPI that I found while looking for the problem. And it's really a fact - Vista prevents certain Windows Messages, depending on the so called "Integrity Level" of the program.

You can use Process Explorer to watch the current "Integrity Level" of a process:

As you can see, the "WiimoteWhiteboard v0.2.exe" process is at Integrity Level "High". Maybe "Hight" is not high enough? There is only one higher Level called "System". So I tried to change the assembly manifest to claim for "System" Integrity Level . But as I did not succeed in about 5 minutes, I tried another thing first. Often there are compatibility issues with 64-Bit Windows Versions with .NET Programs as they can run on x86 and x64 in native mode by default. So I forced the program to compile in x86 mode. And that was the fast solution :-) - Wiimote Whiteboard now runs on Windows Vista X64 without a problem. There are other versions in the Wiimote Whiteboard Forum on the Homepage, but I never got other versions to work correctly on my Vista X64.

Tags: , ,

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Daniel
MCSD, MCTS
Microsoft Certified Trainer
CTO, Albamond GmbH
E-mail me Send mail