• So, I am trying to adjust
    https://banglejs.com/apps/?id=hidcam
    for Bangle.js 2

    Now, I come to the error

    Error: Error: ERR 0x8 (INVALID_STATE) (:3068)

    with this piece of code:

        try {
          NRF.sendHIDReport([0,code], () => { // <---- Error comes here
            NRF.sendHIDReport([0,0], () => {
              if (cb) cb();
            });
          });
        } catch(e) {
          print(e);
        }
    

    Any idea?

    Got the same with the original https://banglejs.com/apps/?id=hidmsicswi­pe. So I think I just have a misconfigured bluetooth on my Android. The Watch is showing HID=Kbrd+Media in settings, but Android Bluetooth settings only show "Input device". Is that normal?

  • Usually INVALID_STATE when trying to send via HID just means that the Bangle.js is connected via Bluetooth and HID is enabled, but the connecting device isn't actually using HID.

    So for example you might be connected with the Web IDE, but not paired from the OS.

  • Yes, right, I assumed that. Probably there is no error when connected to Android; but it's not sending keys though.
    I got the feeling that my Android pairing is not correct because the app starts fine but no key is received. How do the pairing settings usually look like when HID is set to Keyboard + Media?

  • How do the pairing settings usually look like when HID is set to Keyboard + Media?

    I'm not sure I understand the question, but that did get me thinking - hidcam seems to do NRF.sendHIDReport([1,code] and you're doing NRF.sendHIDReport([0,code] - does that make a difference? It could just be the order of the info you have to send out is different to normal with kbmedia

  • Where is that emoji banging the head on the table?
    @Gordon thanks, that was the case :) PR is on the way...

    Edit: https://github.com/espruino/BangleApps/p­ull/2020

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

HID: Error: Error: ERR 0x8 (INVALID_STATE) (:3068)

Posted by Avatar for Hank @Hank

Actions