Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. BLE check if device is connectable
QtWS25 Last Chance

BLE check if device is connectable

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 872 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.
  • michaelLM Offline
    michaelLM Offline
    michaelL
    wrote on last edited by
    #1

    Hi,
    is there a way to check if device is connectable?
    Once the device is discovered and I get the signal deviceDiscovered(const QBluetoothDeviceInfo&)) to call my slot, I get the QBluetoothDeviceInfo&.

    On Qt5.12 I can read the manufacture data from QBluetoothDeviceInfo&, but how do I know if the peripheral was advertising as connectable or non-connectable?

    sierdzioS 1 Reply Last reply
    0
    • michaelLM michaelL

      Hi,
      is there a way to check if device is connectable?
      Once the device is discovered and I get the signal deviceDiscovered(const QBluetoothDeviceInfo&)) to call my slot, I get the QBluetoothDeviceInfo&.

      On Qt5.12 I can read the manufacture data from QBluetoothDeviceInfo&, but how do I know if the peripheral was advertising as connectable or non-connectable?

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @michaelL said in BLE check if device is connectable:

      how do I know if the peripheral was advertising as connectable or non-connectable?

      Actually you don't even know if it was advertising at all. Some operating systems (Windows, ChromeOS, possibly also macOS I'm not sure) report Bluetooth devices that are paired in the system. Even if the device is not in range, offline - the operating system will happily report it is available, and Qt will happily send you deviceDiscovered().

      (Z(:^

      1 Reply Last reply
      0
      • michaelLM Offline
        michaelLM Offline
        michaelL
        wrote on last edited by
        #3

        @sierdzio said in BLE check if device is connectable:

        you don't even know if it was advertising at all. Some operating systems (Windows, ChromeOS, possibly also macOS I'm not sure) report Bluetooth devices that are paired in the system. Even if the device is not in range, offline

        @sierdzio
        On IOS swift BLECore and Android BLE Library you can check if device is connectable or non connectable (Beacons) and read manufacure data. I have it in my Apps and on my peripheral device i can swap as connectable or non connectable.
        So on Qt before i connect i musst check if it is connectable. The work around would be to connect and on the callback get the error and re-discover.

        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