[Interest] Bluetooth for Linux

Shahzad Khan shahzad at gmail.com
Tue Oct 27 16:19:01 CET 2015


Thanks Alex. Yes the version you mention are the right ones.I am really
glad you have it working with same version so I know it works.

I do give it sufficient time and I am sure the the discovery is never
initiated. I never press the 'Scan' button but still it is disabled. I can
tell you the  discovery function below never gets run.

void DeviceDiscoveryDialog::startScan()
{
    discoveryAgent->start();
    ui->scan->setEnabled(false);
    ui->inquiryType->setEnabled(false);
}

Below is a screen of the scanner demo that comes it and it appears it is
not able to turn on bluetooth because bluetooth power is unchecked. Even
when I check it the 'Scan' button is still disabled which seems to indicate
is not really powering on (= in other words not able to connect to bluez?).

[image: Inline image 1]


Thanks

Shahzad

On Tue, Oct 27, 2015 at 10:59 AM, Blasche Alexander <
alexander.blasche at theqtcompany.com> wrote:

> Hi,
>
> > -----Original Message-----
> > From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of
> Shahzad
> > Khan via Interest
> > Sent: Tuesday, 27 October 2015 15:38
>
> > But when I run the btscanner demo, the 'scan' button comes out disabled.
> I don't
> > get any warnings or errors but I can never scan.
>
> The scan button is disabled while a scan is in progress.
>
>
> > My question is how can I make bluetooth work for linux? How do I wire up
> Qt to
> > use BlueZ? I hear about Qdbus as well but I don't know exactly how does
> that fit
> > in the picture since the demos don't seem to use it.
>
> QtDBus is internally used by QtBluetooth. There is no public reference to
> it in the QtBluetooth context. Please enable logging for the example by
> uncommenting
>
> //QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
>
> in main(). It should provide you with more relevant output. Also, ensure
> that Bluez has enabled the local Bluetooth device using hciconfig.
>
>
> > I am using Ubuntu 4.04 and BlueZ version 4.11 which I believe is
> supported by Qt.
> > I am new to linux world though.
>
> I am going to assume you meant Ubuntu 14.04 and Bluez 4.101. The other
> version combo doesn't make sense to me.  Otherwise please advise. Yes, this
> version combo does work. Indeed I am using it myself.
>
> --
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151027/a0f423e5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 26586 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151027/a0f423e5/attachment.png>


More information about the Interest mailing list