| View previous topic :: View next topic |
| Author |
Message |
CurriedLambda
Joined: 27 Mar 2008 Posts: 7 Location: Shanghai
Digg It |
Posted: Thu Mar 27, 2008 3:05 am Post subject: Can't reconnect first controller that disconnects (of pair) |
|
|
I'm using WiiRemoteJ.findRemotes(listener) to continuously search for controllers, but I'm having trouble handling certain disconnect controllers.
If I just connect one controller and then disconnect it, I can reconnect just fine.
But if I connect two controllers and then disconnect one, I can't reconnect it. The 4 lights flash like it's trying to sync but then they turn off and I don't see a connected message.
The strange thing is that if I proceed to disconnect the remaining controller I can connect that particular controller. But the first controller cannot be connected until I restart the app.
The controllers themselves don't seem to be broken, since only the order of disconnection matters.
Any ideas? |
|
| Back to top |
|
 |
morgan
Joined: 26 Mar 2008 Posts: 4
Digg It |
Posted: Thu Mar 27, 2008 4:03 pm Post subject: |
|
|
this is the exception thrown when the wiimote fails to reconnect:
ar 27, 2008 12:02:12 PM wiiremotej.WiiRemoteDiscoverer deviceDiscovered
SEVERE: Error discovering device.
java.lang.NullPointerException
at com.intel.bluetooth.RemoteDeviceHelper.getRemoteDevice(RemoteDeviceHelper.java:223)
at javax.bluetooth.RemoteDevice.getRemoteDevice(RemoteDevice.java:194)
at wiiremotej.WiiRemote.equals(WiiRemote.java:2063)
at java.util.Vector.indexOf(Vector.java:364)
at java.util.Vector.indexOf(Vector.java:337)
at java.util.Vector.removeElement(Vector.java:603)
at java.util.Vector.remove(Vector.java:761)
at wiiremotej.WiiRemoteDiscoverer.deviceDiscovered(WiiRemoteDiscoverer.java:66)
at com.intel.bluetooth.BluetoothStackOSX.deviceDiscoveredCallback(BluetoothStackOSX.java:273)
at com.intel.bluetooth.BluetoothStackOSX.runDeviceInquiryImpl(Native Method)
at com.intel.bluetooth.BluetoothStackOSX.runDeviceInquiry(BluetoothStackOSX.java:250)
at com.intel.bluetooth.DeviceInquiryThread.run(DeviceInquiryThread.java:82) |
|
| Back to top |
|
 |
|