Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Bluetooth Low Energy check if device is connectable
Qt 6.12 LTS is out! See what's new in the release blog

Bluetooth Low Energy check if device is connectable

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 918 Views 2 Watching
  • 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?
    Is there a way to know this using QBluetoothDeviceInfo?

    1 Reply Last reply
    0
    • Pham HoangP Offline
      Pham HoangP Offline
      Pham Hoang
      wrote on last edited by
      #2

      @michaelL said in Bluetooth Low Energy check if device is connectable:

      a way to know this using QBluetoothDevi

      @michaelL you can check serviceUuids to see have enough service as your device provide or not. if service list is enough. then it is connectable.

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

        @Pham-Hoang said in Bluetooth Low Energy check if device is connectable:

        serviceUuids

        @Pham-Hoang it advertise always the same services. But only the type flag is different. I have checked now and the application output gave me this hint:

        D BluetoothDevice: mAddress: 77:A5:12:38:FA:6F
        D BluetoothDevice: getBluetoothClass: classInt = 7936
        D BluetoothDevice: getType: type = 2 
        D BluetoothDevice: getName: name = myPeripheralName
        

        So type = 2 it means connectable and type = 3 is non connectable. But how can I read this function "getType"? I don't see it on QBluetoothDeviceInfo class.

        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