uweschmidt.org

42 / π ≈ 13.37 

Wiimote Logger

This application can log acceleration data and button presses of multiple Wiimotes at the same time. It was designed to do experiments where motion is recorded by one or more Wiimotes. The A & B buttons can be used to mark certain events such as the start or end of an experiment.

The software has been developed and only briefly tested on Mac OS X. It should, however, work on Windows and Linux too. Linux users need to put in a little more effort to make it work. Otherwise, the requirements are almost identical to my Wiimote Whiteboard application. Let me know if you have problems or find any bugs.

Download (0.2)

20 Responses

  1. J Almer says:
    WiimoteLogger and Ubuntu

    Hello,

    the Whiteboard ist great work.
    Unfortunately i cannot use the WiimoteLogger under Ubuntu 9.04.
    I copied with zip the bluecove already into the WiimoteLogger.jar, described for WiiWhiteboard but the start fail.

    SCHWERWIEGEND: Application class org.uweschmidt.wiimote.logger.WiimoteLogger failed to launch
    java.lang.IllegalStateException: Bluetooth failed to initialize. There is probably a problem with your local Bluetooth stack or API.

    Can you help me

  2. Uwe says: in reply to J Almer
    Re: WiimoteLogger and Ubuntu

    Hi,

    I just checked WiimoteLogger.jar and realized that I created it in a different way (in comparison to Wiimote Whiteboard). Try starting Wiimote Logger like that:

    java -cp bluecove-gpl-2.0.3.jar -jar WiimoteLogger.jar

    Uwe

  3. J Almer says: in reply to Uwe
    Re: WiimoteLogger and Ubuntu

    Thanks for your help,

    but still the programm doesn’t start. I can connect the wiimote via bluetooth described in http://wiki.ubuntuusers.de/Wiimote but

    sudo java -cp bluecove-gpl-2.1.0.jar -jar WiimoteLogger.jar

    (i tried with and without sudo and also the bluecove-gpl-2.0.3.jar as you suggested)

    always ends with a lot of failures.
    Caused by: javax.bluetooth.BluetoothStateException: BlueCove com.intel.bluetooth.BluetoothStackBlueZ not available
    SCHWERWIEGEND: Application class org.uweschmidt.wiimote.logger.WiimoteLogger failed to launch
    java.lang.IllegalStateException: Bluetooth failed to initialize. There is probably a problem with your local Bluetooth stack or API.

  4. Uwe says: in reply to J Almer
    Re: WiimoteLogger and Ubuntu

    Hi,

    Thanks for your help, but still the programm doesn’t start.

    I was just guessing that it might work. After starting my dusty linux box and actually trying it myself, I found this to be working:

    java -cp bluecove-gpl-2.0.3.jar:WiimoteLogger.jar org.uweschmidt.wiimote.logger.WiimoteLogger

    Uwe

  5. J Almer says: in reply to Uwe
    Re: WiimoteLogger and Ubuntu

    On my Ubuntu system it still hangs.

    I tried sun-java (java-6-sun-1.6.0.13) and open java but the error remains.
    My system is Ubuntu 9.04 with the above mentioned java versions.

    Native Library bluecove not available
    19.05.2009 17:43:24 org.jdesktop.application.Application$1 run
    SCHWERWIEGEND: Application class org.uweschmidt.wiimote.logger.WiimoteLogger failed to launch
    java.lang.IllegalStateException: Bluetooth failed to initialize. There is probably a problem with your local Bluetooth stack or API.

    Currently i’am using gtkwhiteboard and wminput and there is no connection problem.

    For me the WiimoteLogger would enhance my physics lessons tremendously.

    Thanks for your work and help.

  6. Uwe says: in reply to J Almer
    Re: WiimoteLogger and Ubuntu

    Hi,

    I tried sun-java (java-6-sun-1.6.0.13) and open java but the error remains.
    My system is Ubuntu 9.04 with the above mentioned java versions.

    I’m running Ubuntu 8.04 with Java (Sun) version 1.6.0_07 on a 32-bit machine.
    I found this post which may the explanation for your problem.

    I made a new release that uses BlueCove 2.1 (and the newer WiiRemoteJ 1.6a). It should be started like this:
    java -cp bluecove-gpl-2.1.0.jar:WiimoteLogger.jar org.uweschmidt.wiimote.logger.WiimoteLogger

    Uwe

  7. J Almer says:
    It is working now! Great Work ;-)

    Thanks for your help.

    as normal user it is still not working correctly
    java -cp bluecove-gpl-2.1.0.jar:WiimoteLogger.jar org.uweschmidt.wiimote.logger.WiimoteLogger
    24.05.2009 19:45:21 com.sun.corba.se.impl.ior.IORImpl getProfile
    WARNUNG: "IOP00511201: (INV_OBJREF) IOR must have at least one IIOP profile"

    but as sudo it works fine. (normal user can’t save data to a file)

    Now i have the next problem, because i am a german user, the comma is used as decimal separator and you use it as a field seperator.
    data looks like that:

    0,019, 1, -0,222222, 0,189474, 0,932039, 0, 0
    0,081, 1, -0,244444, 0,168421, 0,970874, 0, 0

    it is no real problem to import it to openoffice using fixed width, but it is a bit harder to use tools like gnuplot.
    Is there a possibility to use tabs or semicolon as field seperator?

    Thanks J. Almer

  8. Uwe says: in reply to J Almer
    Re: It is working now! Great Work ;-)

    Hi,

    as normal user it is still not working correctly [..] but as sudo it works fine. (normal user can’t save data to a file)

    that’s odd, maybe you don’t have the permissions for the folder you want to save the file to.

    Is there a possibility to use tabs or semicolon as field seperator?

    Yes, it’s defined in WiimoteDataHandler.java in line 66: private static final String SEP = ", ";

    So you could just download the source code, change SEP to whatever you like and compile & start the app with the included Ant build script. I don’t really want to make a new release just because of that.

    An easier solution would be to just change the locale to English to get a point instead of a comma as decimal separator:

    java -Duser.language=en -cp bluecove-gpl-2.1.0.jar:WiimoteLogger.jar
    org.uweschmidt.wiimote.logger.WiimoteLogger

    Uwe

  9. J Almer says: in reply to Uwe
    Re: It is working now! Great Work ;-)

    The trick with the locale is working fine.

    There was a mistake in my failure description.
    WiimoteLogger is also working for a normal user, but sometimes it doesn’t connect correctly to the Wiimote and then you can’t see the battery status.
    But a new start normally fix the problem (no user problems)

    Thanks for all your help and for the fantastic programm.

  10. Uwe says: in reply to J Almer
    Re: It is working now! Great Work ;-)

    Hi,

    WiimoteLogger is also working for a normal user, but sometimes it doesn’t connect correctly to the Wiimote and then you can’t see the battery status.
    But a new start normally fix the problem (no user problems)

    I’ve been experiencing the same thing. Maybe it is due to the bluecove-gpl-2.1.0.jar.

    Uwe

  11. Chris says:

    Hallo Uwe,
    I want to test your script under windows 2000 SP4, but I can’t start it. Doubleklick onWiimoteLogger.jar and nothing happens what can I do?

    Thanks Chris

  12. Uwe says: in reply to Chris

    Hi Chris,

    Doubleklick on WiimoteLogger.jar and nothing happens what can I do?

    try starting the app on the command line with java -jar WiimoteLogger.jar. That should print an error message which hopefully makes the problem easier to understand.

    Uwe

  13. Chris says: in reply to Uwe

    Hello Uwe…

    An error message is funny… Thousends :D

    http://www.imagebanana.com/view/7a67kkgw/jufo.png

    Thanks
    Chris

  14. Uwe says: in reply to Chris

    Hi Chris,

    it seems like you’re using the Toshiba Bluetooth stack, which is apparently not supported by BlueCove, the Bluetooth library used in my app. You need to use the WIDCOMM stack on Windows in combination with my program; please see this thread for more details.

    Uwe

  15. Chris says:

    Hello Uwe,

    thaks for that information, but unfortunately I didn’t found a download link for WIDCOMM. (Also on the last post of your linked thread)

    Can you give me the direct link?

    Thanks
    Chris

  16. Uwe says: in reply to Chris

    Hi Chris,

    I can’t give you a direct link to download the WIDCOMM stack, I’m not even sure if it’s free to download. According to Wikipedia:

    Widcomm was the first Bluetooth stack for the Windows operating system. The stack was initially developed by a company named Widcomm Inc., which was acquired by Broadcom Corporation in April 2004. Broadcom continues to license the stack for inclusion with many Bluetooth-powered end-user devices.

    So maybe you need a licensed Bluetooth stick to (legally) use the WIDCOMM stack…

    Uwe

  17. Chris says:

    Hello Uwe…
    what do you think, can I use BlueSoleil with a Toshiba Bluetootstick?

    I test it tomorrow and then I write you again.

    Chris

  18. Uwe says: in reply to Chris

    Hi Chris,

    I’m almost certain that anything except WIDCOMM won’t work. Here’s why:

    L2CAP support available only on Windows WIDCOMM Stack, Linux BlueZ and Mac OS X Stack.
    http://code.google.com/p/bluecove/wiki/Documentation

    My app uses L2CAP over BlueCove…

    Uwe

  19. I so badly want it to work… but it just won’t launch on OS X. I’ve tried all the command line variants listed in previous comments, but still no go. :(

  20. Uwe says: in reply to Pete Prodoehl

    Hi Pete,

    have you tried starting it with

    java -d32 -jar WiimoteLogger.jar
    

    Very sorry for the late reply, I’m currently traveling…

Leave a Reply