Hi Sérgio, On Wed, 2011-07-13 at 06:51 -0400, Sérgio Capela wrote: > Hello, > ... > Is it possible to accept connections at the same time a inquiry is running > or is the inquiry a blocking operation at the stack level? With two > adapters my server accepts remote connections and receives and sends data > but when an inquiry is running it stops accepting connections. The inquiry > is done in a separate thread. That's handled in the controller at the baseband level. I don't know of any controllers that will accept connections while in the Inquiry substate - I'm not even sure if it's possible. Why are you initiating discovery from the server-side? If you have to have server-side discovery, you could only perform inquiry with one controller at a time. That way, the other controller's available for new rfcomm connections (assuming your client load-balances like that...). > Another question is related to a rfcomm client getting into D state and > thus not killable. Due to my setup (two adapters in the same computer) I > can use the computer as both the server and the client. For test purposes > only I made a simple rfcomm client and I put it in a shell cycle thus > stressing the system regarding bluetooth connections. In this situation > the rfcomm client application becomes unresponsive after some time due to > a non exiting disk sleep. I then end up with multiple instances of the > same application and I can't kill them. By launching the application after > this I can see that the code blocks at a socket connection command > entering in a disk sleep state from which it doesn't exit. When this > happens I have to unplug the bluetooth adapter to get it working again > since it starts to give timeouts with hciconfig commands like "hciconfig > reset". > > Any ideas about this? The problem itself is not serious since it shouldn't > arise in normal conditions but it does require a reboot because of the > state D processes and makes the adapter unusable unless it is unplugged. Although I'm not certain that they would fix the problem you're having, I just posted a patch series that resolves some issues with lost wakeups in rfcomm and l2cap. They need testing. You'd need patches 1~4 of 7. Please feel free to reply direct regarding whether you can test these and what that outcome was. Regards, Peter ��.n��������+%������w��{.n�����{����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�