Discussion:
Problem connection after acceptAndOpen
Fabio Di Giuseppe
2014-10-01 13:23:51 UTC
Permalink
Hi guys,
i have a problem.
First, i have to set my device as discoverable for another device, and then
i wait.

CODE

*url = "btspp://localhost:"+macaddress;*

*System.out.println("Setting device to be discoverable...");*

*local = LocalDevice.getLocalDevice();*

*local.setDiscoverable(DiscoveryAgent.**GIAC**);*

*System.out.println("Start advertising service...");*

*server = (StreamConnectionNotifier)Connector.open(url);*

*System.out.println("Waiting for incoming connection...");*

*con = (StreamConnection) server.acceptAndOpen();*


after this, if i close the server (acceptandopen) because i need to send
something to the same device, i get an error on line 2

CODE


*1 url = "btspp://"+macaddress+":5";*

*2 con = (StreamConnection) Connector.open(url); *


ERROR

*java.io.IOException: Failed to connect. [115] Operation now in progress*

* at
com.intel.bluetooth.BluetoothStackBlueZ.connectionRfOpenClientConnectionImpl(Native
Method)*


Why?

Thank you at all.
--
You received this message because you are subscribed to the Google Groups "bluecove-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bluecove-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to bluecove-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/bluecove-users.
For more options, visit https://groups.google.com/d/optout.
Loading...