Uncaught Error: BLE HID not enabled #4282
Replies: 1 comment
-
Posted at 2017-03-01 by @gfwilliams Hi, I'd have to see your code to be sure, but are you calling Basically, when you call It works the other way too. If you were connected with HID enabled, then you uploaded code that didn't enable it, or that actually disabled it, the changes wouldn't take effect until you disconnected and reconnected - which might explain the problems you're having? Posted at 2017-03-01 by BrianB Here's the code:
After looking at lots of examples, I thought it should be put at the top. But perhaps that's the wrong place. Here's the full error I'm getting now:
Posted at 2017-03-02 by @gfwilliams It's this: As I said above, BLE HID support can't just be added on the fly. You need to disconnect and reconnect first before it will take effect. Posted at 2018-02-09 by user86065 I have the same problem (Uncaught Error: BLE HID not enabled) happening with both the keyboard and media key examples... could perhaps be some regression in recent firmware releases? I'll try now to give informations as detailed as i can. I tried to disconnect and reconnect as you suggest, but the error is still the same. Posted at 2018-02-09 by @gfwilliams I just tried this again on one of the latest builds and it works fine with this code here: http://www.espruino.com/Puck.js+Music+Control I just uploaded that code exactly as it was (no save or anything), disconnected, then reconnected with an Android phone's Bluetooth menu (which showed it as a keyboard device). Maybe you could try one of the latest builds here and see if it's any better? http://www.espruino.com/binaries/travis/master/ Posted at 2018-02-09 by user86065 I tried the latest build, but seems the keyboard module isn't present anymore: 1v95.188 (c) 2017 G.Williams
Posted at 2018-02-09 by @gfwilliams It's probably because you just pasted the code into the left-hand side of the IDE? Posted at 2018-02-09 by user86065 Nope, right hand and then clicked upload Posted at 2018-02-10 by user86065 not sure what the issue was yesterday night, but now with firmware 1v95.188 all works like a charm, thanks :) Posted at 2018-02-12 by @gfwilliams Odd... could have been a bad network connection I guess? Posted at 2018-02-12 by user86065 yeah, the last problem was likely to be that Posted at 2024-03-01 by beebowman I thought that "disconnect and reconnect" meant to disconnect the Espruino puck.js from its battery and then put the battery back in again, and/or to disconnect and reconnect it from the Espruino Web IDE. For anyone out there with the same issue as me, where I just kept seeing that error, just wanted to clarify that the replies above mean to turn on/off the bluetooth on your laptop/computer itself, not the Espruino Web IDE. On a Mac, this means toggling the bluetooth button on/off in the top right menu bar of the Mac, as you would if you were disconnecting and reconnecting your AirPods, for example. This resolved the issue for me! Attachments: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-02-28 by BrianB
I've been playing around with this for several weeks now, and I'm loving it!
I'm just having one main problem: when I take the puck and walk out of range of the central device (my laptop), it auto-reconnects to the laptop's bluetooth when I get back into range but doesn't execute any of the commands I have written on button press. When I look at the console, it says
It's registering that it's connected, but doesn't allow me to do anything. I have to click "remove" on my computer's bluetooth menu, turn bluetooth off, then back on, then pair again through the Web IDE to get it to not get caught in the error.
Any help understanding the error or fixing it would be great. (I've done extensive Googling to no avail.)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions