From: Rafal(sxat) on
Hi,

Where is error in my function to connect with BT (middlet is signed with
export root certificate to emulator)

this code make exception:
--------------------
String url = dAgent.selectService(serverUUID,
ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
-----------------------------
Output:
>Searching for service
>javax.bluetooth.BluetoothConnectionException: Error in btl2cap::connect ()
> at com.sun.jsr082.bluetooth.btl2cap.L2CAPConnectionImpl.doOpen(),
> bci=79
> at com.sun.jsr082.bluetooth.btl2cap.L2CAPConnectionImpl.<init>(),
> bci=64

what is wrong, why not show
System.out.println("No matching service found!");

running on: Netbeans with SDK 3.0 CLDC-1.1, MIDP-2.0 ClamshellCldcPhone1

Thanks
Rafal


--- all initial code---
LocalDevice local = LocalDevice.getLocalDevice();
//local.setDiscoverable(DiscoveryAgent.NOT_DISCOVERABLE);
DiscoveryAgent dAgent = local.getDiscoveryAgent();
UUID serverUUID = new UUID("10203040607040A1B1C1DE100", false);
System.out.println("Searching for service");
String url = dAgent.selectService(serverUUID,
ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false); <<--it is
exception

if (url == null) {
System.out.println("No matching service found!");
return;
}

 | 
Pages: 1
Prev: Write data to file
Next: JPanel