Welcome! Log In Create A New Profile

Advanced

Problem syncing with a Wii Fit board on a Mac OSX

Posted by bukvicic 
Problem syncing with a Wii Fit board on a Mac OSX
September 16, 2009 12:52AM
Greetings all,

I have a bit of a trouble figuring out why is connectivity to Wii Fit board so intermittent. This pertains to all machines running OSX 10.5.5 to 10.5.8. On machines 10.5.4 and earlier Leopard iterations, our code connected fine within 2 tries. Now, we are lucky if we get connectivity half of the time. The code is C and is open source (downloadable from [ico.bukvic.net] which also includes the Xcode project) and is built in a form of an external for the MaxMSP platform (meaning there are some hooks and libs it needs to link to). I've been tinkering with the code setting all kinds of traps to figure out why the code fails but so far have had no luck whatsoever. Nothing stands out as a problem, yet connectivity is a complete lottery.

The behavior is as follows:

*click on "connect" and press the pairing button (next to the batteries)
*the wii fit board begins to blink and after a few moments the object reports "connect 1" (meaning connection is successful), however the Wii Fit board continues to blink
*at this point in time Mac OSX reports that it has connected to the board (in the system preferences->bluetooth) but the board continues to blink and the data output does not include the wii fit board (although there is a basic data stream established, for instance memory registers where accelerometer data for wiimote is located report steady data). I can query paired object's mac address (which returns correct), battery level, and other basic functionality (e.g. button pressed on the Wii Fit board) but the board outputs no sensor data.

The bizarre thing is that when the object connects successfully, the board immediately stops blinking and data stream becomes available (once you enable expansion port option in the object). The code compiles without any warnings and/or errors.

Other concern is when the Wii Fit board fails to connect (continues to blink), sending disconnect message has no effect and the board has to be either powered down or manually disconnected from the bluetooth system preferences (or the bluetooth toolbar icon). Yet, when it does connect successfully, disconnect works (albeit from the second try). Could it be that the OSX takes precedence over Max and therefore effectively hijacks Wii Fit connection (this makes no sense but I guess it was worth asking it anyhow :-) ?

At this point I am wondering is the wii fit board expecting some kind of a "handshake" data and if so what is it? What register needs to be sent for the board to be initialized and ready for use? The Wii wiki shows no info (as far as I could see) on this aspect of connectivity? Could this be the problem? Or is this simply continued problem with Apple's bluetooth layer?

Any ideas/suggestions would be most appreciated. Likewise, if you have any good example source code I could borrow that would be absolutely awesome.

NB: I must admit there are parts of the code that are outright ugly hacks (mainly our additions that support the Wii Fit board) but none of it should preclude the system from working (as was the case before).

Sincerely,

Ico



Edited 3 time(s). Last edit at 09/16/2009 01:23AM by bukvicic.
Sorry, only registered users may post in this forum.

Click here to login