View previous topic :: View next topic |
Author |
Message |
SvenFischer Veteran
Joined: 05 Feb 2003 Posts: 1033 Location: Berlin
|
Posted: Thu Nov 13, 2008 9:42 pm Post subject: udev: alles andere als benutzerfreundlich [dummheit gelöst] |
|
|
Ich habe mir einen Bluetooth USB-Stick gekauft. Der Broadcom-chipsatz wird auch vom Kernel unterstützt, nur leider müssen ein paar Befehle ausgeführt werden, damit er richtig läuft.
Also schreib ich mir eine udev-Regel und immer beim reinstöpseln soll das Script gestartet werden, denkste!
Man muß sich abmühen um soetwas hinzubekommen und nu weiss ich nicht mehr weiter, es will nicht
Code: |
IBMR51 sven # udevinfo -a -p /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.3/3-2.3:1.0
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.3/3-2.3:1.0':
KERNEL=="3-2.3:1.0"
SUBSYSTEM=="usb"
DRIVER=="hci_usb"
ATTR{bInterfaceNumber}=="00"
ATTR{bAlternateSetting}==" 0"
ATTR{bNumEndpoints}=="03"
ATTR{bInterfaceClass}=="e0"
ATTR{bInterfaceSubClass}=="01"
ATTR{bInterfaceProtocol}=="01"
ATTR{modalias}=="usb:v0A5Cp2157d0387dcE0dsc01dp01icE0isc01ip01"
looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.3':
KERNELS=="3-2.3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 4"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="a0"
ATTRS{bMaxPower}==" 2mA"
ATTRS{urbnum}=="1853"
ATTRS{idVendor}=="0a5c"
ATTRS{idProduct}=="2157"
ATTRS{bcdDevice}=="0387"
ATTRS{bDeviceClass}=="e0"
ATTRS{bDeviceSubClass}=="01"
ATTRS{bDeviceProtocol}=="01"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="12"
ATTRS{busnum}=="3"
ATTRS{devnum}=="33"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Broadcom Corp"
ATTRS{product}=="USB-500"
ATTRS{serial}=="000A3A64B0B4"
looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-2':
KERNELS=="3-2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="a0"
ATTRS{bMaxPower}==" 94mA"
ATTRS{urbnum}=="66"
ATTRS{idVendor}=="0a5c"
ATTRS{idProduct}=="4500"
ATTRS{bcdDevice}=="0100"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{speed}=="12"
ATTRS{busnum}=="3"
ATTRS{devnum}=="30"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="3"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Broadcom"
ATTRS{product}=="BCM2046B1"
|
----------------------------------------
/etc/udev/rules.d/10-sven.rules
Code: |
KERNELS=="3-2", DRIVERS=="usb", SUBSYSTEM=="usb", ATTRS{product}=="BCM2046B1", RUN+="/etc/bluetooth/udev_anycom"
|
Warum heisst das eigenlich KERNELS?
Ich hab schon rumgespielt wie ein wilder, das Leben wird auch nicht einfacher, wenn man sich die Ausgabe ansieht von
lsusb:
Code: |
Bus 001 Device 001: ID 1d6b:0002
Bus 004 Device 001: ID 1d6b:0001
Bus 003 Device 049: ID 0a5c:2157 Broadcom Corp.
Bus 003 Device 048: ID 0a5c:4503 Broadcom Corp.
Bus 003 Device 047: ID 0a5c:4502 Broadcom Corp.
Bus 003 Device 046: ID 0a5c:4500 Broadcom Corp.
Bus 003 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0001
|
Da werden gleich 4 Geräte für den selben Stick angezeigt.
Last edited by SvenFischer on Fri Nov 14, 2008 1:54 pm; edited 1 time in total |
|
Back to top |
|
|
mastacloak Apprentice
Joined: 01 Aug 2004 Posts: 174 Location: Berlin / Germany
|
Posted: Fri Nov 14, 2008 1:31 pm Post subject: Re: udev: alles andere als benutzerfreundlich |
|
|
SvenFischer wrote: |
Code: |
KERNELS=="3-2", DRIVERS=="usb", SUBSYSTEM=="usb", ATTRS{product}=="BCM2046B1", RUN+="/etc/bluetooth/udev_anycom"
|
Warum heisst das eigenlich KERNELS?
|
Keine Ahnung. Aber bei SUBSYSTEM in Deinen Rules fehlt zumindest das S, damit der Stick erkannt werden kann (siehe Ausgabe von udevinfo). Vielleicht hilft das ja.
Gruß |
|
Back to top |
|
|
SvenFischer Veteran
Joined: 05 Feb 2003 Posts: 1033 Location: Berlin
|
Posted: Fri Nov 14, 2008 1:53 pm Post subject: |
|
|
Der Fehler saß (außnahmsweise ) vor der Tastatur: in dem Script fehlte schlichtweg "#!/bin/bash", un da beim RUN Kommando das ebenfalls fehlte, konnte es natürlich nicht gestartet werden.
Ich lerne gerade meine erste Programmiersprache Ruby. Mein Ziel ist nun geworden ein Frontend für soetwas zu programmieren: Stick einstecken, auswählen, sagen was passieren soll und schon ist es eingerichtet. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|