Manish Kumar Singh
2014-06-17 10:42:42 UTC
I am using BlueCove for communicating between Android and windows devices.
I am able to establish connection for first time . However, after
receiving data from android device (sending acknowledgement to android)
"BlueCove stack ShutDown" occurs. I want server (ie on Windows Devices) to
remain in listening mode .
My code :
StreamConnectionNotifier streamConnNotifier =
(StreamConnectionNotifier)Connector.open( connectionString );
//Wait for client connection
System.out.println("\nServer Started. Waiting for clients to
connect...");
StreamConnection connection=streamConnNotifier.acceptAndOpen();
RemoteDevice dev = RemoteDevice.getRemoteDevice(connection);
System.out.println("Remote device address:
"+dev.getBluetoothAddress());
System.out.println("Remote device name:
"+dev.getFriendlyName(true));
InputStream inStream=connection.openInputStream();
BufferedReader bReader=new BufferedReader(new
InputStreamReader(inStream));
String lineRead=bReader.readLine();
System.out.println(lineRead);
OutputStream outStream=connection.openOutputStream();
/* BufferedWriter bWriter=new BufferedWriter(new
OutputStreamWriter(outStream));
bWriter.write("Response String from SPP Server\r\n");*/
PrintWriter pWriter=new PrintWriter(new
OutputStreamWriter(outStream));
pWriter.write("Response String from SPP Server\r\n");
pWriter.flush();
pWriter.close();
streamConnNotifier.close();
Evenafter i am commenting "streamConnNotifier.close(); " BlueCove stack
ShutDown still occurs . Please Help
I am able to establish connection for first time . However, after
receiving data from android device (sending acknowledgement to android)
"BlueCove stack ShutDown" occurs. I want server (ie on Windows Devices) to
remain in listening mode .
My code :
StreamConnectionNotifier streamConnNotifier =
(StreamConnectionNotifier)Connector.open( connectionString );
//Wait for client connection
System.out.println("\nServer Started. Waiting for clients to
connect...");
StreamConnection connection=streamConnNotifier.acceptAndOpen();
RemoteDevice dev = RemoteDevice.getRemoteDevice(connection);
System.out.println("Remote device address:
"+dev.getBluetoothAddress());
System.out.println("Remote device name:
"+dev.getFriendlyName(true));
InputStream inStream=connection.openInputStream();
BufferedReader bReader=new BufferedReader(new
InputStreamReader(inStream));
String lineRead=bReader.readLine();
System.out.println(lineRead);
OutputStream outStream=connection.openOutputStream();
/* BufferedWriter bWriter=new BufferedWriter(new
OutputStreamWriter(outStream));
bWriter.write("Response String from SPP Server\r\n");*/
PrintWriter pWriter=new PrintWriter(new
OutputStreamWriter(outStream));
pWriter.write("Response String from SPP Server\r\n");
pWriter.flush();
pWriter.close();
streamConnNotifier.close();
Evenafter i am commenting "streamConnNotifier.close(); " BlueCove stack
ShutDown still occurs . Please Help
--
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.
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.