Re: udev et cie

Pàgina inicial

Reply to this message
Autor: moebius
Data:  
A: ML Guilde
Assumpte: Re: udev et cie
Bonjour,

udev n'a pas l'air de plaire bcp..... si quelqu'un avait toutefois un
exemple de règle à proposer...par exemple, dans ma règle, je n'ai pas
mis de KERNEL==, car je ne sais pas quoi mettre ; un conseil serait
bienvenu.

cordialement,


moebius a écrit :
> Bonjour,
>
> Je me suis aperçu que mon mess précédent n'apparaissait pas au bon
> endroit, je le reposte :
> ----------------------------------------------------------------------------
>
> Bonsoir,
>
> Voilà, j'ai acheté pour mon fils un adaptateur usb qui permet de
> brancher un pad de playstation sur son portable pour jouer à de vieux
> jeux atari st grâce à xsteem (bubble bobble, tjrs génial !).
>
> Problème, je n'arrive évidemment pas à faire fonctionner cette "'*///
> :!! d'adaptateur.
>
> lorsque je fait un cat /proc/bus/input/handlers , j'obtiens ça :
>
> I: Bus=0003 Vendor=0810 Product=0001 Version=0106
> N: Name="Twin USB Joystick"
> P: Phys=usb-0000:00:1d.1-1/input0
> S: Sysfs=/class/input/input7
> H: Handlers=
> B: EV=b
> B: KEY=ffffff 0 0 0 0 0 0 0 0 0
> B: ABS=f00ff
>
> On peut remarquert qu'il n'y a rien à Handlers, contrairement, par
> exemple, au clavier qui lui donne cela :
>
> I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
> N: Name="AT Translated Set 2 keyboard"
> P: Phys=isa0060/serio0/input0
> S: Sysfs=/class/input/input2
> H: Handlers=kbd
> B: EV=120013
> B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
> B: MSC=10
> B: LED=7
>
>
> Ensuite, je fais un udevinfo -a -p /class/input/input7, et j'obtiens :
> udevinfo starts with the device the node belongs to and then walks up the
> device chain, to print for every device found, all possibly useful
> attributes
> in the udev key format.
> Only attributes within one device section may be used together in one rule,
> to match the device for which the node will be created.
>
>  looking at class device '/sys/class/input/input7':
>    SUBSYSTEM=="input"
>    SYSFS{name}=="Twin USB Joystick"
>    SYSFS{phys}=="usb-0000:00:1d.1-1/input0"
>    SYSFS{uniq}==""

>
> follow the "device"-link to the physical device:
>  looking at the device chain at 
> '/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0':
>    BUS=="usb"
>    ID=="3-1:1.0"
>    DRIVER=="usbhid"
>    SYSFS{bAlternateSetting}==" 0"
>    SYSFS{bInterfaceClass}=="03"
>    SYSFS{bInterfaceNumber}=="00"
>    SYSFS{bInterfaceProtocol}=="00"
>    SYSFS{bInterfaceSubClass}=="00"
>    SYSFS{bNumEndpoints}=="01"
>    SYSFS{modalias}=="usb:v0810p0001d0106dc00dsc00dp00ic03isc00ip00"

>
>  looking at the device chain at 
> '/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1':
>    BUS=="usb"
>    ID=="3-1"
>    DRIVER=="usb"
>    SYSFS{bConfigurationValue}=="1"
>    SYSFS{bDeviceClass}=="00"
>    SYSFS{bDeviceProtocol}=="00"
>    SYSFS{bDeviceSubClass}=="00"
>    SYSFS{bMaxPacketSize0}=="8"
>    SYSFS{bMaxPower}=="500mA"
>    SYSFS{bNumConfigurations}=="1"
>    SYSFS{bNumInterfaces}==" 1"
>    SYSFS{bcdDevice}=="0106"
>    SYSFS{bmAttributes}=="80"
>    SYSFS{configuration}==""
>    SYSFS{devnum}=="6"
>    SYSFS{idProduct}=="0001"
>    SYSFS{idVendor}=="0810"
>    SYSFS{maxchild}=="0"
>    SYSFS{product}=="Twin USB Joystick"
>    SYSFS{speed}=="1.5"
>    SYSFS{version}==" 1.00"

>
>  looking at the device chain at 
> '/sys/devices/pci0000:00/0000:00:1d.1/usb3':
>    BUS=="usb"
>    ID=="usb3"
>    DRIVER=="usb"
>    SYSFS{bConfigurationValue}=="1"
>    SYSFS{bDeviceClass}=="09"
>    SYSFS{bDeviceProtocol}=="00"
>    SYSFS{bDeviceSubClass}=="00"
>    SYSFS{bMaxPacketSize0}=="64"
>    SYSFS{bMaxPower}=="  0mA"
>    SYSFS{bNumConfigurations}=="1"
>    SYSFS{bNumInterfaces}==" 1"
>    SYSFS{bcdDevice}=="0206"
>    SYSFS{bmAttributes}=="c0"
>    SYSFS{configuration}==""
>    SYSFS{devnum}=="1"
>    SYSFS{idProduct}=="0000"
>    SYSFS{idVendor}=="0000"
>    SYSFS{manufacturer}=="Linux 2.6.15-rc4 uhci_hcd"
>    SYSFS{maxchild}=="2"
>    SYSFS{product}=="UHCI Host Controller"
>    SYSFS{serial}=="0000:00:1d.1"
>    SYSFS{speed}=="12"
>    SYSFS{version}==" 1.10"

>
>  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.1':
>    BUS=="pci"
>    ID=="0000:00:1d.1"
>    DRIVER=="uhci_hcd"
>    SYSFS{class}=="0x0c0300"
>    SYSFS{device}=="0x2659"
>    SYSFS{irq}=="11"
>    SYSFS{local_cpus}=="3"
>    SYSFS{modalias}=="pci:v00008086d00002659sv00001179sd0000FF10bc0Csc03i00"
>    SYSFS{subsystem_device}=="0xff10"
>    SYSFS{subsystem_vendor}=="0x1179"
>    SYSFS{vendor}=="0x8086"

>
>  looking at the device chain at '/sys/devices/pci0000:00':
>    BUS==""
>    ID=="pci0000:00"
>    DRIVER=="unknown"

>
> J'ai essayé d'écrire une règle udev avec
> SYSFS{idProduct}=="0001",SYSFS{idVendor}=="0810", en donnant à la fin
> SYMLINK+="adaptplay", et en nommant le fichier de règles
> 10-adaptplay.rules, mais ça n'a rien donné, ni, en désepoir de cause, en
> donnant "js*" comme symlink dans un second temps.
>
> Bref, si quelqu'un a une idée....
>
> cordialement,
>
>
>
>