Cant connect to Puck after some time (cant find it via scan) #1791
Replies: 10 comments
-
Posted at 2016-12-10 by Foster Only one attachement possible? Hm. Here is the second Screenshot :)Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-10 by Ollie Once something has connected to the Puck whether the IDE or app, it stops advertising. It sounds like if you cannot see it after reset/battery out that something is automatically connecting again. Double check and disconnect and you should see it start advertising again. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-10 by @gfwilliams As @ollie says, it's almost certainly another app. The Puck can only accept one connection at a time so there's no point it advertising - arguably it might be more confusing if you could see it but couldn't connect :) I'd force-quit any apps on your phone that you'd tried to connect to the Pucks with. Some apps will auto-connect to the Puck once set up, so will cause you all kinds of problems. Also, have you tried to connect with a desktop/laptop? It could be that is auto-connecting as well - in troubleshooting there are instructions to stop it happening on Mac. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-10 by Bas Why one BLE connection at a Time? Would an autodisconnect option be useful to release "claiming" devices, or would they just reconnect after being disconnected by force? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-10 by Foster @gfwilliams and @ollie: thanks for clarification. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-12 by @gfwilliams @bas I believe it's BLE protocol - at least on the nRF51822 it's not possible, you can google it pretty easily. I'm not sure I understand how auto-disconnect supposed to work? How would it know the difference between a legitimate connection and one that it's supposed to disconnect from? Discovering what is connected is hard too - I'm not sure you can get that info from Puck.js yet - even if you could communicate with it (you could add serial wires and communicate with Puck.js that way). @foster so what exactly happens if you pull out the battery and put it back in? The Pucks advertise, stay advertising and are fine - until you connect with either phone, and then even after you disconnect they stop advertising and can never be connected to again? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-12 by Foster @gfwilliams: yes. If i pull the battery its advertising again. And i can connect via phone. When i disconnect (via nrf connect) the Puck starts advertising again. So thats fine. Best regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-12 by @gfwilliams As I understand it, Bluetooth Low Energy connections have to have packets sent from one device to the other at regular intervals. For Puck.js it's a minimum of 50 times a second. If a few of those don't get through for whatever reason, the connection is considered to have disconnected and both devices disconnect. To figure it out you can just hook onto the Once you have a connection, upload the following:
Now the red LED will light when the Puck is connected and will go out when it's disconnected. I guess the other possibility is you're managing to upload some code that completely locks the Puck up? Perhaps if you find code that always makes it disconnect then you could paste it up and I'll try and see what's wrong. Also, I'd make sure you're on the latest firmware (1v89 at the moment). I know that 1v88 that it shipped with did have an issue where if you called updateServices with the wrong arguments it's cause an assertion which would reboot the device. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-16 by Foster Thanks @gfwilliams for the explanation. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams Are you sure you didn't upload any code? What did you do with them after turning them on? If you tried examples on the http://www.espruino.com/Puck.js+Web+Bluetooth page, the last example there comes with a warning that after trying it, unless you reset your Puck it'll run the battery down pretty fast. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-10 by Foster
Hi,
i received my pucks yesterday. First inpressions: woooho :)
So i decided to do some coding. I'm familiar with Java and coding in abap at work.
First: i tried the web IDE from my Android phone (hoooray its a red blinking dot!!! :)). I also connected via "nrf connect".
And thats the point where i got stuck: my Puck disappeared from BT le scan. I could not find it via web IDE and nrf connect. So i pulled out the battery and i could reconnect.
Today its the same: i have now two pucks powered on, but i can only find one via scan. There is one thing i noticed: if i connect to a Puck via nrf connect or web IDE, it nots scannable anymore. I have to disconnect (web IDE or nrf APP) and the my Puck reappears.
Is that a "security feature"? For me it seems like i have to pull out the battery if i disconnect without "real" disconnect (for example: reboot my phone during established connection. Then i cant reconnect, because Puck is not visible).
Best regards,
Foster
//edit:
Now my second Puck disappeared :(
What i have to done: i tried to connect via nrf UART 2.0 Android APP. I needed 3 tries to connect. Then my connection got lost and now i cant find it via scan anymore... :(
I attached some Screenshots.
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions