Getting some QLowEnergyController::UnknownError from time to time..



  • Hello,
    I'm currently developing an HVAC sensing system using Qt 5.4 / 5.5 Bluetooth LE, and on the other end we've got a couple of RFDuinos.

    Everything works great, we can poll our remote sense modules, discovering it's services, acquing their attributes and reading from them (also writing) via a QLowEnergyController.

    The thing is, we are polling the remote RFDuinos (with some sensors) every 30 seconds. With that rate, we get on a virtualized debian linux on the host machine (with a bluetooth le compatible dongle) a ratio of 1 or 2 QLowEnergyController::UnknownError, errors per HOUR.

    Now, when the same software is deployed at a Raspberry Pi, with QT 5.5 compiled natively, that ratio goes up to 7 errors of those per hour.

    I've tried all sort of stuff. Previously there was an instance object of QLowEnergyController created per device and i was reusing those.

    As my last attempt to get free of that QLowEnergyController::UnknownError, i'm just using one instance object now for the entire program, and i'm deleting and creating a new one everytime we need to poll a remote device. So it's a fresh object.

    Has anyone experienced that error flag when working with QT Bluetooth LE?. I'm currently running out of ideas. Dunno if we should blame the RFDuinos or what.

    The exact moment that error rises is when after connection, we try to discover the RFDuino's services. (It actually connects, so it's not a busy or i/o issue, but fails on services discovery)

    Here's our debug output snipet so you get and idea.

    [2015-06-29 15:13:02] SenseBaseStation .......... Polling Sense Modules for data
    [2015-06-29 15:13:02] SenseModule .......... Attempting to retrieve data from SenseModule [CE:6C:B5:50:44:72]
    [2015-06-29 15:13:02] SenseModule .......... Connected to SenseModule [CE:6C:B5:50:44:72]
    [2015-06-29 15:13:02] SenseModule .......... Discovering services
    [2015-06-29 15:13:04] SenseReading .......... Creating: HUM: 68.300003 RTMP: 21.500000 WTMP: 0.000000 CO2: 0 LUX: 100 R0: 0 R1: 0
    [2015-06-29 15:13:04] SenseModule .......... Disconnected from SenseModule [CE:6C:B5:50:44:72]
    [2015-06-29 15:13:07] SenseModule .......... Attempting to retrieve data from SenseModule [CB:59:00:D7:B0:92]
    [2015-06-29 15:13:07] SenseModule .......... Connected to SenseModule [CB:59:00:D7:B0:92]
    [2015-06-29 15:13:07] SenseModule .......... Discovering services
    [2015-06-29 15:13:08] SenseModule .......... Controller error: 1
    [2015-06-29 15:13:08] SenseModule .......... BT Error: Unknown bluetooth error
    [2015-06-29 15:13:08] SenseModule .......... Disconnected from SenseModule [CB:59:00:D7:B0:92]
    [2015-06-29 15:13:11] SenseBaseStation .......... Polling Done

    Thank you very much.

    Regards, Alan Kennedy


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    This article about the current state of QtBluetooth and the related task in Jira might get you some information you could use.

    Hope it helps


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.