Can't connect Espruino Web IDE to Puck using Web Bluetooth #1728
Replies: 34 comments
-
Posted at 2016-12-05 by @gfwilliams Android 5 doesn't have Web Bluetooth enabled by default because Google were worried about permissions (Android 6 lets an app ask as and when it needs access to some device, and in 5 you had to ask at install time). You can do it though, but you have to manually install Chrome - have a look at the page linked from the Getting Started guide: http://stackoverflow.com/questions/34810194/can-i-try-web-bluetooth-on-chrome-for-android-lollipop It's a bit involved, but that page is the one linked directly from The Web Bluetooth page |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-05 by @gfwilliams If you just want to see if you can communicate, there are other apps though - |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-05 by JackJamesHoward Do you know if an iOs device can connect to the Puck by default? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-05 by @gfwilliams Yes, it should be able to. Try the Nordic nRF UART app, and also the Adafruit Bluefruit app. We're actually trying to make a Web Bluetooth browser for iOS, with a certain amount of success. Hopefully there will be something to announce soon :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-05 by user70870 Hi Gordon, Manually installed Chrome and it now gets a bit further.... I now get a Pairing dialogue with a name that matches my Puck. Selecting that and clicking Pair I get another Connection Failed message with a different reason:
Any ideas what this might be? Thanks, David P.S. nRF Connect can connect to the Puck ok. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-06 by @gfwilliams That's really strange - looks like the version of Web Bluetooth you've got there is missing a field that's in all the other implementations :( Odd, as I have had it working on Android 5 (it must have been an update in Chrome) Luckily it's only for a debug message. I'll make an update in the next hour or so - it should get you past that problem at least. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-06 by @gfwilliams Ok, try now. Assuming you're running from http://espruino.com/ide you should be able to just hit refresh. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-06 by user70870 Hi Gordon, That worked after I cleared the browser caches. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-06 by @gfwilliams Great, thanks for letting me know. I'll update the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-06 by MrWheeliebin So I'm have two pucks as off lunchtime today. Both initially paired ok via Chrome on my MacBook Pro but now one will not appear. I've tried resetting it by taking out the battery and holding down the button gor3 secs till all 3 leds come on but it just will not appear on the scan. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by @gfwilliams Can you try installing the new firmware? https://www.espruino.com/Puck.js#firmware-updates The new one contains some changes that should make connection a bit more reliable - unfortunately I just found out that Seeed flashed an older firmware onto all the devices than they should have. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by Bennr Hi, I'm having a similar issue. The web ide connected ok when I first got the puck, but it won't find the device now. I have installed firmware version 1v89 and am on chrome Version 54.0.2840.98 (64-bit) My mac is telling me that I'm connected to the puck (it auto-connects) in the bluetooth menu. So I thought maybe that was blocking the connection to the web ide, but when I disconnect from the bluetooth menu it still doesn't find it. Also, the 'main' bluetooth window doesn't show the puck (see screenshot). The puck can be found in nRF Connect, and there doesn't seem to be anything of any help in the ide console.Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by MrWheeliebin Yes I see it on the Mac's bluetooth menu like you. I've not managed to upgrade my firmware as the iPhone version of the app seems to be different from the version described in the HowTo. It just lists in/out properties you can set or read, no upload option available. I think v89 is the latest so perhaps I'll hold off until this is resolved. I'm not sure what my current version is. However, I received 2 buttons together and I'd expect them to act similarly but one is just fine. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by MrWheeliebin I should add that when it DOES connect (onc ein a blue moon) it works absolutely perfectly. I wondered if it was some sort of cross talk between the two devices so I removed the other one and powered it down but no joy. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by @gfwilliams It's expected that you won't see the Puck in the system menu because it doesn't offer anything (like a keyboard/mouse) that the system is interested in. The auto-connect thing is very strange though - I can't think of any reason it would do that. Can you:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by Bennr Yep, if I click Once it's paired again in Chrome, the puck reappears in the os x bluetooth menu, but I am able to disconnect and re-connect via the web ide. Maybe when you pair it in Chrome, it also pairs it somehow in os x? Perhaps I tried to disconnect from the os x bluetooth menu and that sort of locks it out of Chrome or something? No idea what I'm talking about really! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by skinofstars This was exactly the same for me. Needed to be |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by Bennr @skinofstars Derp! That'll teach me to not read the forum properly! However, I didn't need to go through any other steps like rebooting, just |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by @gfwilliams @skinofstars sorry - I totally missed that part of the step :( Where did you guys look in the documentation for help first, so I can make sure add it in the right place. http://www.espruino.com/Puck.js#troubleshooting ? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by Bennr @gfwilliams I looked at the troubleshooting page via the Puck quick start page: https://www.espruino.com/Puck.js+Quick+Start. Then I headed to the forum after that. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by @gfwilliams Great - thanks! Just added an entry on this for Mac. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by MrWheeliebin 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 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-07 by @gfwilliams Great - thanks for the update! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by François @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.
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. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by Bennr @françois Will try and help.
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. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by François
Yup!
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 I'm glad we got this sorted eventually. I'll update this thread when it happens. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by @gfwilliams
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? :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by Bennr @gfwilliams 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? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by @gfwilliams
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 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by Bennr @gfwilliams ah ok thanks. I don't really know much about BT, but I am learning. And yes, I've just tried the HID play button and it works great. Just need to |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-05 by user70870
Running the Espruino Web IDE in chrome on an android phone.
Web bluetooth is enabled.
When selecting the Connect button I get a dialogue box saying "Select a port" with Web Bluetooth being the only option. Selecting Web Bluetooth results in a "Connection failed" message.
The Web IDE console in settings shows:
Going into Bluetooth settings and scanning shows that the Puck is visible.
Phone: Samsung Note 3
Chrome: Version 54.0.2840.85 (Web Bluetooth enabled and browser restarted)
Android: Version 5.0
Has anyone seen anything like this?
David
Beta Was this translation helpful? Give feedback.
All reactions