Re: [Bluez-devel] Problems while sending and receiving with rfcomm sockects

Marcel Holtmann
2004-06-01T12:34:27Z

Hi Didier,

> I'm writting a server-client application over bluez using rfcomm sockets. I've
> created two threads: one for sending and the other for receiving. The problem
> occurs sometimes (sporadical) and only when I'm sending and receiving data at
> the same time: The received data seems to be corrupt... Do I have to use
> mutexes or other synchronizing method? The error ocurrs more often if I execute
> more than one server at the same time.

I never used RFCOMM in a multi-threaded program. Actually I avoid to use
threads wherever possible. However sending and receiving at the same
time should work. Maybe there is a kernel bug, what version do you use?