NRF multiple connections? #1777
Replies: 2 comments
-
Posted at 2016-12-16 by @gfwilliams Try adding a delay between disconnecting from one puck and connecting to the other. Disconnect starts a disconnect but it takes some time to complete, and the web Bluetooth spec doesn't seem to remove a return a promise. Unfortunately notifications aren't implemented yet, so you can't get the result. It'll be in a firmware update in the new year though |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by ChristianW Thanks again, Gordon. Adding the timeout solved it:
150 ms seems sufficient. I'm very thrilled to get the notifications. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-12-16 by ChristianW
Having 5 pucks at hand I'd like to do some round-robin communication:
I am aware, that connection multiple peripherals at the same time is not possible atm, so I do it sequentially (with recursive callbacks).
This is my connection code:
Issue A:
As long as I disable (/**/) the receiving part I can pass commands to the first puck successfully.
But when I try to connect the second one I get BLE error 18 - why?
Question: What does that mean and what can I do about it?
Issue B:
I also like to get the feedback of the command sent to the pucks.
So I tried to add the receiver part (in comments) but it always receives the echo of the data I just sent.
Question: How can I get the full response and how do I detect the end of a transmission?
I'll upload the full sourcecode as attachment so you have the complete picture.
Thanks in advance,
Christian
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions