 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
Classiclll
Joined: 10 Feb 2007 Posts: 94 Location: Japan
Digg It |
Posted: Thu Dec 27, 2007 5:12 am Post subject: |
|
|
i have forgotten this fact, too.
the previous multi-remote test was done with a remote borrowed from my friend.
so ican't multi-remotes test, now.
Garth, would you please test and report ? _________________ Classiclll |
|
| Back to top |
|
 |
Garth
Joined: 22 Dec 2007 Posts: 6
Digg It |
Posted: Sat Dec 29, 2007 1:26 am Post subject: |
|
|
Hi Chaos,
Thanks for the update. This one seems a lot more stable than the previous version.
One thing that I have been having some trouble with: the first remote connects very quickly, but the 2nd one takes longer, and sometimes times out. The 3rd one always times out. According to the logging it is stalling in the WiiRemote constructor. Is this some sort of connectivity issue? Have you run into this?
Thanks again for the update.
Garth |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 493
Digg It |
Posted: Sat Dec 29, 2007 2:40 am Post subject: |
|
|
Hrmm... I haven't experienced that problem before, but it could be something introduced with the latest code. Would you mind setting the logger to output all messages and posting a log? The easiest way to do this is to call WiiRemoteJ.setConsoleLoggingAll() when you start your program. Thanks! _________________ Cha0s |
|
| Back to top |
|
 |
Garth
Joined: 22 Dec 2007 Posts: 6
Digg It |
Posted: Sat Dec 29, 2007 9:54 pm Post subject: |
|
|
Hi Chaos,
Below is the output from trying to connect 3 Wiimotes. As you can see, the third one seems to sit in the constructor for 20 seconds before I give up and shut it down. (I'm assuming that the message "Initialization complete" happens at the end of the constructor).
I'm not sure what could cause this. Presumably the previous 2 Wiimotes are hogging resources somehow. This could be from a threading issue, where the thread collecting information from the other 2 Wiimotes is taking all the CPU time, or maybe it is a network thing, with the 2 other Wiimotes hogging bandwidth and not letting the 3rd one connect. You're probably in a better position to figure out what is going on.
Thanks,
Garth
BlueCove version 2.0.1 on widcomm
29-Dec-2007 1:48:21 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
29-Dec-2007 1:48:21 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is a WiiRemote!
29-Dec-2007 1:48:22 PM wiiremotej.WiiRemote construct
INFO: btl2cap://00191D7E00EA
29-Dec-2007 1:48:22 PM wiiremotej.WiiRemote calibrateAccelerometer
FINER: Calibrating accelerometer...
29-Dec-2007 1:48:23 PM wiiremotej.WiiRemote construct
FINER: Initialization complete.
WiimoteInput::wiiRemoteDiscovered
29-Dec-2007 1:48:23 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
29-Dec-2007 1:48:27 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
29-Dec-2007 1:48:27 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is already connected.
29-Dec-2007 1:48:28 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
29-Dec-2007 1:48:28 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is a WiiRemote!
29-Dec-2007 1:48:28 PM wiiremotej.WiiRemote construct
INFO: btl2cap://001AE922F085
29-Dec-2007 1:48:29 PM wiiremotej.WiiRemote calibrateAccelerometer
FINER: Calibrating accelerometer...
WiimoteInput::wiiRemoteDiscovered
29-Dec-2007 1:48:29 PM wiiremotej.WiiRemote construct
FINER: Initialization complete.
29-Dec-2007 1:48:29 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
29-Dec-2007 1:48:29 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
29-Dec-2007 1:48:33 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
29-Dec-2007 1:48:33 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is already connected.
29-Dec-2007 1:48:33 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
29-Dec-2007 1:48:33 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is already connected.
29-Dec-2007 1:48:33 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
29-Dec-2007 1:48:33 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is a WiiRemote!
29-Dec-2007 1:48:34 PM wiiremotej.WiiRemote construct
INFO: btl2cap://00191DCFA792
29-Dec-2007 1:48:56 PM wiiremotej.WiiRemote disconnect
FINE: Someone ordered a disconnect?
29-Dec-2007 1:48:56 PM wiiremotej.WiiRemote disconnect
FINE: Someone ordered a disconnect? |
|
| Back to top |
|
 |
Classiclll
Joined: 10 Feb 2007 Posts: 94 Location: Japan
Digg It |
Posted: Mon Dec 31, 2007 1:23 am Post subject: Re: Problem getting more than 1 remote sensing IR |
|
|
hi Garth.
do you still use the following code?
| Garth wrote: | My code looks something like this: | Code: | for (int i=0; i<2; i++) {
WiiRemote remote = WiiRemoteJ.findRemote();
remote.addWiiRemoteListener(this);
remote.enableContinuous();
remote.setIRSensorEnabled(true, WRIREvent.BASIC);
remote.setAccelerometerEnabled(true);
remote.setLEDIlluminated(i, true);
remote.vibrateFor(100);
} |
| the first remote instance will be forgotten when the variable i becomes one.
so, after gc releases the first remote object, the listener(this-self) may be confused.
i think. _________________ Classiclll |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 493
Digg It |
Posted: Mon Jan 07, 2008 10:48 pm Post subject: |
|
|
Garth, I've finally gotten around to testing (there were some problems with BlueCove on the Mac that had to be resolved first). And I've found that I can indeed connect 4 remotes and enable BASIC IR. The remotes do take around a minute to connect, but I think that's more a BlueCove thing than a WiiRemote thing. Also, this was a very inefficient test, since I connected the remotes by calling 4 findRemote() methods in sequence instead of with a listener and the findRemotes(...) method. But it should work just fine. How are you connecting to the remotes?
P.S. Here's my log:
BlueCove version 2.0.2-SNAPSHOT on mac
Jan 7, 2008 5:40:03 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
Jan 7, 2008 5:40:03 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is a WiiRemote!
Jan 7, 2008 5:40:04 PM wiiremotej.WiiRemote construct
INFO: btl2cap://0017AB29BB7B
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote calibrateAccelerometer
FINER: Calibrating accelerometer...
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote construct
FINER: Initialization complete.
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
Jan 7, 2008 5:40:05 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:27 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
Jan 7, 2008 5:40:27 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is a WiiRemote!
Jan 7, 2008 5:40:27 PM wiiremotej.WiiRemote construct
INFO: btl2cap://00191D7119A2
Jan 7, 2008 5:40:32 PM wiiremotej.WiiRemote calibrateAccelerometer
FINER: Calibrating accelerometer...
Jan 7, 2008 5:40:32 PM wiiremotej.WiiRemote construct
FINER: Initialization complete.
Jan 7, 2008 5:40:32 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
Jan 7, 2008 5:40:32 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
Jan 7, 2008 5:40:32 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:32 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:32 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:49 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
Jan 7, 2008 5:40:49 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is a WiiRemote!
Jan 7, 2008 5:40:50 PM wiiremotej.WiiRemote construct
INFO: btl2cap://0017AB2C2697
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemote calibrateAccelerometer
FINER: Calibrating accelerometer...
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemote construct
FINER: Initialization complete.
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemoteJ findRemote
FINEST: Nintendo RVL-CNT-01
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:40:51 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:41:12 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: Nintendo RVL-CNT-01...
Jan 7, 2008 5:41:12 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
FINE: is a WiiRemote!
Jan 7, 2008 5:41:13 PM wiiremotej.WiiRemote construct
INFO: btl2cap://0017AB322D14
Jan 7, 2008 5:41:16 PM wiiremotej.WiiRemote calibrateAccelerometer
FINER: Calibrating accelerometer...
Jan 7, 2008 5:41:16 PM wiiremotej.WiiRemote construct
FINER: Initialization complete.
Jan 7, 2008 5:41:16 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:41:16 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Buffering audio file...
Prebuf done: 0 seconds.
Jan 7, 2008 5:41:16 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:41:16 PM wiiremotej.WiiRemote$1 run
FINEST: Data write finished.
Jan 7, 2008 5:41:32 PM wiiremotej.WiiRemote$1 run
FINE: Wii Remote disconnected.
Remote disconnected... Please Wii again.
Jan 7, 2008 5:41:32 PM wiiremotej.WiiRemote disconnect
FINE: Someone ordered a disconnect?
BlueCove stack shutdown completed _________________ Cha0s |
|
| Back to top |
|
 |
diplomat
Joined: 15 Sep 2007 Posts: 20
Digg It |
Posted: Wed Jan 23, 2008 11:38 am Post subject: Multiple Remotes |
|
|
With me the Multi Remote IR works only sometimes.
I didn't really find out why, but whenever I get the status report of both Remotes, the IR Sensors work fine. But sometimes the second remote doesn't give me the status report and that means, that there is no IR for remote 2.
This is my code if it helps
| Code: |
try
{
WiiRemoteDiscoveryListener listener = new WiiRemoteDiscoveryListener()
{
public void wiiRemoteDiscovered(WiiRemoteDiscoveredEvent evt)
{
evt.getWiiRemote().addWiiRemoteListener(new Wii(evt.getWiiRemote(), publisher));
try {
// Beschleunigungssensor aktivieren
evt.getWiiRemote().setAccelerometerEnabled(true);
// Lautsprecher aktivieren
evt.getWiiRemote().setSpeakerEnabled(true);
// InfraRot Sensor aktiviert, inkl size
evt.getWiiRemote().setIRSensorEnabled(true, WRIREvent.BASIC);
// LED Anzeige aktiviert
evt.getWiiRemote().setLEDIlluminated(0, true);
evt.getWiiRemote().getButtonMaps().add(new ButtonMap(WRButtonEvent.HOME, ButtonMap.NUNCHUK, WRNunchukExtensionEvent.C, new int[]{java.awt.event.KeyEvent.VK_CONTROL},
java.awt.event.InputEvent.BUTTON1_MASK, 0, -1));
//evt.getWiiRemote().getButtonMaps().add(new ButtonMap(WRButtonEvent.HOME, new int[]{java.awt.event.KeyEvent.VK_CONTROL},
// java.awt.event.InputEvent.BUTTON1_MASK, 0, -1));
// holt den Status des Controllers (LED, Batterie, etc.)
evt.getWiiRemote().requestStatus();
// Gerät bei Mundo anmelden
announceDevice(evt.getWiiRemote().getBluetoothAddress());
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
|
|
|
| Back to top |
|
 |
|
|
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
|