0

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?

Patrick
  • 5
  • 1
  • 4
  • Please put the udev rule in the question itself rather than a screenshot – Jon Jul 27 '20 at 19:23
  • Check that the udev rule is actually taking effect and the user running Chrome is capable of opening the device node. – Reilly Grant Jul 27 '20 at 21:26
  • 1
    @Jon I've added some more details – Patrick Jul 29 '20 at 06:42
  • @ReillyGrant I've added some more details. The runnig user is admin and in all groups – Patrick Jul 29 '20 at 07:17
  • When you select the port in Chrome it should list the device name, something like "ttyUSB0". If you run `ls -l /dev/ttyUSB0` are the ownership and permissions on the file set up so that the user running Chrome can access it? – Reilly Grant Jul 30 '20 at 17:25

1 Answers1

5

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!.

Dharman
  • 30,962
  • 25
  • 85
  • 135