lll's Project WikiWelcome to the library project of Classiclll These libraries are the external libs of Processing/Proce55ing Sample sketches are here Outline Entry Pages
Processing Links
Proce55ing Gallery
WiiRemoteJ by Cha0s
Tips for WiiRemoteJ, by Cha0s
LINUX NOTE
If you get errors that look like this:
Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError:
de.avetana.bluetooth.stack.BlueZ.cancelInquiry()V
at de.avetana.bluetooth.stack.BlueZ.cancelInquiry(Native Method)
at javax.bluetooth.DiscoveryAgent.cancelInquiry(DiscoveryAgent.java:265)
at wiiremotej.WiiRemoteDiscoverer.deviceDiscovered(WiiRemoteDiscoverer.java:68)
at javax.bluetooth.DiscoveryAgent.deviceDiscovered(DiscoveryAgent.java:284)
at de.avetana.bluetooth.stack.BlueZ.hciInquiry(Native Method)
at javax.bluetooth.DiscoveryAgent$1.run(DiscoveryAgent.java:208)
at edu.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
(PooledExecutor.java:743)
at java.lang.Thread.run(Thread.java:619)
Then try this (tip provided by realjab):
Open Bluez.cpp.
Add the following code:
JNIEXPORT void JNICALL Java_de_avetana_bluetooth_stack_BlueZ_cancelInquiry
(JNIEnv *env, jclass obj) {
/* Close the specified HCI device */
//printf("Function called: %s, %i\n"__FILE__, __LINE__);
//hci_close_dev(dd);
return;
}
After completing the change don't forget to ./configure and ./install avetana to get the new .jar and the new .so file.
UBUNTU (GUTSY) NOTE -- fix courtesy of Nemno
If you're using the Avetana stack and your programs are hanging on the following message: "FINER: Calibrating accelerometer..."
Do the following:
Copy the compiled files to your WiiRemotej directory. And you're set!
Explanation of the problem (for those who are curious; not necessary to get it to work):
Verbatim from Nemno.
The problem with the avetana was that when you open a connection the LCAP protocol does some handshake things.
avetana : I request a config wiimote : Ok set your MTU size on 185 avetana : I am ignorant so i'll use MTU size of 672 wiimote : See Yaa after fix
avetana : I request a config wiimote : Ok set your MTU size on 185 avetana : Ok setting MTU size on 185 wiimote : nice doing business avetana : blabla wiimote : blala etc..etc... _ Tips for P5 sketch, by blindfishA couple of useful tips for others trying this out:
By following these two steps I'm finding this fairly reliable and can now definitely get on with some experimenting |