Hi Philippe,

are the two machines paired? Windows API does not allow pairing them, so the initial pairing has to be using the system UI.

Olli


On 24/07/2018 10:32, maitai wrote:
Thanks Alex,

I have done that, but although it seems to do things, I cannot make it work on Windows (server or client). It works finally between a Mac and an Android device.

For instance if I run the BT discovery example I get:

qt.bluetooth.winrt: Worker started
qt.bluetooth.winrt: BT  scan completed
qt.bluetooth.winrt: BTLE  scan completed
qt.bluetooth.winrt: onBluetoothLEDeviceFound: No device given

And nothing is found (it actually finishes the scan almost immediately, which I believe is not a good sign).

For the pingpong example as a server it gives:

qt.bluetooth.winrt: Port 1 registered
qt.bluetooth.winrt: class Microsoft::WRL::ComPtr<struct ABI::Windows::Storage::Streams::IBuffer> __cdecl bufferFromAttribute(const class QVariant &) Registering Uuid attribute with length 16
qt.bluetooth.winrt: Registering sequence attribute
qt.bluetooth.winrt: class Microsoft::WRL::ComPtr<struct ABI::Windows::Storage::Streams::IBuffer> __cdecl bufferFromAttribute(const class QVariant &) Registering Uuid attribute with length 2 "{00001002-0000-1000-8000-00805f9b34fb}" qt.bluetooth.winrt: class Microsoft::WRL::ComPtr<struct ABI::Windows::Storage::Streams::IBuffer> __cdecl bufferFromAttribute(const class QVariant &) Registered sequence attribute with length 3
qt.bluetooth.winrt: Registering sequence attribute
qt.bluetooth.winrt: class Microsoft::WRL::ComPtr<struct ABI::Windows::Storage::Streams::IBuffer> __cdecl bufferFromAttribute(const class QVariant &) Registering Uuid attribute with length 2 "{00001101-0000-1000-8000-00805f9b34fb}" qt.bluetooth.winrt: class Microsoft::WRL::ComPtr<struct ABI::Windows::Storage::Streams::IBuffer> __cdecl bufferFromAttribute(const class QVariant &) Registered sequence attribute with length 3 qt.bluetooth.winrt: bool __cdecl repairProfileDescriptorListIfNeeded(class Microsoft::WRL::ComPtr<struct ABI::Windows::Storage::Streams::IBuffer> &) Repairing profile descriptor list qt.bluetooth.winrt: class Microsoft::WRL::ComPtr<struct ABI::Windows::Storage::Streams::IBuffer> __cdecl bufferFromAttribute(const class QVariant &) Registering attribute of type QMetaType::QString

I tried with 2 windows machines, making sure they are discoverable, etc. The mac machine detects the Windows machine, but not the opposite.

Probably I am doing something wrong, still investigating.
Philippe

Le 24-07-2018 10:13, Alex Blasche a écrit :
Adding

QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));

to your main() might help.

--
Alex

________________________________________
From: Interest
<interest-bounces+alexander.blasche=qt...@qt-project.org> on behalf of
maitai <mai...@virtual-winds.org>
Sent: Monday, 23 July 2018 6:34:15 PM
To: Interest@qt-project.org
Subject: Re: [Interest] Bluetooth on Windows 10

Ok, thanks Alex for the clear answer, that is a great news.

I have tried the pingpong-bluetooth example and couldn't make it work. I
tried various machines (2 Windows 10/1803, 1 Windows/1 Android, 1 Mac/1
Android, etc), I do not see any debug or strange messages but the client
never finds the server (Qt 5.11.1).

Now that I know that it should work I will dig deeper

Thanks again
Philippe.

Le 23-07-2018 17:17, Alex Blasche a écrit :
-----Original Message-----
From: Interest
<interest-bounces+alexander.blasche=qt...@qt-project.org> On
Behalf Of maitai

I have already read many posts on this topic, but I cannot understand
the
following statement in the documentation:

"Despite there not being a Win32 port yet, the WinRT backend is
automatically
used if the win32 target platform supports the required WinRT APIs.
Minimal
requirement is Windows 10 version 1507 with slightly improved service
discovery
since Windows 10 version 1607. Therefore Windows 7 and 8.x targets are
excluded."

The Win32 build will silently use WinRT-only API to enable this
feature. This works because we can assume that the relevant windows
builds have the required API. There is a runtime check that guards the
implementation.

Does it mean QBluetooth (regular) will work on Windows 10 version 1803
out of
the box?

Yes, it should.

--
Alex

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to