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

[Idea] Add custom operation timeout for each operation rather than for the whole connection #504

Open
dglozano opened this issue Nov 21, 2018 · 2 comments

Comments

@dglozano
Copy link

dglozano commented Nov 21, 2018

Hello! First of all, thanks for the amazing library.

I am using it in one of my projects and I came across this situation I've mentioned in a Stackoverflow question. To sum up, what I want to achieve is to change the operation timeout after the connection is already established.

However, after taking a look at different commits made in the past to address the issues #118 and #321 , I've also come up with the idea that, instead of being able to change the timeout for the whole connection after being established, it would be even better to have an extra method for writing/reading characteristics that accepts a timeout parameter for that specific operation. Then, if it is not provided, will use the one that was set while establishing the connection or the default 30s.

PD: I would love to be able to help adding this functionality by myself and make a PR, but I am not confident enough with my programming skills. I feel I could do it in this version of the code #118, but I got lost after the changes made in #321 .

Just an idea, maybe it is not possible to do.
Cheers,
Diego.

@dglozano
Copy link
Author

Finally, I found a better workaround for the just works bonding and operations on encrypted characteristics problem. I posted it in this comment..

Anyway, maybe the timeout idea is still useful for something else.

Cheers.

@dariuszseweryn
Copy link
Owner

Hmmm... I am actually thinking if the operation timeout should not be longer if bonding is in progress. If the OS will not callback the BluetoothGattCallback it will not be possible to call any more actions on BluetoothGatt anyway regardless of the library timeout

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

No branches or pull requests

2 participants