• Yeah, well that seems to have gotten us a little closer. Look what verbose revealed.

    espruino --list --verbose
    0.0.33 Espruino Command-line Tool 0.0.33
    -----------------------------------

    Acorn library not found - you'll need it for compiled code Found
    /usr/local/lib/node_modules/espruino/libs/targz.js Found
    /usr/local/lib/node_modules/espruino/libs/utf8.js Found
    /usr/local/lib/node_modules/espruino/espruino.js Found
    /usr/local/lib/node_modules/espruino/core/codeWriter.js Found
    /usr/local/lib/node_modules/espruino/core/config.js Found
    /usr/local/lib/node_modules/espruino/core/env.js Found
    /usr/local/lib/node_modules/espruino/core/flasher.js Found
    /usr/local/lib/node_modules/espruino/core/modules.js Found
    /usr/local/lib/node_modules/espruino/core/notifications.js Found
    /usr/local/lib/node_modules/espruino/core/serial.js Found
    /usr/local/lib/node_modules/espruino/core/serial_audio.js Found
    /usr/local/lib/node_modules/espruino/core/serial_chrome.js Found
    /usr/local/lib/node_modules/espruino/core/serial_noble.js 'noble'
    module couldn't be loaded, no node.js Bluetooth Low Energy { [Error:
    Cannot find module 'bluetooth-hci-socket'] code: 'MODULE_NOT_FOUND' }
    Found /usr/local/lib/node_modules/espruino/core/serial_nodeserial.js
    No 'serialport' module found Found
    /usr/local/lib/node_modules/espruino/core/serial_socket.js No
    chrome.sockets - serial_socket disabled Found
    /usr/local/lib/node_modules/espruino/core/serial_web_bluetooth.js No
    navigator.bluetooth - Web Bluetooth not enabled Found
    /usr/local/lib/node_modules/espruino/core/serial_websocket.js Found
    /usr/local/lib/node_modules/espruino/core/serial_winnus.js 'winnus'
    module not found, no Windows Bluetooth Low Energy { [Error: Cannot
    find module 'winnus'] code: 'MODULE_NOT_FOUND' } Found
    /usr/local/lib/node_modules/espruino/core/settingsAbout.js Found
    /usr/local/lib/node_modules/espruino/core/status.js Found
    /usr/local/lib/node_modules/espruino/core/terminal.js Found
    /usr/local/lib/node_modules/espruino/core/utils.js Found
    /usr/local/lib/node_modules/espruino/plugins/_examplePlugin.js Found
    /usr/local/lib/node_modules/espruino/plugins/assembler.js Found
    /usr/local/lib/node_modules/espruino/plugins/boardJSON.js Found
    /usr/local/lib/node_modules/espruino/plugins/compiler.js Found
    /usr/local/lib/node_modules/espruino/plugins/getGitHub.js Found
    /usr/local/lib/node_modules/espruino/plugins/localModules.js Found
    /usr/local/lib/node_modules/espruino/plugins/minify.js Found
    /usr/local/lib/node_modules/espruino/plugins/npmModules.js Found
    /usr/local/lib/node_modules/espruino/plugins/saveOnSend.js Found
    /usr/local/lib/node_modules/espruino/plugins/setTime.js Found
    /usr/local/lib/node_modules/espruino/plugins/uiMode.js Found
    /usr/local/lib/node_modules/espruino/plugins/unicode.js Found
    /usr/local/lib/node_modules/espruino/plugins/versionChecker.js
    Initialising CodeWriter Initialising Config Initialising Env
    Initialising Flasher Initialising Modules Initialising Notifications
    Initialising Serial Initialising SettingsAbout Initialising Status
    Initialising Utils Initialising ExamplePlugin Initialising Assembler
    Initialising BoardJSON Initialising Compiler Initialising GetGitHub
    Initialising LocalModules Initialising Minify Initialising NPMModules
    Initialising SaveOnSend Initialising SetTime Initialising UiMode
    Initialising Unicode Initialising VersionChecker Searching for serial
    ports... PORTS:

    Turns out that both noble and bluetooth-hci-socket both need to be installed globally as well:

    npm -g install noble bluetooth-hci-socket

    espruino --list Espruino Command-line Tool 0.0.33
    -----------------------------------

    PORTS: f8:37:bb:11:74:a7 (Puck.js 74a7)

    Woo Hoo! Now finally it connects. At least long enough to get Battery status.

    espruino --verbose -p f8:37:bb:11:74:a7
    0.0.33 Espruino Command-line Tool 0.0.33
    -----------------------------------

    Acorn library not found - you'll need it for compiled code Found
    /usr/local/lib/node_modules/espruino/libs/targz.js Found
    /usr/local/lib/node_modules/espruino/libs/utf8.js Found
    /usr/local/lib/node_modules/espruino/espruino.js Found
    /usr/local/lib/node_modules/espruino/core/codeWriter.js Found
    /usr/local/lib/node_modules/espruino/core/config.js Found
    /usr/local/lib/node_modules/espruino/core/env.js Found
    /usr/local/lib/node_modules/espruino/core/flasher.js Found
    /usr/local/lib/node_modules/espruino/core/modules.js Found
    /usr/local/lib/node_modules/espruino/core/notifications.js Found
    /usr/local/lib/node_modules/espruino/core/serial.js Found
    /usr/local/lib/node_modules/espruino/core/serial_audio.js Found
    /usr/local/lib/node_modules/espruino/core/serial_chrome.js Found
    /usr/local/lib/node_modules/espruino/core/serial_noble.js Found
    /usr/local/lib/node_modules/espruino/core/serial_nodeserial.js No
    'serialport' module found Found
    /usr/local/lib/node_modules/espruino/core/serial_socket.js No
    chrome.sockets - serial_socket disabled Found
    /usr/local/lib/node_modules/espruino/core/serial_web_bluetooth.js No
    navigator.bluetooth - Web Bluetooth not enabled Found
    /usr/local/lib/node_modules/espruino/core/serial_websocket.js Found
    /usr/local/lib/node_modules/espruino/core/serial_winnus.js 'winnus'
    module not found, no Windows Bluetooth Low Energy { [Error: Cannot
    find module 'winnus'] code: 'MODULE_NOT_FOUND' } Found
    /usr/local/lib/node_modules/espruino/core/settingsAbout.js Found
    /usr/local/lib/node_modules/espruino/core/status.js Found
    /usr/local/lib/node_modules/espruino/core/terminal.js Found
    /usr/local/lib/node_modules/espruino/core/utils.js Found
    /usr/local/lib/node_modules/espruino/plugins/_examplePlugin.js Found
    /usr/local/lib/node_modules/espruino/plugins/assembler.js Found
    /usr/local/lib/node_modules/espruino/plugins/boardJSON.js Found
    /usr/local/lib/node_modules/espruino/plugins/compiler.js Found
    /usr/local/lib/node_modules/espruino/plugins/getGitHub.js Found
    /usr/local/lib/node_modules/espruino/plugins/localModules.js Found
    /usr/local/lib/node_modules/espruino/plugins/minify.js Found
    /usr/local/lib/node_modules/espruino/plugins/npmModules.js Found
    /usr/local/lib/node_modules/espruino/plugins/saveOnSend.js Found
    /usr/local/lib/node_modules/espruino/plugins/setTime.js Found
    /usr/local/lib/node_modules/espruino/plugins/uiMode.js Found
    /usr/local/lib/node_modules/espruino/plugins/unicode.js Found
    /usr/local/lib/node_modules/espruino/plugins/versionChecker.js
    Initialising CodeWriter Initialising Config Initialising Env
    Initialising Flasher Initialising Modules Initialising Notifications
    Initialising Serial

    • Initialising Serial Noble Initialising SettingsAbout Initialising Status Initialising Utils Initialising ExamplePlugin Initialising
      Assembler Initialising BoardJSON Initialising Compiler Initialising
      GetGitHub Initialising LocalModules Initialising Minify Initialising
      NPMModules Initialising SaveOnSend Initialising SetTime Initialising
      UiMode Initialising Unicode Initialising VersionChecker Connecting to
      'f8:37:bb:11:74:a7' noble starting scan Port "f8:37:bb:11:74:a7" not
      found - checking ports again (2 attempts left) noble starting scan
      Found UART device: Puck.js 74a7 f8:37:bb:11:74:a7 noble stopping scan
      BT> Connecting BT> Connected Connected {} BT> Sending "\n" Received a
      prompt after sending newline... good!
      >>> Sending...
      ---> "\u0010console.log(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n"
      BT> Sending "\u0010console.log(\"<" BT> Sending "\",\"<<\",JSON.str"
      BT> Sending "ingify(process." BT> Sending "env),\">>\",\">\")\n"
      >>> Sent Got "< << {\"VERSION\":\"1v93\",\"BUILD_DATE\":\"Aug 21 2017\",\"BUILD_TIME\":\"15:32:25\",\"GIT_COMMIT\":\"7237347960825c8a36d706e3bc1dcfa60e3caedc\",\"BOARD\":\"PUCKJS\",\"CHIP\":\"NRF52832\",\"CHIP_FAMILY\":\"NRF52\",\"FLASH\":524288,\"RAM\":65536,\"SERIAL\":\"852140da-3f75e857\",\"CONSOLE\":\"Bluetooth\"}
      >> >\r\n>" Loading http://www.espruino.com/json/PUCKJS.json Board JSON loaded Firmware >1.43 supports faster writes over USB Set Slow Write =
      false FIRMWARE: Current 1v93, Available 1v93 Connected BT> Sending
      "\r"

    =undefined

    BT> Sending "Puck.getBatteryPerce" BT> Sending "ntage()" Puck.getBatteryPercentage()BT> Sending "\r"

    =100

    But wait a few seconds and it becomes unresponsive again :(

    =100

    BT> Sending "\r"

    It does not even say timed out or anything. Just becomes unresponsive when I type anything.

    Weird.

About

Avatar for MyBlueBoo @MyBlueBoo started