Skip to content

Is it possible to connect to a device from the onResult (Scan) callback? #373

Answered by h2zero
sivar2311 asked this question in Q&A
Discussion options

You must be logged in to vote

I wanted to avoid direct calls to stack, but if it helps I will not avoid it. Can you give me some tips in the right direction here about what calls are involved?

This would be exceptionally difficult to make work with the rest of the library, you would need to write your own client code and callback handling etc.. I certainly would not suggest it, just being thorough with my answer since it is possible.

I suspect the second method is more appropriate. Do you have a little code snippet for me to point me in the right direction?

If you're familiar with FreeRTOS queues you could just have the connection handler task block on a queue receive call and push the device pointer into the queu…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@sivar2311
Comment options

Comment options

You must be logged in to vote
1 reply
@sivar2311
Comment options

Answer selected by sivar2311
Comment options

You must be logged in to vote
4 replies
@h2zero
Comment options

@h2zero
Comment options

@sivar2311
Comment options

@sivar2311
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants