Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. writeCharacteristic L2CP write request incomplete
Qt 6.12 LTS is out! See what's new in the release blog

writeCharacteristic L2CP write request incomplete

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 266 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ali EP
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt
    • Unsolved