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

Service discovery with UUID filter doesn't work on macOS Monterey

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      f00ea686c8 (qt/qtconnectivity/dev) 9108693b8c (qt/qtconnectivity/6.2) fe3bb3460c (qt/qtconnectivity/6.3) 9108693b8c (qt/tqtc-qtconnectivity/6.2) fe3bb3460c (qt/tqtc-qtconnectivity/6.3) f00ea686c8 (qt/tqtc-qtconnectivity/dev)

      Description

      The QBluetoothServiceDiscoveryAgent::setUuidFilter() is a function that can be used to indicate which service UUIDs are of interest when doing a service scan.

      Since macOS 12 Monterey it seems not to work anymore; it does not report any results nor indicate completion or failure. The underlying IOBluetooth library silently just keeps on scanning.

      To reproduce this one can run the "pingpong" or the "btchat" example apps from the QtConnectivity repo.

      At this point this seems a IOBluetooth bug (the library which Qt uses), the effective call in btsdpinquiry.mm is:

      [device performSDPQuery:self uuids:array];
      

      By using the non-filtering overload of the same function will find the services most of the time. This also means that as a workaround one can omit the UUID filtering and do the filtering manually at the application level.

      There are also some additional behavioural strangenesses:
      1) Sometimes the non-filtering performSDPQuery gives a "**** This currently won't trigger SDP delegate" and also then the examples won't get the results. This happens especially if the server-device and macOS are not connected beforehand.
      2) If the example is ran against/with an Android device, all the service UUIDs are 00..00, which means the service filtering needs to be done against the service name instead of UUIDs.

        Attachments

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

          Activity

            People

            Assignee:
            tpochep Timur Pocheptsov
            Reporter:
            vuokko Juha Vuolle
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes