Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Can't connect to service using specified UUID and Device address #5

Open
redtide opened this issue Dec 14, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@redtide
Copy link
Member

redtide commented Dec 14, 2018

Qt documentation at http://doc.qt.io/qt-5/qbluetoothsocket.html#connectToService say

On Android, the service connection can directly be established using the UUID of the remote service. Therefore the platforms does not require the ServiceLookupState and socketType() is always set to QBluetoothServiceInfo::RfcommProtocol.

But something like this works on Linux, not on Android:

QBluetoothAddress address("98:D3:31:F5:28:1B");
QBluetoothUuid    uuid(QString("00001101-0000-1000-8000-00805F9B34FB"));

socket->connectToService(address, uuid);

It would be nice to know if there is a way to use this code on Android as well, to unify the code used on Linux, removing the need of QBluetoothServiceDiscoveryAgent class object.

@redtide redtide added the enhancement New feature or request label Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant