• Please could someone help: I am tearing my hair out!

    I'm a newbie working with puck.js 1.0 and 2.0. I had been able to use this tutorial


    and the Web ide.

    Press the little coffee-cup, Web IDE opens in Chrome, connect, flash the code in and hurrah, yes, it worked :)

    But I've spent two days trying to get it to work again, with no joy.

    The error code that comes up is

    'BLE Connected, queueing BLE restart for later'

    One of the variables is that Amazon sent me some DL2032 batteries when I searched for CR2032 batteries. The former are a lot fatter - 3.2mm instead of 2.0mm

    Have I busted up my pucks? :'(

    I am also finding it a lot harder to connect via bluetooth.
    Does it matter if there are too many other bluetooth devices in the house? But it worked before.

    Any ideas? Please???

    I am a big fan of Espruino.

  • Hi! I'm pretty sure there's nothing to worry about, and it won't be battery related.

    I'm pretty sure DL2032 is fine - the only ones you have to watch out for are LR2032/LIR2032 as those actually have a higher voltage!

    BLE Connected, queueing BLE restart for later

    This would have happened every time - what it means is it's got to restart Bluetooth on the chip in order to add the HID support, but to do that it'd break the current connection so it waits until you're disconnected.

    So I think there are a few possibilities:

    • You need to upload to Flash, not RAM - because if you uploaded to RAM then when you disconnect power and reconnect everything will be lost and it'll go back to standard
    • It's already paired with your computer, so when you disconnect from the IDE the computer doesn't actually disconnect, which means the Puck doesn't get to restart and add the bluetooth keyboard functionality - all you need to do there is just go into your OS's bluetooth settings and unpair it, then wait a bit and repair and it'll be fine
  • Gordon, thanks so much for your reply; although I am still tearing my hair out, you're helping me get closer to the root of my problem.

    There were some connection issues; I may have addressed those by gathering up the zillions of other bluetooth devices and hiding them away (I am not sure). The issue of the device not really letting go of the bluetooth connection was certainly causing the problem, so I disconnected (OS) and reconnected (WebIDE) and disconnected again after flashing the code. All good so far.

    The only problem I have remaining (apart from my apple laptop constantly trying to reconnect to my pucks when I don't want them to) is that when I connect my code-containing puck.js, it will put the letter A in, but it doesn't turn the page in Kindle/iBooks, etc.

    So my puck is definitely connected as a keyboard - if I have Mail open it will put aAaAaAaaAAA in a blank message, but if I open Kindle or iBooks, it just won't turn the page.

    What have I forgotten? Arghhhh hellppp


  • PS I did upload the code to flash as you said...

  • I get the feeling that there is a facepalm somewhere in my near future....

  • apart from my apple laptop constantly trying to reconnect to my pucks when I don't want them to

    I don't have a Mac handy but I seem to remember that if you 'forget' the device from the OS menu it won't reconnect all the time.

    it will put aAaAaAaaAAA in a blank message, but if I open Kindle or iBooks, it just won't turn the page.

    I think that's expected, because you probably uploaded:

    function btnPressed() {
      // Send 'a'
      kb.tap(kb.KEY.A, 0, function() {
        // Followed by capital 'A'
        kb.tap(kb.KEY.A, kb.MODIFY.SHIFT);

    It depends on what key you need to press to change pages, but assuming right-arrow is what you want to send, just use code that does that instead:

    function btnPressed() {
      // Send right arrow
      kb.tap(kb.KEY.RIGHT, 0, function() {
  • ... aaaaand there's the facepalm!!! 🤦🏻

    Thanks Gordon, you're a star

  • I must have forgotten that step; cos I had it working before. 🐠🧠🤦🏻

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Puck.js bluetooth keyboard / batteries or something else?

Posted by Avatar for Gene @Gene