Problemas de conexão Bluetooth - Driver BlueSoleil

0 respostas
paulofafism

Pessoal estou tendo problemas ao criar um servidor utilizando o driver BlueSoleil

private void initServer(){        

        boolean isBTReady = false;

        try {            

            System.out.println("Iniciando servidor............");
         

            LocalDevice local = LocalDevice.getLocalDevice();

            local.setDiscoverable(DiscoveryAgent.GIAC);
            
            StringBuffer url = new StringBuffer("btspp://");
            
            url.append("localhost:2d26618601fb47c28d9f10b8ec891363");
            
            url.append(";name=J2SEBluetooth");
            
            url.append(";authorize=false");
            url.append(";authenticate=false");
            url.append(";encrypt=false");
            url.append(";master=true");
            
            notifier = (StreamConnectionNotifier)Connector.open(url.toString());
            
            record = local.getRecord(notifier);

            System.out.println("URL do serviço: " + record.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false));

            // remember we've reached this point.
            isBTReady = true;

        } catch (IOException e) {

            isBTReady = true;
            System.err.println("Não foi possível inicializar bluetooth: " + e);
            e.printStackTrace();

        }

}

O erro que me retorna e este:

java.io.IOException: Can't create Service [General fail] at com.intel.bluetooth.BluetoothStackBlueSoleil.rfServerOpenImpl(Native Method) at com.intel.bluetooth.BluetoothStackBlueSoleil.rfServerOpen(BluetoothStackBlueSoleil.java:384) at com.intel.bluetooth.BluetoothRFCommConnectionNotifier.<init>(BluetoothRFCommConnectionNotifier.java:42) at com.intel.bluetooth.MicroeditionConnector.openImpl(MicroeditionConnector.java:377) at com.intel.bluetooth.MicroeditionConnector.open(MicroeditionConnector.java:162) at javax.microedition.io.Connector.open(Connector.java:83) at j2sebluetooth.Server.initServer(Server.java:197) at j2sebluetooth.Server.run(Server.java:240) at java.lang.Thread.run(Thread.java:619)

Criado 3 de maio de 2010
Respostas 0
Participantes 1