Need help connecting to Bangle

Posted on
  • So, just received my Bangle, but need some help getting it up and running.

    I am using Ubuntu Linux 18.04 with a Plugable USB Bluetooth dongle which seems to work fine. I have BlueZ 5.48 installed. The Bangle is connectable. All I'm describing below is the same with or without superuser rights.

    The espruino command line tool from here shows me a port for the Bangle with espruino --list. So far, so good.

    However, in the Espruino Web IDE stand-alone version from here I only get "No ports found" when I try to connect. The console spits out this when I try to connect:

    Noble: module couldn't be loaded, no node.js Bluetooth Low Energy Error: Cannot find module 'ms' Require stack: - /usr/local/lib/node_modules/espruino-web-ide/node_modules/debug/src/common.js - /usr/local/lib/node_modules/espruino-web-ide/node_modules/debug/src/browser.js - /usr/local/lib/node_modules/espruino-web-ide/node_modules/debug/src/index.js - /usr/local/lib/node_modules/espruino-web-ide/node_modules/@abandonware/noble/lib/noble.js - /usr/local/lib/node_modules/espruino-web-ide/node_modules/@abandonware/noble/index.js - /usr/local/lib/node_modules/espruino-web-ide/main.html
    No navigator.bluetooth - Web Bluetooth not enabled
    No navigator.serial - Web Serial not enabled

    Tried to install the package ms via npm install -g ms but then just the same error for another package pops up. Is the IDE just missing a bunch of dependencies?

    The documentation here suggests there is an Espruino IDE version other than the Web IDE? But I can't find a version for Linux for the life of me. Everything just leads me back to the Web IDE version.

    So what can I do to make that one work? I really don't want to upload everything from the command line.

    Thanks.

  • Hi - does everything work if you just go to https://www.espruino.com/ide/ in Chrome/Chromium? On Linux you need to flip the 'Experimental Features' flag in chrome://flags but then it'd work fine.

    That'd be the suggested way of doing things at the moment.

    If I'm honest, since support for Serial and Bluetooth got built right into Chrome, Chromium and Edge there's been very little reason to use node-webkit, so I haven't tried running with it for a while.

  • So, I ended up installing Chromium and with that it actually works fine. Was hoping to avoid that, but the comfort of the Web IDE and App Loader are a strong argument :-)

  • Your other option is to just use the Espruino command-line tools to connect and then serve the IDE.

    espruino -d Bangle.js --ide
    # then connect to localhost:8080 in whatever browser you want
    

    But it's a bit fiddly compared to just using Chrome. I'm actually working on something which should help to bring all this together a bit more as there are so many different ways to connect now - some easier than others!

  • Ahh, that is great! I had no idea you could do that! I was wondering already if there was a way to run the IDE offline as well. It does seem to be a bit more difficult to connect to the Bangle that way, but once it does it seems to work well.

    Thanks Gordon.

  • I was wondering already if there was a way to run the IDE offline as well

    Yes - actually even https://www.espruino.com/ide/ 'just works' - it's a progressive web app, so once you've viewed it once while online, you can still use it fine while offline too.

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

Need help connecting to Bangle

Posted by Avatar for Sebastian @Sebastian

Actions