Renji
Renji

Reputation: 310

QT Bluetooth Peripheral and Central role possible?

I'm running a programm on a Raspberry Pie which is based on QT and uses a bluetooth adapter to connect to some peripheral devices as a central role. I also have another device, which only can act as a Central bluetooth device and needs to be connected to my Raspberry.

Is it possible with QT to first build a connection to my second device by advertising itself and acting as a peripheral, and afterwards swaping to central mode, to connect to the other devices?

I didn't find any evidence for or against this. So i hope you guys can help me out.

Upvotes: 0

Views: 510

Answers (1)

Youssif Saeed
Youssif Saeed

Reputation: 13345

What you want to do is not related to Qt/software, but rather something that depends on the hardware, specifically the version of Bluetooth of your hardware. A device can advertise (act as a peripheral) and scan/connect (act as a central) at the same time if it supports the "LE Dual Mode Topology", which was added in Bluetooth v4.1 (please see figure below).

enter image description here

Therefore, if this is a Raspberry Pi 3 Model B or B+, then it has Bluetooth v4.1 or v4.2 (respectively) built-in and it should be capable of acting as both central and peripheral. If it is an older Raspberry Pi then this depends on the Bluetooth dongle that you attach to it.

I hope this helps.

Upvotes: 2

Related Questions