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. QT iOS BLE Issue
Forum Updated to NodeBB v4.3 + New Features

QT iOS BLE Issue

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 3 Posters 651 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.
  • B Offline
    B Offline
    BTSTOnline
    wrote on last edited by
    #1

    Anyone have any thoughts on why I would be getting this when using BLE on iOS?

    [qt.bluetooth.ios] can not discover service details in the current state, QLowEnergyController::DiscoveredState is expected
    [CoreBluetooth] XPC connection invalid
    

    Latest iOS, latest XCode, latest Qt/QtCreator...

    Source code in Creator, opening project in XCode and running on device. This used to work a couple months ago on 5.12... but not working on 5.14.

    Ideas?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VladoV
      wrote on last edited by
      #2

      Hi,

      I noticed similar behaviour on both ios and osx, I also upgraded to qt5.14.
      It seems the QLowEnergyController::DiscoveredState comes when QLowEnergyController::discoveryFinished is emitted. My code discovered service details already in serviceDiscovered's handler, which seems caused the described scenario.

      In the slot attached to QLowEnergyController::serviceDiscovered I remember the discovered service uuids in vector of uuis like this
      mServiceUUids.push_back(serviceUUid); // std::vector<QBluetoothUuid> mServiceUUids declared in header file

      then in the slot attached to QLowEnergyController::discoveryFinished loop through the mServiceUUids and do service details discovery.

      Seems to work for me even though it is more a workaround. I need to study what is the proper way to do it.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BTSTOnline
        wrote on last edited by
        #3

        Yeah, this seems to be a workaround, but it works for me well enough to utilize in my project!

        Thanks @VladoV , much appreciated!

        AlexBlascheA 1 Reply Last reply
        0
        • B BTSTOnline

          Yeah, this seems to be a workaround, but it works for me well enough to utilize in my project!

          Thanks @VladoV , much appreciated!

          AlexBlascheA Offline
          AlexBlascheA Offline
          AlexBlasche
          wrote on last edited by
          #4

          The issue was resolved by https://codereview.qt-project.org/c/qt/qtconnectivity/+/313077. Thank you for pointing it out. In particular the workaround highlighted the problem.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved