Avatar for Gelo


Member since Sep 2018 • Last active Sep 2018
  • 0 conversations

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Gelo

    Hi Gordon,
    Thanks for your reply.
    Yes, I'm on the latest firmware 1.99. I also tried re-flashing which didn't help.
    I'm aware of HID not being available immediately after I run the code. I am already re-paired and the Puck is definitely seen as HID keyboard, because it types and windows shows it as Bluetooth keyboard in the list of devices.
    I also thought that Windows should reconnect it, but it doesn't. Very weird.
    In case you want to know, the laptop is MS Surface Laptop with latest Win 10.

    I am thinking I could try re- flashing with cutting edge version?..
    Will let you know if it makes a difference.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Gelo

    Hello community!

    I actually have a very similar problem, but I'm not doing anything with BLE at all (i.e. not trying to save power or anything).
    I just pair/connect my Puck to my Win 10 laptop as HID-keyboard and use it to automate a couple of things by pressing the button (just emit key presses).

    Here's how I initialize the Puck (the code pretty much straight out of HID tutorial):

    var kb = require("ble_hid_keyboard");
    NRF.setServices(undefined, { hid : kb.report });
    // Define button press handler
    function btnPressed(e) {
          // Send some key(s) here...
          kb.tap(kb.KEY.ENTER, 0, function() {});
    function onInit() {
      // trigger btnPressed whenever the button is pressed
      setWatch(btnPressed, BTN, {edge:"rising",repeat:true,debounce:50})­;

    The problem:
    Because I often take my laptop and walk away from my desk where the Puck is, BLE connection breaks - this is expected. But when I come back to my desk, the connection never restores by itself. It shows as "paired" but not connected.
    I have to open IDE and initiate a connection to the Puck, which works fine, but is a real pain in the bum because this happens a LOT.

    Is this normal? My Bluetooth keyboard and headphones reconnect fine, and I would expect the Puck to do the same...

    Is there anything I can do to fix this?