0 Replies Latest reply: Feb 11, 2011 12:11 AM by 838802 RSS

    Error in Bluecove implementation

      Hello everyone,

      I am a newbie in doing bluetooth projects. I have a client side (mobile) j2me application. I need to do a pc side j2se code so as to establish a bluetooth connection. This is my M.Tech., project. Supposed to complete within a month. So, please help with with the details!

      I am trying to run the following sample code using eclipse pulsar installed with S60_5th edition SDK:

      package com.example.Serv;

      import java.io.IOException;
      import java.util.Vector;
      import javax.bluetooth.DeviceClass;
      import javax.bluetooth.DiscoveryAgent;
      import javax.bluetooth.LocalDevice;
      import javax.bluetooth.DiscoveryListener;
      import javax.bluetooth.RemoteDevice;
      import javax.bluetooth.ServiceRecord;
      public class Serv implements DiscoveryListener{

           private static Object lock = new Object();
           private static Vector<RemoteDevice> vecDevices = new Vector<RemoteDevice>();
           public static void main (String[] args) throws IOException {
                Serv bluetoothDeviceDiscovery = new Serv();
                LocalDevice ld = LocalDevice.getLocalDevice();
                System.out.println ("Address:" +ld.getBluetoothAddress());
                System.out.println ("Name:" +ld.getFriendlyName());
                DiscoveryAgent agent = ld.getDiscoveryAgent();
                System.out.println("Start device inquiry..");
                agent.startInquiry(DiscoveryAgent.GIAC, bluetoothDeviceDiscovery);
                catch(InterruptedException e){
                System.out.println("Device Inquiry Completed");
                int devCount = vecDevices.size();
                          System.out.println("No Devices Found");
                          System.out.println("Bluetooth Devices:");
                          for (int i=0; i<devCount; i++){
                               RemoteDevice rd = (RemoteDevice)vecDevices.elementAt(i);
                               System.out.println((i+1)+"."+rd.getBluetoothAddress()+" ("+rd.getFriendlyName(true)+")");
           public void deviceDiscoverd(RemoteDevice btDev, DeviceClass cod){
                System.out.println("Device Discovered: "+btDev.getBluetoothAddress());
           public void serviceDiscovered (int transID, ServiceRecord[] servRecord){
           public void serviceSearchCompleted(int transID, int respCode){
           public void inquiryCompleted(int discType){
                case DiscoveryListener.INQUIRY_COMPLETED:
                case DiscoveryListener.INQUIRY_TERMINATED:
                case DiscoveryListener.INQUIRY_ERROR:
                     System.out.println("Unknown Response Code");
           public void deviceDiscovered(RemoteDevice arg0, DeviceClass arg1) {
                // TODO Auto-generated method stub
           public void servicesDiscovered(int arg0, ServiceRecord[] arg1) {
                // TODO Auto-generated method stub
      I use Windows 7, 64-bit OS. I have added bluecove-2.1.1 SNAPSHOT.jar for jsr-82 implementation But i am getting the following errors:

      Native Library intelbth_x64 not available
      Native Library bluecove_x64 not available
      Exception in thread "main" javax.bluetooth.BluetoothStateException: BlueCove libraries not available
           at com.intel.bluetooth.BlueCoveImpl.createDetectorOnWindows(BlueCoveImpl.java:896)
           at com.intel.bluetooth.BlueCoveImpl.detectStack(BlueCoveImpl.java:439)
           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 com.example.Serv.Serv.main(Serv.java:18)

      Can anyone please help me resolve this problem? Is this of os compatibility problem? It will be very helpful if someone tells me how to eliminate this problem!