[PATCH 2/2] qtserialbluetooth: use QIODevice::Unbuffered io
Jef Driesen
jef at libdivecomputer.org
Wed Sep 30 23:51:11 PDT 2015
On 2015-09-29 23:54, Anton Lundin wrote:
> On 29 September, 2015 - Thiago Macieira wrote:
>
>> On Tuesday 29 September 2015 21:59:31 Anton Lundin wrote:
>> > - rc = device->socket->write((char *) data + nbytes, size -
>> > nbytes);
>> > + rc = device->socket->write((char *) data + nbytes,
>> > size - nbytes > 16 ? 16 : size - nbytes);
>>
>> Yeah, that really shows the bug is probably in the receiving firmware,
>> that it
>> can't deal with block sends of differing sizes.
>
> libdivecomputer use of 1024b size blocks over the "regular"
> /dev/rfcommX
> works just fine, but that might get re-packaged to smaller blocks
> somewhere.
There is no real technical reason for reading 1K blocks. It's mainly
there for the progress events. We want regular updates, but also not too
often. A 1K block takes about 100ms, which is a nice tradeoff that
results in smooth progress updates.
Jef
More information about the subsurface
mailing list