Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2
-
None
-
-
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
For Gerrit Dashboard: QTBUG-99673 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
389227,1 | Work around the macOS 12 Monterey Bluetooth SDP problems | dev | qt/qtconnectivity | Status: ABANDONED | 0 | 0 |
391165,7 | IOBluetooth: fix SDP inquiry broken by Monterey | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |
392406,2 | IOBluetooth: fix SDP inquiry broken by Monterey | 6.2 | qt/qtconnectivity | Status: MERGED | +2 | 0 |
392407,2 | IOBluetooth: fix SDP inquiry broken by Monterey | 6.3 | qt/qtconnectivity | Status: MERGED | +2 | 0 |
392509,4 | IOBluetooth: fix SDP inquiry broken by Monterey | tqtc/lts-5.15 | qt/tqtc-qtconnectivity | Status: MERGED | +2 | 0 |