HID Function Puck.js

Posted on
  • Hi,

    I am using a MDBT42Q for one BLE operation and use in the same program in the Puck.js the Bluetooth LE HID Keyboard to send a ENTER command to a computer or mobile device.

    I read the note that I have to enable the HID function again and I need to do the BLE connection to the computer or the smartphone again, when Puck.js was connected before for example to a MDBT42Q.

    Is there a way that Puck.js enables the HID function automatically when he not connected to the MDBT42Q or more important if he was connected to the MDBT42Q before?

    Greetings

  • I'm not entirely sure I understand - if you save to flash (http://www.espruino.com/Saving) then every time Puck.js starts up (eg after the battery is removed) it'll come up with HID mode enabled and everything should be fine.

    While Espruino devices only support one incoming connection at a time, they can have one incoming and one outgoing connection at the same time. So if you had HID enabled on your Puck, you could use the code at http://www.espruino.com/BLE+UART to communicate with the MDBT42Q while still having the HID connection to the PC and everything would be fine

  • Ok, I what I need is when I connect to the MDBT the Puck send signals to it like digitalPulse etc.

    If I disconnect Puck from MDBT it should send the ENTER signal to the bonded device.

    For now it works just when I make a reconnection to the PC or Smartphone. It is still bonded but the HID only works when I make the reconnection.

    Puck works everytime as an output.

  • Is there a possibility to say Puck, if MDBT is not connected >>> HID is enabled without bonding or connecting again to the phone or PC?

  • HID is enabled without bonding or connecting again to the phone or PC?

    No - it's actually the phone/PC - they need to reconnect in order to read the HID info.

    The best thing would be to keep HID enabled all the time, and then only send ENTER when needed. That should work fine?

  • Hi Gordon,

    ok, so then I will work with that situation.

    I tried to made two different counter states and used long and short press to switch the counterstate and to send the signals to MDBT or the ENTER to the phone/PC.

    It worked.

    Thanks for the information Gordon!

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

HID Function Puck.js

Posted by Avatar for user110055 @user110055

Actions