Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Slow bluetooth low energy device discovery and other BLE issues
QtWS25 Last Chance

Slow bluetooth low energy device discovery and other BLE issues

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 2.7k 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.
  • operamintO Offline
    operamintO Offline
    operamint
    wrote on last edited by
    #1

    I'm creating a Qt Quick BLE mobile app for a customer, and I fear that I may need to abandon Qt/QML because of the seemingly poor and shallow implementation of Bluetooth LE functionality.

    1. The QBluetoothDeviceDiscoveryAgent seems to only be using the heavyweight 12-second android api startDiscovery() scan, as it may find both BT classic and LE devices, although that call is only meant for BT classic devices. The only option LimitedInquiry does not set BLE mode. For BLE, android api startLeScan() (api level 18) or startScan() (api level 21) should have been used. These calls are much faster and scanning time can be set.

    2. Compare the speed of the Qt bluetooth LE sample apps with nRF Master Control Panel found in the Google Play store to see the striking difference in discovery speed.

    3. Finally, when I subscribe for notifications (by writing 0x0100 to the characteristics descriptor - only documented through example code), the device was sending 10 data packages (20 bytes) every 100ms. More or less consistently, I only got the 3 first. After reducing the speed to 1 package per second, I reliably received all data. This is way too slow, and packages shouldn't just disappear without any error response?

    I may have missed something important here, so if anyone could help me I would be very thankful.

    PS: I have mainly been testing on an old Samsung Note 2 (android 4.3.2), but it seems to be the same problems on newer devices.

    B 1 Reply Last reply
    1
    • operamintO operamint

      I'm creating a Qt Quick BLE mobile app for a customer, and I fear that I may need to abandon Qt/QML because of the seemingly poor and shallow implementation of Bluetooth LE functionality.

      1. The QBluetoothDeviceDiscoveryAgent seems to only be using the heavyweight 12-second android api startDiscovery() scan, as it may find both BT classic and LE devices, although that call is only meant for BT classic devices. The only option LimitedInquiry does not set BLE mode. For BLE, android api startLeScan() (api level 18) or startScan() (api level 21) should have been used. These calls are much faster and scanning time can be set.

      2. Compare the speed of the Qt bluetooth LE sample apps with nRF Master Control Panel found in the Google Play store to see the striking difference in discovery speed.

      3. Finally, when I subscribe for notifications (by writing 0x0100 to the characteristics descriptor - only documented through example code), the device was sending 10 data packages (20 bytes) every 100ms. More or less consistently, I only got the 3 first. After reducing the speed to 1 package per second, I reliably received all data. This is way too slow, and packages shouldn't just disappear without any error response?

      I may have missed something important here, so if anyone could help me I would be very thankful.

      PS: I have mainly been testing on an old Samsung Note 2 (android 4.3.2), but it seems to be the same problems on newer devices.

      B Offline
      B Offline
      bearsh
      wrote on last edited by
      #2

      @operamint did you open a bug/feature request for it? I can second this, the discovery process (I'm only interested in LE devices) takes way too long...

      B 1 Reply Last reply
      0
      • B bearsh

        @operamint did you open a bug/feature request for it? I can second this, the discovery process (I'm only interested in LE devices) takes way too long...

        B Offline
        B Offline
        bearsh
        wrote on last edited by
        #3

        @bearsh I checked Jira but didn't find anything, so I created https://bugreports.qt.io/browse/QTBUG-55970

        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 Extensions
        • Unsolved