brewpi-remix / brewpi-tools-rmx

START HERE: BrewPi Remix Tools
https://www.brewpiremix.com
GNU General Public License v3.0
17 stars 6 forks source link

Arduino with no Serial Number Not Detected #42

Closed lbussy closed 3 years ago

lbussy commented 3 years ago

When searching for Arduinos, the installation script searches for a serial number. Some devices apparently do not have a serial number. This example was detected on /dev/ttyUSB0 shared by a user:

  looking at parent device '/devices/platform/soc/20980000.usb/usb1/1-1/1-1.2/1-1.2.3':
    KERNELS=="1-1.2.3"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{rx_lanes}=="1"
    ATTRS{idVendor}=="1a86"
    ATTRS{urbnum}=="1661"
    ATTRS{version}==" 1.10"
    ATTRS{maxchild}=="0"
    ATTRS{busnum}=="1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bMaxPower}=="98mA"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{devpath}=="1.2.3"
    ATTRS{devnum}=="6"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bDeviceClass}=="ff"
    ATTRS{tx_lanes}=="1"
    ATTRS{speed}=="12"
    ATTRS{idProduct}=="7523"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bmAttributes}=="80"
    ATTRS{product}=="USB Serial"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{devspec}==" (null)"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{authorized}=="1"
    ATTRS{bcdDevice}=="0264"
    ATTRS{ltm_capable}=="no"
    ATTRS{configuration}==""

An interesting aside: Fermentrack uses pyudev which might be a good way to go when I re-do this work.

lbussy commented 3 years ago

Fermentrack uses the same logic. BrewPi will still find such an Arduino with port = auto, however, there's no way to deterministically assign such a device when in multi-chamber mode.

Because there's no way to identify such an Arduino, this is going in the "won't fix" column because there's simply no good way to do it.