diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-01-19 12:15:18 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-01-21 08:27:02 +0100 |
commit | 746f45b946e15ac291e86ad3aac80a71ce03e46a (patch) | |
tree | 171760c1ef258fc5a00565c6ca7abf9610a05348 /examples/bluetooth/btchat | |
parent | 6634ff02232e306547bcff4c2a405a2d36f2b139 (diff) |
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 <mccarthy.aaron@gmail.com>
Diffstat (limited to 'examples/bluetooth/btchat')
-rw-r--r-- | examples/bluetooth/btchat/chatserver.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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] |