I've got a question for you and I hope you can help me:
We're writing a bluetooth application that (among other things) can read and write data to a autonomous transponder. We try hard to keep that application not blocking during. To reach that goal we for example implemented the DeviceDiscovery-Service, which implements some kind of EventHandler.
Anayway, we are using an L2CAP-Connection and the problem for now is the reading service:
As it's pointed out in the API, the receive()-Service of the L2CAPConnection-Class requires the method "ready()" to return true for not blocking the whole thing. Does that mean we have to put a Threading in our application to doublecheck whether data is available (using the ready()-method) at the RemoteDevice and after that receive it? Isn't there an easier way?
I've tried to get some information about the bluetooth driver itself...but I wasn't very lucky.
I hope theres someone out there to help us out of this...
Its best to implement I/O Operation in sepparate thread, so you start a thread, open connection, read/write data and when all is complete you notify the main application that the I/O has finished.
hope that helps
Thank you very much for your answer. We had implemented that application with Threads and at least the Threading works fine.