Wednesday, May 14, 2008

fWIIne v0.2 released (english version)

[english version]

What's fWIIne v0.2 ?

fWIIne v0.2 is the second release of Open Source MEX-library and S-function . It enables communication between Wiimote and Matlab/Simulink(WinXP) or Scilab(Linux). It has been designed for development, experimentation and for educational and leisure purposes.
fWIIne will help you to perform data acquisition, signal processing and visualization with Matlab, Scilab and a wii controller.


How to download fWIIne v0.2 ?

Binary and source files are available @ : sourceforge.net/projects/fwiine/(section "Download")


Features :

- The release 0.2 is compatible with 0.1. (Please refer to release 0.1 for basic features)
- Roll, Pitch computation


Bug fix :

- IR initialization for fWIIne for Matlab/WinXP.
- Improvements about determination of IR1 and IR2 dots.


Comments :

- CVS folder is not up-to-date. Please refer to "Download" section to download the current release.
- fWIIne for Linux and Scilab is based on Scilab 4.1.2 and Wiiuse0.9 library .
- fWIIne for Linux and Matlab is based on Matlab >7.1 and cWiimote library.
- Guideline and Release Note for fWIIne 0.2 will come soon.


--------


[fWIIne v0.2 released]


--
Update 15/05/2008 : The post of the release 0.2 has been splitted as the same as release 0.1

15 comments:

wiilliam said...

Starting issue :

The following failure occurred :

"
??? Invalid MEX-file
'...\fWIIne.mexw32':
This application
has failed to start because the application configuration is incorrect.
Reinstalling the application may fix
this problem.

Error in ==> test_fwiine_2 at 12
fWIIne(1);
"

The solution is to install the Microsoft VS runtime libraries :

In the Matlab distribution on your computer, you can run the exe
[..current Matlab folder...]\bin\win32\vcredist_x86.exe

If vcredist_x86.exe is not available in the folder $MATLAB\bin\win32
then you can download it on Microsoft's website :
http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en



Thanks to Tim for the suggested solution.

Thrishantha Nanayakkara said...

Since I got the same error as William (for fwiine v0.2), and it didn't work only by running vcredist_x86.exe, I recompiled the fwiine project with Visual Studio according to fwiine "Release Note & Guideline". There were two errors for missing header files (hidusage.h and hidpi.h), so I downloaded them and successfuly recompiled to get the fwiine.mex file. When I ran test_fwiine.m with the Wiimote connected to the computer via the bluetooth connection, the computer crashed with a error message "Bad pool header - physical memory dump". I am running this on a Windows Xp computer. And, when I run test fwiine.m without the bluetooth connection, the program runs correctly and gives the message "Initializing/Initialisation/Inicializacion Wiimote Com...
...No com

W:[-1.#J -1.#J -1.#J]
Press a key / Pressez une touche / Pulse una tecla
"

Anybody can help?

wiilliam said...

Hello,

Are the following applications functionning with your Windows XP SP (1 or 2 or 3) ?
- Wiinremote
- GlovePie

If no, I think you will have to upgrade the bluetooth driver.

If yes, OK they are working properly. Then we can focus on Visual Studio compilation.
(By the way, your matlab version is equal or up to r2007a ? )
Do you mean you had "Microsoft Blue Screen" and you had to reboot ?

1. when you build the library cWii, have you got some warnings (excepted this kind of warning : warning C4244: 'initializing' : conversion from '............', possible loss of data)

2. when you build the fwiine.mexw32 DLL for Matlab, you will not have warning at the build and just a warning at the link because the name is not fwiine.dll, only)

Well, if you generated the .mexw32 library, it means you configured both "configuration properties" of both sub-projects (cWii and fwiine), properly....
... I need to check if it was necessary to install an other application.

Finally, the last message is usual if wiimote-bluetooth-PC communication has not been initialized, yet. Unfortunately, it does not deliver more information.

Keep us informed.

- Wiilliam

miu said...

Hi William,

I successfully built fWIIne.mexw32.

(I got warning for option "Wp64" at first, so I select "No" to expel the warning")

I also downloaded and run vcredist_x86.exe.

But I still can't read data from Wiimote. :(

When I run fWIIne(1) in Matlab, it said

Initializing/Initialisation/Inicializacion Wiimote Com...
...No com

GlovePIE is working well in my computer, so I think it's not the Bluetooth problem.

Can you suggest some solution?

Thanks so much!

wiilliam said...

Hi Miu,

Indeed, very surprising.
Everything looks ok with your current configuration.
Some suggestions :

1. Unplug the Nunchuk
2. Enable Wiimote Communication and start GlovePIE with a Wiimote script
3. Close GlovePIE and Start Matlab
4. Then execute fWIIne(1)

If the problem still remains and you've compiled the library the cWii_console example and fWIIne MEX library. Please execute cWii_console.exe inside (...)/fWIIne/debug/ (to control if the problem comes from the library) and do not hesitate to tell me the result. I hope it will give you Accelerometer values.

- William

miu said...

Hi William,

The Matlab problem still remains and I can't find /fWIIne/debug/cWii_console.exe , there is no exe file built.

wiilliam said...

Hi Miu,

Sorry, you must refer to the previous release - 0.1 - included within fWIIne_v0.1_src.zip.
(download folder @ sourceforge.net)
After bluetooth connection, you will be able to start either cWii_console.exe or cWiiconsole.exe. If you don't receive the current accelerometer values then it means the wiimote library will have to be replaced by an other one. (of course, you can also re-built the files)

By the way, what happens when the downloaded file fWIIne.mexw32 is used ?

About the warning "wp64" : the option "wp64" detects 64-bits portability issues.
(Here, the µprocessor for the compilation was an AMD 64bits but it must work with a 32bits processor, too)

Keep me informed.
- William

fmcard said...

Dear wiilliam,
I'm tring to use the wiimote with Matlab, but I have the same problem of the "Invalid MEX". Also the reinstallation of vcredist_x86.exe was not usefull. Since I don't know how exactly recompile the mex and listenint to miu problems, I'm asking you if you have another solution.
I also tested the wiimote with GlovePie and WiimoteLIB by Brian Peek and it works.

Another question: I'have seen that with Glovepie I can achieve an acceleration resolution of about 0.01 g while with Wiimotelib of only about 0.04 g.
Do you know why? what is the acceleration resolution achievable with fWiine?

Thank you!!

thibaud said...

Invalid MEX-file '...\fWIIne.mexw32':

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

I'm tring to use the wiimote with Matlab,like others I also have the problem of the "Invalid MEX". the vcredist_x86.exe solution doesn't work. I have exactly the same configuration (matlab r2007a with xp sp2)

I have a macbook pro. Is there known issues with it or with the built-in bluetooth ?

Any knews about the problem since november ?

thanks a lot

Thibaud

wiilliam said...

Hello,

Some updates were done for the new release v0.3.
See also end of the post


(Unfortunaltely, a version is not available for mac. The problem comes from wimote c++ libs which are not compatible with mac)

Anonymous said...

I try to run the fWIIne v0.4 on Vista with Matlab r2008b.
I have the vcredist_x86.exe 2005 up and running.

When i run the script
test_fwiine
I get the following error

??? Undefined function or method 'fWIIne' for input arguments of type 'double'.

Error in ==> test_fwiine at 15
fWIIne(1);


Can someone confirm the compatibility of vista with fWIIne

wiilliam said...

Hi,

Some developers said me it worked.
(But they may have re-built the application from source files)

Wiilliam

Anonymous said...

Hello

I've noticed that there hasn't been any recent comments, but I will post a question anyway, hope someone still following this.

I tried several libs to use Wiimote in matlab, I also tried some GUI apps to check connection to wii. Acc works, rumble and buttons too, but it seems that my wiimote only detects 2 leds (IR dots). Anyone alse noticed the same? I wonder if got screwed and bought a fake wiimote. I don't have the actual wii console to test the functionality.

Anonymous said...

Hey

Found out that I got a fake wiimote.
http://forum.lowyat.net/topic/939583

(Anonymous
March 12, 2010 6:32 PM)

wiilliam said...

Hi,

Well, I've just read your link.
Sorry, I hope you will find an other wiimote.

- William