WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OSX Wiimote Enabler
Goto page 1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Remote and Nunchuck
View previous topic :: View next topic  
Author Message
Cliff



Joined: 29 Nov 2006
Posts: 3

Digg It
PostPosted: Wed Nov 29, 2006 11:22 pm    Post subject: OSX Wiimote Enabler

I'm working on a virtual HID device driver that derives from IOHIDDevice, but at the moment it's a bit crashy due to L2CAP packets failing somewhat randomly. Here is a userland app that pairs with the device properly. You can look at the normal interrupt packets from the Wii Remote using Apple's Bluetooth PacketLogger.

RVL Enabler (Just press Search in the Device Discovery window and it will find and pair any Wii Remotes that are discoverable)

The secret sauce here is:
Code:

[wiiDevice openConnection];
[wiiDevice performSDPQuery:nil];
IOBluetoothL2CAPChannel* cchan;
if ([wiiDevice openL2CAPChannelSync:&cchan withPSM:17 delegate:self] == kIOReturnSuccess)
    printf("Control Channel opened.\n");
IOBluetoothL2CAPChannel* ichan;
if ([wiiDevice openL2CAPChannelSync:&ichan withPSM:19 delegate:self] == kIOReturnSuccess)
    printf("Interrupt Channel opened\n");


Then you can write with [cchan writeSync:buffer:length]

To read, implement - (void)l2capChannelData:(IOBluetoothL2CAPChannel*)l2capChannel data:(void *)dataPointer length:(size_t)dataLength;

Basically, I'm implementing Bluetooth HID myself on top of the L2CAP stack.

-Cliff
Back to top
View user's profile Send private message
volsung
Site Admin


Joined: 26 Nov 2006
Posts: 24

Digg It
PostPosted: Thu Nov 30, 2006 2:14 am    Post subject: Wow!

Whoa, that is awesome! This will be a huge help to me as I have been having to do testing inside a Linux virtual machine on my MacBook so far. Not too bad, but still a hassle.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
abeisgreat



Joined: 20 Nov 2006
Posts: 107
Location: Hyrule

Digg It
PostPosted: Thu Nov 30, 2006 4:22 am    Post subject:

Nice info
_________________


Back to top
View user's profile Send private message Visit poster's website
pufuwozu



Joined: 28 Nov 2006
Posts: 29
Location: Brisbane, Australia

Digg It
PostPosted: Thu Nov 30, 2006 6:47 am    Post subject:

abeisgreat wrote:
Nice info


Can you explain what it does or what it's for?
Back to top
View user's profile Send private message Visit poster's website
DeadPixel
Site Admin


Joined: 19 Nov 2006
Posts: 103
Location: France

Digg It
PostPosted: Thu Nov 30, 2006 1:18 pm    Post subject:

pufuwozu wrote:
abeisgreat wrote:
Nice info


Can you explain what it does or what it's for?


It's the same thing as the Linux driver, but for MacOS X. Nice info too, even if I can't test it (I don't have Bluetooth dongle and... don't have Wii)
_________________
Sorry for bad english...
Official WiiLi supporter - Artwork creator - documentation writer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
volsung
Site Admin


Joined: 26 Nov 2006
Posts: 24

Digg It
PostPosted: Thu Nov 30, 2006 1:27 pm    Post subject:

Right, specificially at this stage, the OS X application is like the hidp/hidd combination on Linux. It finds a controller that is currently in discoverable mode (hit both 1+2 at same time) and opens two bluetooth connections, as required by the HID standard.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
werthog



Joined: 01 Dec 2006
Posts: 1

Digg It
PostPosted: Fri Dec 01, 2006 4:37 pm    Post subject:

Should the program you've posted here actually enable the Wiimote as an HID device? I use a program called ControllerMate (http://www.orderedbytes.com/controllermate/), which allows you to reprogram input devices; for example, I've set up my Guitar Hero controller to work in GarageBand, and I've reprogrammed my PS2 controller to work better with some flight simulators. Every controller, mouse, keyboard, etc. I've ever plugged in shows up in ControllerMate, but when I connect the Wiimote using the program you've posted, I don't see anything. Does this program only enable the Wiimote for programs specifically written for it, or am I doing something wrong?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Remote and Nunchuck All times are GMT
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group