| View previous topic :: View next topic |
| Author |
Message |
Globule
Joined: 23 Dec 2007 Posts: 5
Digg It |
Posted: Sun Dec 23, 2007 11:56 pm Post subject: Problem with Bluecove + BlueSoleil |
|
|
Hi
I Have trouble to detect my wiimote through WiimoteJ and bluecove (using bluesoleil)
I always got the following stack
BlueCove version 2.0.1 on bluesoleil
24 déc. 2007 00:49:15 wiiremotej.WiiRemoteDiscoverer deviceDiscovered
GRAVE: Error discovering device.
java.io.IOException: Can't query remote device
at com.intel.bluetooth.RemoteDeviceHelper.getFriendlyName(RemoteDeviceHelper.java:204)
at javax.bluetooth.RemoteDevice.getFriendlyName(RemoteDevice.java:131)
at wiiremotej.WiiRemoteDiscoverer.deviceDiscovered(WiiRemoteDiscoverer.java:4
at com.intel.bluetooth.BluetoothStackBlueSoleil.deviceDiscoveredCallback(BluetoothStackBlueSoleil.java:181)
at com.intel.bluetooth.BluetoothStackBlueSoleil.runDeviceInquiryImpl(Native Method)
at com.intel.bluetooth.BluetoothStackBlueSoleil.runDeviceInquiry(BluetoothStackBlueSoleil.java:174)
at com.intel.bluetooth.DeviceInquiryThread.run(DeviceInquiryThread.java:80)
java.lang.NullPointerException
at WRLImpl.main(WRLImpl.java:177)
I tried the RemoteDeviceDiscovery example of bluecove to see what kind of output I could get
I looked at the code and was surprised to see that the example produce
the following output when you change the boolean value of the call
RemoteDevice.getFriendlyName(boolean b)
with false :
BlueCove version 2.0.1 on bluesoleil
wait for device inquiry to complete...
Device 001AE936DDC0 found
name Nintendo RVL-CNT-01
Device Inquiry completed!
1 device(s) found
BlueCove stack shutdown completed
with true :
BlueCove version 2.0.1 on bluesoleil
wait for device inquiry to complete...
Device 001AE936DDC0 found
Device Inquiry completed!
1 device(s) found
BlueCove stack shutdown completed
I think that when you call getFriendlyName with true, you are expecting to get the friendly name (i.e. Nintendo RVL-CNT-01).
Since it seems taht WiiRemoteDiscoverer is using "true" and is searching for the " Nintendo RVL-CNT-01" name, it cannot work with this implementation.
I think the bluecove API (bluesoleil version) has a problem.
Am I mistaken ?
Is there a workaround for that problem ? |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 522
Digg It |
Posted: Thu Dec 27, 2007 2:24 am Post subject: |
|
|
This is quite possible. I would recommend posting on the BlueCove website. Well done finding this bug (it does seem to be a bug). This could help with many issues people are having. If they can't fix it within a few weeks, post again reminding me and I'll put out a version that has a workaround.  _________________ Cha0s |
|
| Back to top |
|
 |
Globule
Joined: 23 Dec 2007 Posts: 5
Digg It |
Posted: Sat Dec 29, 2007 2:16 pm Post subject: More information from BlueCove |
|
|
I ask BlueCove for more information.
This is the reply I got (see below)
| Quote: |
According to JSR-82 the getFriendlyName(alwaysAsk ) method will only
contact the remote device if the name is not known or alwaysAsk is
true.
The appropriate function to contact the device is not available on
bluesoleil stack so the app will throw exception (IOException - if the
remote device can not be contacted or the remote device could not
provide its name)
The device inquiry may bring the name initially or in a second run
so the name would be already available when you call the function. So
use alwaysAsk = false |
Perhaps by asking the name twice, would the device answer it's name and therefore allows WiiRemoteJ to discover the wiimote |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 522
Digg It |
Posted: Sat Dec 29, 2007 5:42 pm Post subject: |
|
|
Hrmm... that's odd, though it does appear to be an error in BlueSoleil. Well, it doesn't really matter as far as the code goes, I think, so I've changed it to false for the next release (which will hopefully be out within the next five or six days). Thanks for doing the research! _________________ Cha0s |
|
| Back to top |
|
 |
plieger
Joined: 07 Jan 2008 Posts: 7
Digg It |
Posted: Mon Jan 07, 2008 9:35 pm Post subject: |
|
|
| Cha0s wrote: | | Hrmm... that's odd, though it does appear to be an error in BlueSoleil. Well, it doesn't really matter as far as the code goes, I think, so I've changed it to false for the next release (which will hopefully be out within the next five or six days). Thanks for doing the research! |
Hi Cha0s, first of all: great work!
Any chance we'll see the next release soon?
Cheers! |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 522
Digg It |
Posted: Mon Jan 07, 2008 10:43 pm Post subject: |
|
|
If you use the latest BlueCove stack (the snapshots), that bug should be fixed, so no need to wait! I'm hoping to get out the next release, including updated IR parsing techniques (5DOF!), the Wii Guitar, and a few other goodies in the next week or two. It all depends on how much time I have, though. I'll keep you posted. _________________ Cha0s |
|
| Back to top |
|
 |
plieger
Joined: 07 Jan 2008 Posts: 7
Digg It |
Posted: Tue Jan 08, 2008 9:18 am Post subject: |
|
|
I am using 2.02 which I believed to be the snapshot, but now it's 2.03?
With 2.02 I still get the error message; I thought alwaysAsk = false would solve this problem? |
|
| Back to top |
|
 |
|