writeCharacteristic L2CP write request incomplete
-
I've created a GATT Server (QLowEnergyController in Peripheral Mode).
I'm trying to pipe the data from QTcpSocket over BLE.
I've tried MTU with values 23, 185, 512, etc.
All give this warning and the packets are discarded:qt.bluetooth.bluez: L2CP write request incomplete: 0 of 23 (mtu)
this is my code:
connect(socket, &QTcpSocket::readyRead, this, [=] { while (!socket->atEnd()) { const QByteArray data = socket->read(mtu); qDebug() << "data from broker" << data.length(); if (!data.isEmpty()) { try { service->writeCharacteristic(txChar, data); } catch (const std::exception &e) { qDebug() << e.what(); } } } });https://code.qt.io/cgit/qt/qtconnectivity.git/tree/src/bluetooth/qlowenergycontroller_bluez.cpp#n930
What's the root cause of this error?