Patrick
Patrick

Reputation: 5

WebSerial API Device cannot open port on Ubuntu

I have tried to use the WebSerial API on Ubuntu after it worked on Windows and ChromeOS. When I try to connect a device, i get this error: DOMException: Failed to open serial port. Error

I have created a udev rule but it did not work.

SUBSYSTEM=="tty", ATTR{idVendor}=="0eb8", ATTR{idProduct}=="f010", ATTRS{serial}=="0000:00:14.0", SYMLINK+="ttyMettler0"

The device info:

looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-6':
    KERNEL=="1-6"
    SUBSYSTEM=="usb"
    DRIVER=="usb"
    ATTR{idProduct}=="f010"
    ATTR{bNumConfigurations}=="1"
    ATTR{avoid_reset_quirk}=="0"
    ATTR{configuration}==""
    ATTR{bNumInterfaces}==" 2"
    ATTR{ltm_capable}=="no"
    ATTR{quirks}=="0x0"
    ATTR{manufacturer}=="METTLER TOLEDO"
    ATTR{serial}=="67022056LW"
    ATTR{speed}=="12"
    ATTR{urbnum}=="10"
    ATTR{busnum}=="1"
    ATTR{tx_lanes}=="1"
    ATTR{bConfigurationValue}=="1"
    ATTR{devnum}=="5"
    ATTR{bDeviceSubClass}=="00"
    ATTR{bmAttributes}=="c0"
    ATTR{idVendor}=="0eb8"
    ATTR{version}==" 1.10"
    ATTR{authorized}=="1"
    ATTR{maxchild}=="0"
    ATTR{product}=="BCA-222-60U-1301-120 "
    ATTR{bcdDevice}=="100f"
    ATTR{bDeviceClass}=="02"
    ATTR{rx_lanes}=="1"
    ATTR{bMaxPacketSize0}=="8"
    ATTR{bMaxPower}=="500mA"
    ATTR{devpath}=="6"
    ATTR{removable}=="removable"
    ATTR{bDeviceProtocol}=="00"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{version}==" 2.00"
    ATTRS{devpath}=="0"
    ATTRS{busnum}=="1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{removable}=="unknown"
    ATTRS{authorized_default}=="1"
    ATTRS{serial}=="0000:00:14.0"
   

Is my udev correct? Has anyone a similar problem?

Upvotes: 0

Views: 5267

Answers (1)

Pedro Monteagudo
Pedro Monteagudo

Reputation: 386

In my case, this problem was solved by adding my user to the "dialout" group with sudo adduser [username] dialout (take into account that the machine should be restarted after that) and then it worked!.

Upvotes: 10

Related Questions