-
• #27
Home now. Removed the device on the MacOs menu and pairs perfectly. Also updated device firmware via the nRF Connect android app. Both Pucks running perfectly now.
Cheers
-
• #28
Great - thanks for the update!
-
• #29
@gomako @skinofstars I'd love to get more information on this issue as it could be helpful to make the Web Bluetooth API more reliable.
- Is puck.js still connected in macOS Bluetooth Menu when Chrome is killed?
- What do you mean by auto-connect?
- It could be possible that puck.js doesn't show up in Web Bluetooth chooser within 10s. Did you try click "re-scan" link?
- Can you reproduce this issue with Chrome Canary?
For info, I've been trying to reproduce this issue on macOS and the only way I've found was to connect puck.js with another native macOS application. In that case, Web Bluetooth chooser doesn't show yet the connected device. Patch is in process to solve this issue but I'm not sure that's the issue you're both had.
- Is puck.js still connected in macOS Bluetooth Menu when Chrome is killed?
-
• #30
@François Will try and help.
- Yes, Puck is still in the os x bluetooth menu when Chrome is closed.
- I mean that I disconnect (not remove) the Puck from the os x bluetooth menu, then
a couple of seconds later it is back on the menu in bold (meaning
that the Puck has connected again) this is whether chrome is open or
closed. - Yep, I tried the re-scan link and it didn't show up.
- I am at work and can't test on Canary, but will update this post when I am home.
From what I understand. If the Puck is connected to something, it stops advertising, and so doesn't show up to anything else that you scan with, whether it's a phone, different computer etc. I may well be wrong, but that's how it looks.
I think that the issue may have arisen when I tried to make my Puck into a Play/Pause button (HID). I uploaded the code, then disconnected from the Web IDE, then connected via the os x bluetooth menu, as I reasoned that the os would need to connect for it to be able to control the media player. After that point, even if I reset the code to default (battery out, hold button down etc.) then os x saw that it had connected to the device before and just grabbed it when it was being advertised, which is why I needed to make os x forget the device completely so I could pair again in Chrome. I think that if I was quick enough, I probably could have connected via Web Bluetooth before os x did, (after disconnecting the device).
So yes, I think the way that you reproduced it was the same reason my Puck wasn't showing up.
- Yes, Puck is still in the os x bluetooth menu when Chrome is closed.
-
• #31
From what I understand. If the Puck is connected to something, it stops advertising, and so doesn't show up to anything else that you scan with, whether it's a phone, different computer etc. I may well be wrong, but that's how it looks.
Yup!
I think that the issue may have arisen when I tried to make my Puck into a Play/Pause button (HID).
You're right. I was able to reproduce this issue when changing my Puck.js device to a HID button. This means that when https://codereview.chromium.org/2513323002/ is applied to Chrome, you won't have to
remove
Puck.js device anymore.I'm glad we got this sorted eventually. I'll update this thread when it happens.
-
• #32
I think that the issue may have arisen when I tried to make my Puck into a Play/Pause button (HID)
Ahh - I don't think you told me that initially! Yes, that would have done it! :)
Did it work as a HID button after all that? :)
-
• #33
@Gordon I had forgotten that I did it. Oops! It was working on my laptop messing about with lots of different stuff and working fine, the problem arose when I was using it on my iMac (which I had set up with the HID code and paired with). I haven't tried it as a HID button again yet.
I will try it again and let you know. Am I right in thinking I have to disconnect from Web Bluetooth and pair with the system OS to get HID to work as expected?
-
• #34
Am I right in thinking I have to disconnect from Web Bluetooth and pair with the system OS to get HID to work as expected?
Yes - the OS will need to connect to the device when it's advertising that it's a HID device. Hopefully @François's Chrome changes will make sure that you can program it even when it's connected - but it'll be a while before they land.
In the mean time, if you need to do debugging you can connect via USB TTL converter and send
Serial1.setConsole(true)
to force the REPL to stay on USB even when you're connected via Bluetooth.
Great - thanks! Just added an entry on this for Mac.