Is it a way to make bluetooth pairing much faster

458 views Asked by At

Goal: trying to achieve fast Bluetooth pairing.

Storyline: I tried Bluecove library in Java, and if you know already the device address, pairing process on windows is blindly fast. On Linux it is lacking 15 seconds or so and is pretty annoying. Therefore I tried to use BlueZ library in order to create my own driver in C. Let's consider that the destination address is already known (so the problem is not the discovering of the device itself).

I am opening a socket

scoket s = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);

Setting everything into a sockaddr_rc object, then try to connect to the device.

int status = connect(s, (struct sockaddr *) &addr, sizeof(addr));

Even if status is zero (which is fine, it means connection is done) the connect call itself take between 6 and 10 seconds.

Is it a way to lower this connection time?

Thank you!

0

There are 0 answers