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

shouldPairDevice always returns true? #10

Open
mchlnix opened this issue Jan 10, 2017 · 5 comments
Open

shouldPairDevice always returns true? #10

mchlnix opened this issue Jan 10, 2017 · 5 comments

Comments

@mchlnix
Copy link

mchlnix commented Jan 10, 2017

public boolean shouldPairDevice(BluetoothDevice device)

Just saw that in the code. There seems to be something wrong here, doesn't it?

@virl
Copy link
Contributor

virl commented Jan 10, 2017

@mchlnix Thanks for the bug report. Pairing currently is not used, so this code doesn't matter currently.

@mchlnix
Copy link
Author

mchlnix commented Jan 10, 2017

I'm browsing your code in the hopes of figuring out how you handle the multiple UUIDs on multiple phones.

If you have the time, could you answer me the following question?

As far as I know to establish a connection between to phones both need to use the same UUID when connecting/accepting a socket. So these must be known/constant on both phones.
The problem that seems to arise is, that one phone might have used the first 6 of 7 UUIDs to connect to phones and another used the last 6 of 7. Meaning, that, while they have a UUID free to connect, they can't because it is not the same.

What is your solution for this problem?

@virl
Copy link
Contributor

virl commented Jan 10, 2017

@mchlnix My solution to the problem is to try to connect by all of the UUIDs in random order until free one is found.

@mchlnix
Copy link
Author

mchlnix commented Jan 10, 2017

Sounds like having all 7 uuids connected is very unlikely, then, or am I missing something?

@virl
Copy link
Contributor

virl commented Jan 10, 2017

@mchlnix No, I just described currently implemented solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants