O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Providing information about the transport protocol

The next thing that is required is to provide information about the transport protocol, which is stored in the ProtocolDescriptorList attribute. The protocol is based on RFCOMM, which in turn is based on L2CAP. Thus, we just create a new QBluetoothServiceInfo::Sequence and append the required attributes:

bool channels::BroadcasterBt::_provideProtocolDescriptorList(){    qDebug() << Q_FUNC_INFO;    QBluetoothServiceInfo::Sequence protocolDescriptorList;    QBluetoothServiceInfo::Sequence protocol;    protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::L2cap));    protocolDescriptorList.append(QVariant::fromValue(protocol));    protocol.clear(); protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::Rfcomm)) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required