Avatar for neshanjo2

neshanjo2

Member since Apr 2023 • Last active Apr 2023
  • 1 conversations
  • 3 comments

Most recent activity

  • in General
    Avatar for neshanjo2

    Thank you, Gordon! It now works. That's so great! I'm always impressed how quickly and well you reply to any issue here!

    BTW, I first tried espruino within the Git Bash in Windows and got some error that that setRawMode could not be called on stdin (serialport error: TypeError: process.stdin.setRawMode is not a function). Luckily, that's no issue when using cmd or Powershell.

  • in General
    Avatar for neshanjo2

    As the title says, it's Windows 10.
    Version 22H2, to be precise.

    Espruino Command-line Tool 0.1.46

    I like to access my Bangle.js 2, but I thought this is some generic problem. I don't know what the COM-ports actually are on my system.

    I've already reinstalled the cli and still get the error. I also assume that no bluetooth modules are installed, since AppData\Roaming\npm\node_modules\espruin­o\node_modules\ does not contain folders winnus or noble, and the @abandonware subfolder is empty. The npm install espruino command, however, did not show any errors.

    By the way, while looking at the code where the noble error comes from, I discovered serial_noble.js lines 58ff

    function startNoble() {
        try {
          process.on('uncaughtException', nobleExceptionHandler);
          try {
            noble = require('noble');
          } catch (e) {
            noble = require('@abandonware/noble');
          }
        } catch (e) { ... }
    

    where the exception from require('noble') is swallowed, which (at least in my case) is the root problem. I suggest adding some log message that noble could not be loaded and @abandonware/noble is tried instead.

  • in General
    Avatar for neshanjo2

    Hi!

    I try to get espruino cli working.

    I ran

    npm install -g espruino
    espruino --list --verbose
    

    and get several errors. The complete log is in the attachment, the problematic parts are shown here (the actual user dir was masked to by me before posting this):

    :
    Found <MYUSERDIR>\AppData\Roaming\npm\node_mod­ules\espruino/core/serial_winnus.js
    'winnus' module not found, no Windows Bluetooth Low Energy Error: Cannot find module 'winnus'
    Require stack:
    - <MYUSERDIR>\AppData\Roaming\npm\node_mod­ules\espruino\index.js
    - <MYUSERDIR>\AppData\Roaming\npm\node_mod­ules\espruino\bin\espruino-cli.js
    :
    Initialising SetTime
    Searching for serial ports...
    Noble: getPorts - initialising...
    Noble: module couldn't be loaded, no node.js Bluetooth Low Energy
     Error: Cannot find module '@abandonware/noble'
    Require stack:
    - <MYUSERDIR>\AppData\Roaming\npm\node_mod­ules\espruino\index.js
    - <MYUSERDIR>\AppData\Roaming\npm\node_mod­ules\espruino\bin\espruino-cli.js
    :
    [Error: ENOENT: no such file or directory, open 'C:\serial\ports'] {
      errno: -4058,
      code: 'ENOENT',
      syscall: 'open',
      path: 'C:\\serial\\ports'
    }
    /serial/ports doesn't exist - disabling WebSocket support
    PORTS:
      COM6  (Microsoft)
      COM5  (Microsoft)
    

    Any suggestions?

Actions