From 746f45b946e15ac291e86ad3aac80a71ce03e46a Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Mon, 19 Jan 2015 12:15:18 +0100 Subject: Register PublicBrowseGroup as sequence Based on Bluetooth spec Vol3 PartB 5.1.7 the BrowseGroupList consists of a data element sequence. The current approach was not correct. This was discovered because Bluez5 doesn't add a custom service to the Extended Inquiry Response (EIR) unless it is in a sequence. If the service is not part of the EIR other platforms such as Windows report an error or won't simply see the service. This was not a problem when using Bluez4 because it was more tolerant towards such mistakes and added the custom service to the EIR anyway. Task-number: QTBUG-43806 Change-Id: Ib0ca59005c940249fb6aefd8ecafe5b2ceff3878 Reviewed-by: Aaron McCarthy --- examples/bluetooth/btchat/chatserver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/bluetooth/btchat/chatserver.cpp b/examples/bluetooth/btchat/chatserver.cpp index 6da4b471..6848e2d7 100644 --- a/examples/bluetooth/btchat/chatserver.cpp +++ b/examples/bluetooth/btchat/chatserver.cpp @@ -101,8 +101,10 @@ void ChatServer::startServer(const QBluetoothAddress& localAdapter) //! [Service UUID set] //! [Service Discoverability] + QBluetoothServiceInfo::Sequence publicBrowse; + publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, - QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); + publicBrowse); //! [Service Discoverability] //! [Protocol descriptor list] -- cgit v1.2.3