Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-58712

Allow to speed up reading out first data from BLE peripheral by removing need for discovering services and service details

    XMLWordPrintable

Details

    Description

      In Qt's current Bluetooth Low Energy implementation, it is needed to call QLowEnergyController::discoverServices() and QLowEnergyService::discoverDetails() before it is allowed to read or write a characteristic on a BLE device.

      In our use case, the obligatory discover methods discover services and details of of services which exists, but we are never going to use. While gathering information we don't need, we have to wait a significantly amount of time before being able to read out data we are interested in. In our use case, calling the discoverings methods sums up to about 4-6 seconds (nearly all of this time is needed for QLowEnergyService::discoverDetails()) before we are able read out any if the really interesting data from characteristics of the connected peripheral.

      What it makes even worse for us is the fact, that we connect only to ble devices produced by our company. This means we do exactly know what services and characteristics exists on the devices we want to connect, even the handles of the characteristics are exactly known. So even the details of services and characteristics we are going to use were known without doing any discovering.

      We would appreciate it very much, if it would be possible to give us the possibility to speed up reading out the first data from our ble devices. After taking a deeper look into your source code, two approaches seem to be promising to me:

      • In QLowEnergyService: Allow calling readCharacteristic() and writeCharacteristic() while the object is not in the ServiceDiscovered state. Discover needed details (i.e. handles of the characteristic?) "on-the-fly" and cache them afterwards.
      • Implement (additional) more low-level methods readCharacteristic() and writeCharacteristic() which can be called with the handle instead of the uuid of the characteristic.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ablasche Alex Blasche
            kmichel K. Michel
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes