• I'm hoping this topic isn't too generic.

    Not sure if BLE midi is meant to be working properly on this device, maybe it just isn't supposed to, it's not mentioned anywhere on the page for BLE midi so I'm not sure.

    Attached is the error I'm getting, in case it is supposed to be supported.

    Also, on a slightly unrelated note, I'm also having trouble with keyboard HID in Linux. Not sure if it's an issue with my systems (have tried two running KDE, Fedora and Debian) and both have not worked, however I've connected it to a Chromebook and that appears to be working fine. Maybe it is a generic Linux issue, but I don't have a Bluetooth keyboard to test if it's the watch's fault.

    Finally, the reason I'm even trying Midi is because I wasn't able to find any other way to send text data between the two devices. If there's any better way, that would also be better.


    1 Attachment

    • Screenshot_20240303_114857.png
  • keyboard HID in Linux

    I meant to say the capslock / scrolllock / etc-lock indicators. I'm only getting the events when every light has been disabled. Code is just detecting for ".on('HID')" events and immediately console.log-ing (no if statements), so it's not an issue with my own code.

    way to send text data between the two devices

    The computer I'm trying to use it with is very specific. I don't plan to make it platform-independent (working on Windows, etc), since it's meant to run with a particular device anyway. If there is a better alternative, more specific method, GNU/Linux-only stuff is fine, as long as I can build it myself.

  • Alright everyone, I apologize. I've only now found the "Interfacing" page in Espruino's docs, I really should've kept on looking.

    If someone would like to talk about the other mentioned issues (e.g key light issues, MIDI), though, I would still appreciate comments on those.

  • I've only now found the "Interfacing" page in Espruino's docs

    Yes - that's definitely what you need!

    For BLE midi/etc I guess it's possible what you're hitting is that Bangle.js is setting itself up as something different every time it starts, so you might pair the Bangle without your app running and then the PC isn't aware that the Bangle was properly providing HID. You'd have to ensure you forgot the Bangle and re-paired it each time - there is an option in the Bangle's settings menu that lets you enable Bluetooth HID, and then it's always on - and that might work better for you (you could look at some of the existing apps for how they work).

    However we don't have an option for making it appear as a Midi device all the time (although I guess that could be added)

  • Yes, I see what you're saying. The problem for me, though, was that midi.init() wasn't even working at all, throwing an error I couldn't understand. I'm pretty sure it wasn't my code, but it's slightly possible some of my HID stuff was messing with it. If you or someone else wants to test to make sure the issue is there, that'd be great; I'm not at home at the moment, so I can't test it myself.

    I wouldn't assume the problem is with Bluetooth pairing, since it usually waits for whenever it's disconnected to change stuff.

  • I've just checked, and it works fine for me on a Bangle here (at least it initialises when uploaded to RAM, and when you press the button it says the services need updating first) - if your firmware up to date?

    The invalid param is going to be from the bluetooth stack, which doesn't like something about the data being advertised. I guess it's possible there's some other bluetooth setting you have enabled (pairing? not sure) that means that the bluetooth flags in setAdvertising can't be used... https://www.espruino.com/modules/ble_mid­i.js

  • Interesting, I also tried directly running the following (RAM, like you did), with none of my extra code:

    var int = require("ble_midi");
    int.init();
    

    It should work, right? I'm getting the same error.

    Also, my BT settings (if they matter) are:

    Connectable: Stay connectable enabled
    BLE On
    Programmable On
    HID Off
    Passkey none
    Whitelist off
    

    Usually I'm only running one program, the large one I made myself. Not using downloaded code other than firmware / bootloader, although I did download a lot of apps at one point.. Everything is updated, though, and as far as I know, the other apps aren't interfering; Unless there's some sort of background service feature I haven't heard of yet.


    1 Attachment

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

BLE + Bangle.JS 2, Miscellaneous issues & questions

Posted by Avatar for MyCoffeeTooCold @MyCoffeeTooCold

Actions