• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

How to use bluetooth on a mac

Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello! I have spent hours googling for answers, but to no avail, so I'm turning to you all. I found an API called WiiRemoteJ, that allows a wiimote (The Controller of a Wii) to be connected to a computer and communicated with. (responding to button presses and accelrometer readings and such)

Anyway, the API requires, of course, java to be able to use bluetooth, and I have no experience in bluetooth. After realizing that my mac jdk did not already have the javax.bluetooth package, i downloaded it. Then I downloaded BlueCove. And now I am unsure of how to proceed.

When I run a sample file that came with the API, I get the following error:

Native Library bluecove not available
java.lang.IllegalStateException: Bluetooth failed to initialize. There is probably a problem with your local Bluetooth stack or API.
at wiiremotej.WiiRemoteJ.<clinit>(WiiRemoteJ.java:56)
at WRLImpl.main(WRLImpl.java:47)
Caused by: javax.bluetooth.BluetoothStateException: BlueCove library bluecove not available
at com.intel.bluetooth.BlueCoveImpl.loadNativeLibraries(BlueCoveImpl.java:381)
at com.intel.bluetooth.BlueCoveImpl.detectStack(BlueCoveImpl.java:434)
at com.intel.bluetooth.BlueCoveImpl.access$500(BlueCoveImpl.java:65)
at com.intel.bluetooth.BlueCoveImpl$1.run(BlueCoveImpl.java:1020)
at java.security.AccessController.doPrivileged(Native Method)
at com.intel.bluetooth.BlueCoveImpl.detectStackPrivileged(BlueCoveImpl.java:1018)
at com.intel.bluetooth.BlueCoveImpl.getBluetoothStack(BlueCoveImpl.java:1011)
at javax.bluetooth.LocalDevice.getLocalDeviceInstance(LocalDevice.java:75)
at javax.bluetooth.LocalDevice.getLocalDevice(LocalDevice.java:95)
at wiiremotej.WiiRemoteJ.<clinit>(WiiRemoteJ.java:49)
... 1 more

I'm not sure what it means by "Native Library bluecove not available". Could somebody please tell me what this means, and suggestions as to how to fix it? Thank you in advance; I am very excited at the prospect of communicating with a Wiimote in my programs, and I really do not want to let this setback stop me!
Posts: 5167
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you gone through the "Native Library location" section in the BlueCove documentation? Does it help?
Len Padson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not really sure what it means. Maybe you or somebody else could help me?

This is on the BlueCove website:

Native Library location

By default Native Library is extracted from from jar to temporary directory ${java.io.tmpdir}/bluecove_${user.name}_N and loaded from this location.
If you wish to load library (.dll) from another location add this system property -Dbluecove.native.path=/your/path.
If you wish to load library from default location in path e.g. %SystemRoot%\system32 or any other location in %PATH% use -Dbluecove.native.resource=false

I feel like this implies that it should find the native library automatically, but obviously it isn't.

This is the instructions page if anybody would be so kind as to look and help me out. I've googled everything I can think of! And furthermore, I downloaded a program (nonjava) that can communicate with the wiimote and it works just fine, so i know this is possible. But that program did not use java. I would like to be able to make my own programs. Thanks!
    Bookmark Topic Watch Topic
  • New Topic