[TEST REQUEST] Windows Bluetooth LE build

Linus Torvalds torvalds at linux-foundation.org
Mon Jun 11 11:50:56 PDT 2018


On Mon, Jun 11, 2018 at 11:31 AM Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
>
> the Qt BLE Windows stack on the other hand detects it as "Write
> without response".
> this has to be investigated - possible bug.

That's how you enable notifications - you write a 16-bit value to the
notification thing that has the notification bit enabled (and you
don't ask for responses).

BLE is kind of odd. We also do things kind of oddly, because the way
we generate that 16-bit value is with

    QByteArray::fromHex("0100")

which is just another way to say "two bytes: 0x01 and 0x00", which is
just the little-endian layout of 0x0001.

So it's that

    qDebug() << "now writing \"0x0100\" to the descriptor" <<
d.uuid().toString();
    ble->preferredService()->writeDescriptor(d, QByteArray::fromHex("0100"));

that should enable notifications on the notification characteristic.

                Linus


More information about the subsurface mailing list