Re: [Bluez-users] concurrent calls to RFCOMM connect()

Marcel Holtmann
2007-10-17T14:20:25Z

Hi Andrea,

> I'm planning to write an application handling communication with four
> bluetooth devices, each with its own BT address. I was thinking to
> design it with four parallel threads and use rfcomm sockets API.
>
> The common thread function will start connecting to the appropriate
> remote device by allocating a socket and calling connect(). Do I have
> to consider any particular syncronization issue between the threads?
> Is this approach reasonable or not?
>
> I found posts in the archives about connect() returning EBUSY. This
> has to be an error code specific to RFCOMM sockets. When is it
> supposed to be raised? Is it something I have to take into account in
> my scenario?

depending on how which kernel you use, this might work. Older kernel
didn't queue the ACL link requests and so you saw problems.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/