espruino cli not finding COM ports?

Posted on
  • I am trying to get VS Code working with Espruino via­Visual+Studio+Code+IDE

    But I've been running into a bit of a hiccup, where it doesn't want to open the COM port (COM7 in this case). Different apps can all open the COM port, individually of course, not all at once!

    This is what VS Code is saying after a Ctrl+Shift+B => 'build', then a Ctrl+Shift+B => 'espruino-console':

    [19:23:47] Starting 'espruino-console'...
    Espruino Command-line Tool 0.0.36
    Explicit board JSON supplied: "ESP32"
    Connecting to 'COM7'
    Port "COM7" not found
    Unable to connect!
    [19:23:48] Finished 'espruino-console' after 1.7 s
    Terminal will be reused by tasks, press any key to close it.

    Possibly related, it appears that espruino-cli maybe isn't seeing COM ports?

    PS C:\Users\seganku\git\espruino-ts-quickst­art> espruino.cmd --list
    Espruino Command-line Tool 0.1.38
        } else throw err;
        at (C:\Users\seganku\AppData\Roaming\npm\no­de_modules\espruino\node_modules\usb\usb­.js:38:7)
        at BluetoothHciSocket.bindUser (C:\Users\seganku\AppData\Roaming\npm\no­de_modules\espruino\node_modules\@abando­nware\bluetooth-hci-socket\lib\usb.js:94­:19)
        at BluetoothHciSocket.bindRaw (C:\Users\seganku\AppData\Roaming\npm\no­de_modules\espruino\node_modules\@abando­nware\bluetooth-hci-socket\lib\usb.js:47­:8)
        at Hci.init (C:\Users\seganku\AppData\Roaming\npm\no­de_modules\espruino\node_modules\@abando­nware\noble\lib\hci-socket\hci.js:120:18­)
        at NobleBindings.init (C:\Users\seganku\AppData\Roaming\npm\no­de_modules\espruino\node_modules\@abando­nware\noble\lib\hci-socket\bindings.js:9­3:13)
        at C:\Users\seganku\AppData\Roaming\npm\nod­e_modules\espruino\node_modules\@abandon­ware\noble\lib\noble.js:61:24
        at processTicksAndRejections (internal/process/task_queues.js:75:11) {
      errno: -12

    I'll look at this more tomorrow, but my brain is about toast for the evening.


  • Ah,

    Windows Use Zadig to install the WinUSB driver for your USB device.
    Otherwise you will get LIBUSB_ERROR_NOT_SUPPORTED when attempting to
    open devices.

    (which I found when trying to figure out why espruino --list finds no ports in Ubuntu either)

  • espruino --list finds no ports in Ubuntu either

    In that case you need the setcap command to give it permissions.

    Odd about the COM ports on Windows though - maybe try espruino.cmd --list --verbose and see if it gives you any hints about why the serialport library isn't working?

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

espruino cli not finding COM ports?

Posted by Avatar for Seganku @Seganku