Wii Hacks

        

Showing posts with label wimote drivers. Show all posts
Showing posts with label wimote drivers. Show all posts

Tuesday, January 02, 2007

Automation with the Nintendo Wii and more

Darkain, has taken the Wii automation idea to the next level and has released RMX Automation, a tool for seamless integration of hardware, software and user all in one tiny package.

What does all that mean?

RMX Automation (for windows) is a modular interface for user input and output devices, applications, etc. Starting with version 1.4 (20070101), RMX Automation includes a plugin for the Wii Remote.

Installation information can be found on the WiiLi Wiki

The homepage for RMX Automation can be found here:
http://wiki.darkain.com/wiki/Main_Page

I will be playing around with this software, to see if it might be able to integrate nicely into my Wii Controlled Smarthome. If anyone else gets something cool working with this app, let me know, I want to hear about it!

And you can download the files needed on the sourceforge homepage for RMX

Monday, January 01, 2007

Wii Remote Speaker Communication Cracked

Carl Kenner is the man when it comes to the Wii Mote. Not only was the he the first person to have a working application for Windows that could read the Wii-Mote, but he did all of the programing with no wii-mote to test with.

Ever since that day he has been the driving force behind many wii-mote hacks featured on this site. His software, GlovePIE is the heart and soul of making the Wii Remote work in Windows, and several sites have started to spring up to host scripts for using the Wii-Mote with various different types of applications. He was one of the first to add Nunchuck support to his app, and his GlovePIE software can also handle multiple Wii-motes.

One of the last pieces of the Wii-Mote to be discovered is it's speaker. Up until now, nobody has been able to successfully communicate with the speaker to produce sounds. Carl made a post today to the WiiLi forums including a script that will bring the Wii Mote's speaker to life. Much of the initial work to find the codes to send to the wii-mote was done by Marcan, so a good chunk of the credit for this discovery should go to him.

Here is the GlovePIE script you will need to test out the Wii-Mote's Speaker from Windows:

// Carl Kenner's Wiimote Speaker Test script! Version 2
// A = start sound, B = stop sound
// Minus = decrease sample frequency
// Plus = increase sample frequency
// It takes a short time to start (due to delays built into Poke)

// Change the next line to set the rate at which sound data is sent
// BUT it must be low enough for the wiimote to respond to the B button
// it may depend on your PC speed. Must be at least 91 for freq 13.
pie.FrameRate = 120 Hz

if not var.initialized then
var.freq = 13 // Set sample rate = 3640 Hz (so computer can keep up)
var.volume = 0x40 // volume = 40 ??? Seems to be about max
debug = var.freq
var.initialized = true
end if

if var.On and (not Wiimote.One) and (not Wiimote.Two) then
// Report 18, send 20 bytes, square wave, 1/4 sample rate freq
WiimoteSend(1, 0x18, 20 shl 3, 0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33, 0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33,0xCC,0x33)
else if var.On and Wiimote.One then
// Report 18, send 20 bytes, square wave, 1/2 sample rate freq
WiimoteSend(1, 0x18, 20 shl 3, 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3, 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3)
else if var.On and Wiimote.Two then
// Report 18, send 20 bytes, square wave, 1/8 sample rate freq
WiimoteSend(1, 0x18, 20 shl 3, 0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33,0xCC,0xCC, 0x33,0x33,0xCC,0xCC,0x33,0x33,0xCC,0xCC,0x33,0x33)
end if


if pressed(Wiimote.A) then
// Enable Speaker
Wiimote.Report14 = 0x04 | Int(Wiimote.Rumble)
// Mute Speaker
Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
// Write 0x01 to register 0xa20009
WiimotePoke(1, 0x04a20009, 0x01)
// Write 0x08 to register 0xa20001
WiimotePoke(1, 0x04a20001, 0x08)
// Write 7-byte configuration to registers 0xa20001-0xa20008
WiimotePoke(1, 0x04a20001, 0x00)
WiimotePoke(1, 0x04a20002, 0x00)
WiimotePoke(1, 0x04a20003, 0x00)
WiimotePoke(1, 0x04a20004, var.freq)
WiimotePoke(1, 0x04a20005, var.volume) // 40
WiimotePoke(1, 0x04a20006, 0x00)
WiimotePoke(1, 0x04a20007, 0x00)
// Write 0x01 to register 0xa20008
WiimotePoke(1, 0x04a20008, 0x01)
// Unmute speaker
Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
var.On = true
end if

if pressed(Wiimote.B) then
var.On = false
Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble) // Mute Speaker
Wiimote.Report14 = 0x00 | Int(Wiimote.Rumble) // Disable speaker
end if

if pressed(Wiimote.Plus) then
var.freq--
debug = var.freq
// Mute Speaker
Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
// Write 0x01 to register 0xa20009
WiimotePoke(1, 0x04a20009, 0x01)
// Write 0x08 to register 0xa20001
WiimotePoke(1, 0x04a20001, 0x08)
// Write 7-byte configuration to registers 0xa20001-0xa20008
WiimotePoke(1, 0x04a20001, 0x00)
WiimotePoke(1, 0x04a20002, 0x00)
WiimotePoke(1, 0x04a20003, 0x00)
WiimotePoke(1, 0x04a20004, var.freq) // max volume?
WiimotePoke(1, 0x04a20005, var.volume)
WiimotePoke(1, 0x04a20006, 0x00)
WiimotePoke(1, 0x04a20007, 0x00)
// Write 0x01 to register 0xa20008
WiimotePoke(1, 0x04a20008, 0x01)
// Unmute speaker
Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
end if

if pressed(Wiimote.Minus) then
var.freq++
debug = var.freq
// Mute Speaker
Wiimote.Report19 = 0x04 | Int(Wiimote.Rumble)
// Write 0x01 to register 0xa20009
WiimotePoke(1, 0x04a20009, 0x01)
// Write 0x08 to register 0xa20001
WiimotePoke(1, 0x04a20001, 0x08)
// Write 7-byte configuration to registers 0xa20001-0xa20008
WiimotePoke(1, 0x04a20001, 0x00)
WiimotePoke(1, 0x04a20002, 0x00)
WiimotePoke(1, 0x04a20003, 0x00)
WiimotePoke(1, 0x04a20004, var.freq) // max volume?
WiimotePoke(1, 0x04a20005, var.volume)
WiimotePoke(1, 0x04a20006, 0x00)
WiimotePoke(1, 0x04a20007, 0x00)
// Write 0x01 to register 0xa20008
WiimotePoke(1, 0x04a20008, 0x01)
// Unmute speaker
Wiimote.Report19 = 0x00 | Int(Wiimote.Rumble)
end if

This is a huge accomplishment and you can bet that soon enough the hackers will be streaming all kinds crappy 4 bit sounds to their wii-motes. Let the fun begin!!!
Once again Carl, great work!

Next up is integrating the Speaker functionality into the other Windows Wii-Mote apps, as well as the Linux and OSX wii-mote programs. Developers will want to check out the WiiLi wiki for information on how to initialize the wii-mote speaker and send sounds to it.

Source: WiiLi.org

UPDATE: My apologies, it was actually marcan who did most of the discovery to get the Wii-Mote speaker working, I've updated the post above to give the proper credit. Thanks Perrpf for pointing out the mistake. Sorry for the mix up.

Friday, December 15, 2006

Newbie's Guide to the Wii Remote on Windows

So you just got your greasy hands on a wii-mote. What can you do with it? You may have heard about people doing crazy things like playing the drums with it, and you may have seen videos on youtube of nerds using it to control their PC mouse. Despite all of the comments you may read below the videos on youtube, most of the videos are not fake. There are really people playing electronic instruments, playing half-life, controlling emulators, navigating google earth, and even more stuff I promised not to show you yet...

This post is all about Wii-Motes and Mii's. If you still have not gotten your Wii-Mote connected to your computer now is the time to get a known working wii compatible bluetooth adapter and join in on all the fun. Once your bluetooth adapter is connected, follow these simple instructions to connect the wiimote to your bluetooth adapter.

Once you have a driver installed and your wiimote's HID device is connected, you are ready to download some apps.

Wii-Mote Apps for Windows
For Windows you will definitely want to check out GlovePIE along with a host of other scripts.
These scripts will allow you to control all kinds of applications. GlovePIE is really a great program because it allows you to map buttons and values on the wii-mote to trigger keypresses in other applications.

Another great program for Windows Mii-Mote users is BigRedPimp's Wii-Mote App






Not to be left out:
OSX users should check out DarwiinRemote or learn how to use the WiiMote with FrontRow
And, For Linux wii-mote adventures WMD by e-Hernick is the way to go.

Transferring Mii's
A new version of MiiTransfer has been released. MiiTransfer 0.9.1 (released 12/13) should work with most, if not all, BT stacks.. The original version only supported the Microsoft Bluetooth stack. Download the latest bins and source code here:
http://sourceforge.net/projects/wdml/

Even better, one of the visitors to this site has created a GUI to make using MiiTransfer even easier. SWiitPii was so kind as to give me all the credit, but the truth is, I did not write a line of code for this program. In any case you can download the MiiTransfer Gui Kit here. I have tried it myself and I was able to easily transfer about 20 Celebrity Mii's from WiiModWii Transfer Station to my Wii in a few minutes. It is basically the .0.9.1 version of the MiiTransfer binaries from sourceforge along with another .NET program that runs the correct command line parameters for you. It works great, thanks for the software SWiitPii! If you need help with this app there is a support forum here

MiiPlaza.net is now hosting Mii's. They have a large community of people, and I see good things coming from their site real soon. If you can't wait and just want to download as many Mii's as possible, then head on over to WiiModWii's Mii Transfer Station to download the latest celebrity mii's and other user submitted Mii's. Otherwise if your picky of what Mii's go into your Wii, and you need to see pictures of them before you download, goto MiiPlaza.

You can not break your wii by uploading Mii's from the internet. Any corrupted bits in the .mii file and the Wii won't even display it. Have fun!

Thursday, December 07, 2006

Linux Wii-Mote Driver

The final driver to complete Wii-Mote takeover on the computer has been posted for public consumption. e-Hernick has released python source code to use the Wii-Mote as a mouse in linux X.Org.

This completes the Wii-Mote's tour of each Operating System. There is now wii-mote driver for osx, wii-mote driver for linux, and wii-mote driver for windows. Needless to say, if you don't already have a wii-mote what are you waiting for?

People are already playing half-life with their wii-motes, and making music. What can yours do? If you have a cool Wii related hack and would like to see it on this page drop me an email: liquidice629 at gmail.com

Friday, December 01, 2006

Control TV with Wiimote

This was a special promo item given out to Nintendo Club Members in Japan. It does not have the hardware of a retail wiimote, it is simply a wii-mote shell with hardware inside to emit infared signals. Does anyone know how this is programmed? Is it a learning remote, or does it have preset codes for each brand of TV like a radioshack universal remote?





With bluetooth drivers for the Wii Remote on the way, it's only a matter of time before people (like me) are actually doing things like this with the real wii-motes. This is just a big tease as to what's to come in the next few months. Stay tuned for more info! Fun stuff is in development...

Sunday, November 26, 2006

More Wii-Mote Hacking

I figured out a little trick with the wii-mote last night. The wii-mote is paired with the Wii, so you usually will not see it when you do a bluetooth 'discover all devices' on the PC.

But, If you press buttons 1 and 2 at the same time on the bottom of the wiimote it puts it into a discovery mode where the lights on the bottom are blinking. Now if you try to discover nearby devices on your pc you should see the wii-mote and can attempt to pair it.

UPDATE 11/26/06 5PM:
You can also put it into discovery mode by pressing the sync button under the battery cover. The remote doesn't actually have a passkey, however once it is connected, the 3 services it advertises are non standard bluetooth services. Until someone writes a wii-mote driver we can't do much with this hardware.

For specifics on the Wii's Bluetooth check out
WiiLii Wii Bluetooth Wiki Entry
and
WiiLi Wimote Driver Wiki

UPDATE 11/26/06 3AM:

Progress has been made! some developers have made the initial connection to the bluetooth remote and can now control the LEDS and force feedback.

The developer has posted a patch for getting bluetooth communication working and even posted a little script that makes the lights on the remote dance.

If you want to help you can join in on the conversation here on the Wiili forum.

UPDATE 11/26/06 11AM

Looks like it's time to break out the Math books, Andy on the Wiili forums has figured out
how to log linear force data.

They have begun to write the algorithms which will be used to detect movement, speed and rotation of the wii-mote when it is connected to a pc or mac.

* Linear force data can be logged using a SET_REPORT HID request on Output channel 12. The first parameter is a force feedback parameter while the second must be 31. Some other 3X numbers work for the 2nd parameter and do different things, but I'm not sure what exactly. Logging can be turned back off using 30. (example to turn logging on: 52 12 02 31) When logging data data with 31 the last 3 bytes of data represent the forces with ~80 being 0 force. The 1st bit represents the side to side force, the 2nd is the lengthwise force and the 3rd is the up-down force.

Subscribe to the Nintendo Wii Hacks Blog RSS Feed

Also see:
PSP Hacks
PS3 Hacks
Zune Hacks
iPhone Hacks
Apple TV Hacks