You are reading a single comment by @ChristianW and its replies. Click here to read the full conversation.
  • For investigating in the other HID project I tried to get a MDBT42Q set up as a BLE keyboard or volume control using this example from here

    Strangely, it didn't work.

    Here is my final code (mostly copied, but wrapped in an onInit() so it gets called after PowerUp):

    function onInit() {
    var kb = require("ble_hid_keyboard");
    NRF.setServices(undefined, { hid : kb.report });
    
    function btnPressed() {
      // Send 'a'
      kb.tap(kb.KEY.A, 0, function() {
        // Followed by capital 'A'
        kb.tap(kb.KEY.A, kb.MODIFY.SHIFT);
      });
    }
    
    // trigger btnPressed whenever the button is pressed
    setWatch(btnPressed, BTN, {edge:"rising",repeat:true,debounce:50})­;
    }
    

    Could someone try and confirm my results please?
    I tried both examples: The one with the keyboard and the one with the volumeUp control.
    None worked.

    Some more findings:

    • when I connect a commercial HID remote (remote selfie camera button which sends a volumeUp()) my phone (iOS) shows a confirmation dialog.
    • with Espruino this dialog is missing.
    • also the commercial remote shows up in iOS settings an (i) where I can select to "forget" (disconnect) this device
    • the Espruino does not show up with this option. The only way to disconnect is to pull off the battery.
    • when I pull the battery Espruino is gone from the list and I have to pair it again afterwards
    • the commercial remote stays in the list when switched off and is coming online again right after switching it on again.

    Is this expected behaviour or a bug?

    Thanks in advance.

About

Avatar for ChristianW @ChristianW started