Hi,

i work on a project for my study. There i try to connect my Notebook via Bluetooth(SPP) to some mobile phones.
It works so far so well. But always when i try to connect a new mobile phone ... Windows 7 tries to add the device first.

How can i connect without using windows?


The mobile phone is the server:

Code:
try
        {
            streamConnNotifier = (StreamConnectionNotifier)Connector.open(connectionString);
            connection = streamConnNotifier.acceptAndOpen();
        }
        catch(IOException e)
        {
            Alert info = new Alert("Error", "Connection failed\n" + e.toString(), null, AlertType.ALARM);
            info.setTimeout(-2);
            display.setCurrent(info);
        }
connectionString is a normal String like this:
"btspp://localhost:abababababababababababababababab;authenticate=false;encrypt=false"

So the mobile phone wait as long as the notebook try to connect.

And the Notebook is the client:

Code:
public void servicesDiscovered(int i, ServiceRecord[] srs) {
        if(srs != null && srs.length > 0) {
            for(int x=0; x<srs.length;x++) {
                // Wurde bereits ein Service auf diesem BTGerät gefunden so speichere es nicht erneut
                if(!map.containsKey(srs[x].getHostDevice().getBluetoothAddress())) {
                    String conString = srs[x].getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
                    BTConnection btCon = new BTConnection(connections.size(), conString, srs[x].getHostDevice());
                    connections.add(btCon);
                    map.put(srs[x].getHostDevice().getBluetoothAddress(), btCon);
                    notConnected.add(btCon);
                    status.sendStatus(BTStatusListener.CONTROLL, "#servicefound");
                }
            }
        }
    }
in BTConnection there is the method

Code:
public void connect(BTRecieveListener listener) throws IOException {
        if(connectionString != null) {
            sc = (StreamConnection) Connector.open(connectionString);
            dos = sc.openDataOutputStream();
            dis = sc.openDataInputStream();
            this.listener = listener;
            connected = true;
            start();
        }
    }
I use the bluecove libary

The best way would be if the Devices only connect without any keys oder something else

I hope u can help me.

gz Florian