What steps will reproduce the problem? 1. start a btspp service:
StreamConnectionNotifier streamConnNotifier = (StreamConnectionNotifier)Connector. open("btspp://localhost:" + new UUID(0x1234) + ";name=Test");
- after the service has started, try to connect from another application (or another thread) to a known device( known by its address and channel). Make sure to have the device with bluetooth on.
StreamConnection testConnection = (StreamConnection) Connector.open("btspp://00a096122e66:1");
What is the expected output? What do you see instead?
I expect that the background btspp service to run in the background and to be able to connect with my bluetooth device from the second application.
Instead, the background service takes over the connection with my device and the application that wants to connect with the device in the first place, receives an error (see attached file).
What BlueCove version are you using (include build number for SNAPSHOT)? On what operating system and jvm? Is this 64-bit or 32-bit OS and jvm?
I use Bluecove 2.1.1-SNAPSHOT.60, on Macintosh 10.4.11, with Java 1.5. 32-bit OS.
Please provide any additional information below. I want to mention here that the same scenario works fine on winsock and widcomm stacks on Windows. Also works fine on above mentioned configuration if the Avetana library is used instead of Bluecove. A similar problem was reported here : http://wiigee.org/forums/viewtopic.php?f=6&t=33
- Apple BT error.txt 2.11KB
Comment #1
Posted on Mar 31, 2010 by Massive Horse(No comment was entered for this change.)
Comment #2
Posted on Jul 26, 2010 by Quick KangarooHello,
I am trying to use bluecove to do peer to peer networking and I am running into the same issue. Do you have any pointers on where to look or what might cause the issue? I'm willing to dig into the code (and have been doing so for a while now).
Regards
Comment #3
Posted on Jul 26, 2010 by Massive HorseIt is impossible to connect to service running locally on the same device! You need to connect to service from another computer or device.
Comment #4
Posted on Jul 26, 2010 by Quick KangarooThanks for your reply! However, the situation is slightly different:
We start an RFCOMM server in one thread. Then we discover and connect to a device in another thread (both threads running on the same device). The outgoing connection never succeeds, it hangs in Connector.open().
We are not trying to connect to services running on the same device, but running both an RFCOMM server and connecting to a (remote) RFCOMM client.
We're testing with bluecove SVN and OSX 10.6.4. Does that help narrow it down? If not, can you please tell us how we can help you debug it or how we should investigate it ourselves? Thanks!
Comment #5
Posted on Jul 27, 2010 by Massive HorseSo you are connecting to Second device?
To debug this problem: - The important debug for this case on Mac version only prints to stdout directly from native code. So when you enable regular bluecove debug (-Dbluecove.debug=true) watch for stdout. Do you see somthing like 'ignore connectionComplete'
Add more debug code to OSXStackChannelController.mm and OSXStackRFCOMM.mm see what are the events generated
Try to your app with demo version for avetana. Does it work?
Try running server in different process not just thread does it help?
Can the problem be reproduced using Bluecove tester application?
Can the problem be reproduced using L2CAP protocol?
Status: New