Static USB ports on RevolutionPi USB Hub

0

I have a RevolutionPi running Debian, a 7 port USB hub and 3 USB NFC reader. Now my problem is that I need static USB ports so they always initialized in the same order.

There are several sources like:

Link-1 or Link-2

Which tell me how to do exactly that but I still can't get it to work because there are some differences in my specific case.

  1. all USB ports of my USB hub have the same Product and Vendor ID
  2. when I plug in my NFC Readers into the ports, Linux creates files like 010 011 and 012 in the folder dev/bus/usb/001 and not something like ttyUSB ... in dev

Here is what I got with udevadm info:

looking at device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4.4':
        KERNEL=="1-1.3.4.4"
        SUBSYSTEM=="usb"
        DRIVER=="usb"
        ATTR{bDeviceSubClass}=="00"
        ATTR{bDeviceProtocol}=="00"
        ATTR{devpath}=="1.3.4.4"
        ATTR{idVendor}=="072f"
        ATTR{speed}=="12"
        ATTR{bNumInterfaces}==" 1"
        ATTR{bConfigurationValue}=="1"
        ATTR{bMaxPacketSize0}=="8"
        ATTR{busnum}=="1"
        ATTR{devnum}=="35"
        ATTR{configuration}==""
        ATTR{bMaxPower}=="200mA"
        ATTR{authorized}=="1"
        ATTR{bmAttributes}=="80"
        ATTR{bNumConfigurations}=="1"
        ATTR{maxchild}=="0"
        ATTR{bcdDevice}=="0214"
        ATTR{avoid_reset_quirk}=="0"
        ATTR{quirks}=="0x0"
        ATTR{version}==" 1.10"
        ATTR{urbnum}=="9"
        ATTR{ltm_capable}=="no"
        ATTR{manufacturer}=="ACS"
        ATTR{removable}=="unknown"
        ATTR{idProduct}=="2200"
        ATTR{bDeviceClass}=="00"
        ATTR{product}=="ACR122U PICC Interface"
        looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.4':
        KERNELS=="1-1.3.4"
        SUBSYSTEMS=="usb"
        DRIVERS=="usb"
        ATTRS{bDeviceSubClass}=="00"
        ATTRS{bDeviceProtocol}=="02"
        ATTRS{devpath}=="1.3.4"
        ATTRS{idVendor}=="05e3"
        ATTRS{speed}=="480"
        ATTRS{bNumInterfaces}==" 1"
        ATTRS{bConfigurationValue}=="1"
        ATTRS{bMaxPacketSize0}=="64"
        ATTRS{busnum}=="1"
        ATTRS{devnum}=="16"
        ATTRS{configuration}==""
        ATTRS{bMaxPower}=="100mA"
        ATTRS{authorized}=="1"
        ATTRS{bmAttributes}=="e0"
        ATTRS{bNumConfigurations}=="1"
        ATTRS{maxchild}=="4"
        ATTRS{bcdDevice}=="3298"
        ATTRS{avoid_reset_quirk}=="0"
        ATTRS{quirks}=="0x0"
        ATTRS{version}==" 2.00"
        ATTRS{urbnum}=="698"
        ATTRS{ltm_capable}=="no"
        ATTRS{removable}=="fixed"
        ATTRS{idProduct}=="0610"
        ATTRS{bDeviceClass}=="09"
        ATTRS{product}=="USB2.0 Hub"
      looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3':
        KERNELS=="1-1.3"
        SUBSYSTEMS=="usb"
        DRIVERS=="usb"
        ATTRS{bDeviceSubClass}=="00"
        ATTRS{bDeviceProtocol}=="02"
        ATTRS{devpath}=="1.3"
        ATTRS{idVendor}=="05e3"
        ATTRS{speed}=="480"
        ATTRS{bNumInterfaces}==" 1"
        ATTRS{bConfigurationValue}=="1"
        ATTRS{bMaxPacketSize0}=="64"
        ATTRS{busnum}=="1"
        ATTRS{devnum}=="15"
        ATTRS{configuration}==""
        ATTRS{bMaxPower}=="100mA"
        ATTRS{authorized}=="1"
        ATTRS{bmAttributes}=="e0"
        ATTRS{bNumConfigurations}=="1"
        ATTRS{maxchild}=="4"
        ATTRS{bcdDevice}=="3298"
        ATTRS{avoid_reset_quirk}=="0"
        ATTRS{quirks}=="0x0"
        ATTRS{version}==" 2.00"
        ATTRS{urbnum}=="645"
        ATTRS{ltm_capable}=="no"
        ATTRS{removable}=="removable"
        ATTRS{idProduct}=="0610"
        ATTRS{bDeviceClass}=="09"
        ATTRS{product}=="USB2.0 Hub"
      looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1':
        KERNELS=="1-1"
        SUBSYSTEMS=="usb"
        DRIVERS=="usb"
        ATTRS{bDeviceSubClass}=="00"
        ATTRS{bDeviceProtocol}=="02"
        ATTRS{devpath}=="1"
        ATTRS{idVendor}=="0424"
        ATTRS{speed}=="480"
        ATTRS{bNumInterfaces}==" 1"
        ATTRS{bConfigurationValue}=="1"
        ATTRS{bMaxPacketSize0}=="64"
        ATTRS{busnum}=="1"
        ATTRS{devnum}=="2"
        ATTRS{configuration}==""
        ATTRS{bMaxPower}=="2mA"
        ATTRS{authorized}=="1"
        ATTRS{bmAttributes}=="e0"
        ATTRS{bNumConfigurations}=="1"
        ATTRS{maxchild}=="5"
        ATTRS{bcdDevice}=="0200"
        ATTRS{avoid_reset_quirk}=="0"
        ATTRS{quirks}=="0x0"
        ATTRS{version}==" 2.00"
        ATTRS{urbnum}=="319"
        ATTRS{ltm_capable}=="no"
        ATTRS{removable}=="unknown"
        ATTRS{idProduct}=="9514"
        ATTRS{bDeviceClass}=="09"
      looking at parent device '/devices/platform/soc/3f980000.usb/usb1':
        KERNELS=="usb1"
        SUBSYSTEMS=="usb"
        DRIVERS=="usb"
        ATTRS{bDeviceSubClass}=="00"
        ATTRS{bDeviceProtocol}=="01"
        ATTRS{devpath}=="0"
        ATTRS{idVendor}=="1d6b"
        ATTRS{speed}=="480"
        ATTRS{bNumInterfaces}==" 1"
        ATTRS{bConfigurationValue}=="1"
        ATTRS{bMaxPacketSize0}=="64"
        ATTRS{authorized_default}=="1"
        ATTRS{busnum}=="1"
        ATTRS{devnum}=="1"
        ATTRS{configuration}==""
        ATTRS{bMaxPower}=="0mA"
        ATTRS{authorized}=="1"
        ATTRS{bmAttributes}=="e0"
        ATTRS{bNumConfigurations}=="1"
        ATTRS{maxchild}=="1"
        ATTRS{interface_authorized_default}=="1"
        ATTRS{bcdDevice}=="0404"
        ATTRS{avoid_reset_quirk}=="0"
        ATTRS{quirks}=="0x0"
        ATTRS{serial}=="3f980000.usb"
        ATTRS{version}==" 2.00"
        ATTRS{urbnum}=="25"
        ATTRS{ltm_capable}=="no"
        ATTRS{manufacturer}=="Linux 4.4.50-rt66-v7+ dwc_otg_hcd"
        ATTRS{removable}=="unknown"
        ATTRS{idProduct}=="0002"
        ATTRS{bDeviceClass}=="09"
        ATTRS{product}=="DWC OTG Controller"
      looking at parent device '/devices/platform/soc/3f980000.usb':
        KERNELS=="3f980000.usb"
        SUBSYSTEMS=="platform"
        DRIVERS=="dwc_otg"
        ATTRS{hnp}=="HstNegScs = 0x0"
        ATTRS{srp}=="SesReqScs = 0x1"
        ATTRS{regvalue}=="invalid offset"
        ATTRS{hsic_connect}=="HSIC Connect = 0x1"
        ATTRS{guid}=="GUID = 0x2708a000"
        ATTRS{mode}=="Mode = 0x1"
        ATTRS{srpcapable}=="SRPCapable = 0x1"
        ATTRS{regdump}=="Register Dump"
        ATTRS{gpvndctl}=="GPVNDCTL = 0x00000000"
        ATTRS{ggpio}=="GGPIO = 0x00000000"
        ATTRS{hprt0}=="HPRT0 = 0x00001005"
        ATTRS{wr_reg_test}=="Time to write GNPTXFSIZ reg 10000000 times: 390 msecs (39 jiffies)"
        ATTRS{driver_override}=="(null)"
        ATTRS{hcd_frrem}=="HCD Dump Frame Remaining"
        ATTRS{mode_ch_tim_en}=="Mode Change Ready Timer Enable = 0x0"
        ATTRS{gnptxfsiz}=="GNPTXFSIZ = 0x01000306"
        ATTRS{remote_wakeup}=="Remote Wakeup Sig = 0 Enabled = 0 LPM Remote Wakeup = 0"
        ATTRS{busconnected}=="Bus Connected = 0x1"
        ATTRS{hcddump}=="HCD Dump"
        ATTRS{gotgctl}=="GOTGCTL = 0x001c0001"
        ATTRS{spramdump}=="SPRAM Dump"
        ATTRS{grxfsiz}=="GRXFSIZ = 0x00000306"
        ATTRS{gsnpsid}=="GSNPSID = 0x4f54280a"
        ATTRS{gusbcfg}=="GUSBCFG = 0x20001700"
        ATTRS{hptxfsiz}=="HPTXFSIZ = 0x02000406"
        ATTRS{devspeed}=="Device Speed = 0x0"
        ATTRS{fr_interval}=="Frame Interval = 0x1d4c"
        ATTRS{rem_wakeup_pwrdn}==""
        ATTRS{bussuspend}=="Bus Suspend = 0x0"
        ATTRS{buspower}=="Bus Power = 0x1"
        ATTRS{hnpcapable}=="HNPCapable = 0x1"
        ATTRS{rd_reg_test}=="Time to read GNPTXFSIZ reg 10000000 times: 930 msecs (93 jiffies)"
        ATTRS{enumspeed}=="Device Enumeration Speed = 0x1"
        ATTRS{inv_sel_hsic}=="Invert Select HSIC = 0x0"
        ATTRS{regoffset}=="0xffffffff"
      looking at parent device '/devices/platform/soc':
        KERNELS=="soc"
        SUBSYSTEMS=="platform"
        DRIVERS==""
        ATTRS{driver_override}=="(null)"
      looking at parent device '/devices/platform':
        KERNELS=="platform"
        SUBSYSTEMS==""
        DRIVERS==""

Since there are no differences in vendor and Product ID I have tried to get the kernel number for each port with:

pi@RevPi2167:/dev/bus/usb/001 $ udevadm info -q path -n /dev/bus/usb/001/027
            /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4.4
pi@RevPi2167:/dev/bus/usb/001 $ udevadm info -q path -n /dev/bus/usb/001/028
            /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4.3
pi@RevPi2167:/dev/bus/usb/001 $ udevadm info -q path -n /dev/bus/usb/001/029
            /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4.2

I have honestly no idea what my rule file is supposed to look like.

I have tried

SUBSYSTEM="usb", KERNELS="1-1.3.4.4", SYMLINK+="hub0"
SUBSYSTEM="usb", KERNELS="1-1.3.4.3", SYMLINK+="hub1"
SUBSYSTEM="usb", KERNELS="1-1.3.4.2", SYMLINK+="hub2"

But that doesn't seem right at all.

linux
static
usb
port
asked on Stack Overflow Nov 8, 2018 by Raffz • edited Nov 8, 2018 by Benyamin Jafari

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0