On Thursday 14 May 2015 07:34:41 meino.cra...@gmx.de wrote: > This is what udevadm monitor prints, when I unplug both Ariettas > simultanously: > solfire:/home/mccramer>udevadm monitor > monitor will print the received events for: > UDEV - the event which udev sends out after rule processing > KERNEL - the kernel uevent > > KERNEL[13781.884965] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1/queues/rx-0 > (queues) KERNEL[13781.885027] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1/queues/tx-0 > (queues) KERNEL[13781.885067] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1 (net) UDEV > [13781.886418] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1/queues/rx-0 > (queues) KERNEL[13781.889122] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0 (usb) > KERNEL[13781.889194] remove /devices/pci0000:00/0000:00:13.2/usb4/4-4 > (usb) UDEV [13781.902185] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1/queues/tx-0 > (queues) UDEV [13781.908021] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1 (net) UDEV > [13781.908429] remove /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0 > (usb) UDEV [13781.919474] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-4 (usb) KERNEL[13781.993142] > remove > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0/queues/rx-0 > (queues) KERNEL[13781.993182] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0/queues/tx-0 > (queues) KERNEL[13781.993211] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0 (net) UDEV > [13781.993928] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0/queues/rx-0 > (queues) UDEV [13781.994215] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0/queues/tx-0 > (queues) KERNEL[13781.998111] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0 (usb) > KERNEL[13781.998170] remove /devices/pci0000:00/0000:00:13.2/usb4/4-5 > (usb) UDEV [13782.000177] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0 (net) UDEV > [13782.000767] remove /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0 > (usb) UDEV [13782.013093] remove > /devices/pci0000:00/0000:00:13.2/usb4/4-5 (usb) > > > This is printed, when I connect the first Arietta to the PC: > > monitor will print the received events for: > UDEV - the event which udev sends out after rule processing > KERNEL - the kernel uevent > > KERNEL[14000.140611] add /devices/pci0000:00/0000:00:13.2/usb4/4-5 > (usb) KERNEL[14000.141572] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0 (usb) > KERNEL[14000.141967] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0 (net) > KERNEL[14000.142000] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0/queues/rx-0 > (queues) KERNEL[14000.142046] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0/queues/tx-0 > (queues) UDEV [14000.162311] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5 (usb) UDEV [14000.163727] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0 (usb) UDEV > [14000.170206] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0 (net) UDEV > [14000.170572] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0/queues/rx-0 > (queues) UDEV [14000.185482] add > /devices/pci0000:00/0000:00:13.2/usb4/4-5/4-5:1.0/net/usb0/queues/tx-0 > (queues > > > This is printed, when I connect the second Arietta to the PC: > > monitor will print the received events for: > UDEV - the event which udev sends out after rule processing > KERNEL - the kernel uevent > > KERNEL[14108.192714] add /devices/pci0000:00/0000:00:13.2/usb4/4-4 > (usb) KERNEL[14108.193781] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0 (usb) > KERNEL[14108.194211] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1 (net) > KERNEL[14108.194247] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1/queues/rx-0 > (queues) KERNEL[14108.194269] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1/queues/tx-0 > (queues) UDEV [14108.211967] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4 (usb) UDEV [14108.213327] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0 (usb) UDEV > [14108.217344] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1 (net) UDEV > [14108.217615] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1/queues/rx-0 > (queues) UDEV [14108.237237] add > /devices/pci0000:00/0000:00:13.2/usb4/4-4/4-4:1.0/net/usb1/queues/tx-0 > (queues) > > > The assigment to certain USB ports may vary from time to time. > > > This is what lsusb prints for both devices > > > Bus 004 Device 007: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB > Ethernet/RNDIS Gadget Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 2.00 > bDeviceClass 2 Communications > bDeviceSubClass 0 > bDeviceProtocol 0 > bMaxPacketSize0 64 > idVendor 0x0525 Netchip Technology, Inc. > idProduct 0xa4a2 Linux-USB Ethernet/RNDIS Gadget > bcdDevice 4.00 > iManufacturer 1 Linux 4.0.1-20150414.001 with atmel_usba_udc > iProduct 2 RNDIS/Ethernet Gadget > iSerial 0 > bNumConfigurations 2 > Configuration Descriptor: > bLength 9 > bDescriptorType 2 > wTotalLength 75 > bNumInterfaces 2 > bConfigurationValue 2 > iConfiguration 0 > bmAttributes 0xc0 > Self Powered > MaxPower 2mA > Interface Association: > bLength 8 > bDescriptorType 11 > bFirstInterface 0 > bInterfaceCount 2 > bFunctionClass 2 Communications > bFunctionSubClass 6 Ethernet Networking > bFunctionProtocol 0 > iFunction 6 RNDIS > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 0 > bAlternateSetting 0 > bNumEndpoints 1 > bInterfaceClass 2 Communications > bInterfaceSubClass 2 Abstract (modem) > bInterfaceProtocol 255 Vendor Specific (MSFT RNDIS?) > iInterface 4 RNDIS Communications Control > CDC Header: > bcdCDC 1.10 > CDC Call Management: > bmCapabilities 0x00 > bDataInterface 1 > CDC ACM: > bmCapabilities 0x00 > CDC Union: > bMasterInterface 0 > bSlaveInterface 1 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x83 EP 3 IN > bmAttributes 3 > Transfer Type Interrupt > Synch Type None > Usage Type Data > wMaxPacketSize 0x0008 1x 8 bytes > bInterval 32 > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 1 > bAlternateSetting 0 > bNumEndpoints 2 > bInterfaceClass 10 CDC Data > bInterfaceSubClass 0 > bInterfaceProtocol 0 > iInterface 5 RNDIS Ethernet Data > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x81 EP 1 IN > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0040 1x 64 bytes > bInterval 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x02 EP 2 OUT > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0040 1x 64 bytes > bInterval 0 > Configuration Descriptor: > bLength 9 > bDescriptorType 2 > wTotalLength 32 > bNumInterfaces 1 > bConfigurationValue 1 > iConfiguration 0 > bmAttributes 0xc0 > Self Powered > MaxPower 2mA > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 0 > bAlternateSetting 0 > bNumEndpoints 2 > bInterfaceClass 2 Communications > bInterfaceSubClass 12 Ethernet Emulation > bInterfaceProtocol 7 Ethernet Emulation (EEM) > iInterface 8 CDC Ethernet Emulation Model (EEM) > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x81 EP 1 IN > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0040 1x 64 bytes > bInterval 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x02 EP 2 OUT > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0040 1x 64 bytes > bInterval 0 > Device Qualifier (for other device speed): > bLength 10 > bDescriptorType 6 > bcdUSB 2.00 > bDeviceClass 2 Communications > bDeviceSubClass 0 > bDeviceProtocol 0 > bMaxPacketSize0 64 > bNumConfigurations 2 > Device Status: 0x0001 > Self Powered > > Bus 004 Device 008: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB > Ethernet/RNDIS Gadget Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 2.00 > bDeviceClass 2 Communications > bDeviceSubClass 0 > bDeviceProtocol 0 > bMaxPacketSize0 64 > idVendor 0x0525 Netchip Technology, Inc. > idProduct 0xa4a2 Linux-USB Ethernet/RNDIS Gadget > bcdDevice 4.00 > iManufacturer 1 Linux 4.0.1-20150414.001 with atmel_usba_udc > iProduct 2 RNDIS/Ethernet Gadget > iSerial 0 > bNumConfigurations 2 > Configuration Descriptor: > bLength 9 > bDescriptorType 2 > wTotalLength 75 > bNumInterfaces 2 > bConfigurationValue 2 > iConfiguration 0 > bmAttributes 0xc0 > Self Powered > MaxPower 2mA > Interface Association: > bLength 8 > bDescriptorType 11 > bFirstInterface 0 > bInterfaceCount 2 > bFunctionClass 2 Communications > bFunctionSubClass 6 Ethernet Networking > bFunctionProtocol 0 > iFunction 6 RNDIS > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 0 > bAlternateSetting 0 > bNumEndpoints 1 > bInterfaceClass 2 Communications > bInterfaceSubClass 2 Abstract (modem) > bInterfaceProtocol 255 Vendor Specific (MSFT RNDIS?) > iInterface 4 RNDIS Communications Control > CDC Header: > bcdCDC 1.10 > CDC Call Management: > bmCapabilities 0x00 > bDataInterface 1 > CDC ACM: > bmCapabilities 0x00 > CDC Union: > bMasterInterface 0 > bSlaveInterface 1 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x83 EP 3 IN > bmAttributes 3 > Transfer Type Interrupt > Synch Type None > Usage Type Data > wMaxPacketSize 0x0008 1x 8 bytes > bInterval 32 > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 1 > bAlternateSetting 0 > bNumEndpoints 2 > bInterfaceClass 10 CDC Data > bInterfaceSubClass 0 > bInterfaceProtocol 0 > iInterface 5 RNDIS Ethernet Data > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x81 EP 1 IN > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0040 1x 64 bytes > bInterval 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x02 EP 2 OUT > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0040 1x 64 bytes > bInterval 0 > Configuration Descriptor: > bLength 9 > bDescriptorType 2 > wTotalLength 32 > bNumInterfaces 1 > bConfigurationValue 1 > iConfiguration 0 > bmAttributes 0xc0 > Self Powered > MaxPower 2mA > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 0 > bAlternateSetting 0 > bNumEndpoints 2 > bInterfaceClass 2 Communications > bInterfaceSubClass 12 Ethernet Emulation > bInterfaceProtocol 7 Ethernet Emulation (EEM) > iInterface 8 CDC Ethernet Emulation Model (EEM) > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x81 EP 1 IN > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0040 1x 64 bytes > bInterval 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x02 EP 2 OUT > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0040 1x 64 bytes > bInterval 0 > Device Qualifier (for other device speed): > bLength 10 > bDescriptorType 6 > bcdUSB 2.00 > bDeviceClass 2 Communications > bDeviceSubClass 0 > bDeviceProtocol 0 > bMaxPacketSize0 64 > bNumConfigurations 2 > Device Status: 0x0001 > Self Powered > > > As I wrote in my initial mail: > I see no difference in both, which may offer a possibilty to act upon > when plugging in the one or the other (or both) devices/Ariettas. > > Before I mailed to the group I read the documentation you linked, but > may be I missed something which reveals the solution to this > problem... > But what did I miss?
Not sure you missed anything, but did you try to set up your own udev rules to invoke your script? I'm not particularly knowledgeable on writing udev rules, but something like this could work if you experiment with it: KERNEL=="usb[0-9]*", ATTR{idVendor}=="0525", ATTR{idProduct}=="a4a2", NAME="Arietta/%n", SUBSYSTEM=="net", ACTION=="add", RUN+="my_script %k start" KERNEL=="usb[0-9]*", ATTR{idVendor}=="0525", ATTR{idProduct}=="a4a2", NAME="Arietta/%n", SUBSYSTEM=="net", ACTION=="remove", RUN+="my_script %k stop" -- Regards, Mick
signature.asc
Description: This is a digitally signed message part.