Différences
Ci-dessous, les différences entre deux révisions de la page.
informatique:systeme:matos:udev [2016/03/21 15:57] – créée bn8 | informatique:systeme:matos:udev [2016/03/21 17:23] (Version actuelle) – bn8 | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
< | < | ||
+ | |||
+ | ===== Règle d' | ||
+ | |||
+ | * Récupérer les ID Vendeur et Modèle de votre device USB : <code bash> | ||
+ | Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | Bus 011 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | Bus 009 Device 005: ID 08e6:3438 Gemplus GemPC Key SmartCard Reader | ||
+ | Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub | ||
+ | Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub | ||
+ | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub</ | ||
+ | |||
+ | * Créer le fichier XML de déclaration du device dans / | ||
+ | < | ||
+ | <vendor id=' | ||
+ | <product id=' | ||
+ | </ | ||
+ | <alias name=' | ||
+ | </ | ||
+ | |||
+ | * A l'aide du script suivant, identifier le device USB correspondant : <code bash> | ||
+ | MODEL=3438 | ||
+ | for X in / | ||
+ | if [ " | ||
+ | then | ||
+ | echo " | ||
+ | fi | ||
+ | done</ | ||
+ | |||
+ | * Afficher toutes les informations du device vue par UDEV : <code bash> | ||
+ | looking at device '/ | ||
+ | KERNEL==" | ||
+ | SUBSYSTEM==" | ||
+ | DRIVER==" | ||
+ | [...] | ||
+ | ATTR{idVendor}==" | ||
+ | [...] | ||
+ | ATTR{idProduct}==" | ||
+ | [...]</ | ||
+ | |||
+ | * Construire la règle équivalente UDEV correspondante dans le fichier /// | ||
+ | ACTION==" | ||
+ | ACTION==" | ||
+ | |||
+ | * Recharger les règles UDEV : <code bash> | ||
+ | |||
+ | * Tester l' | ||
+ | run_command: | ||
+ | adm_test: version 175 | ||
+ | This program is for debugging only, it does not run any program, | ||
+ | specified by a RUN key. It may show incorrect results, because | ||
+ | some values may be different, or not available at a simulation run. | ||
+ | |||
+ | parse_file: reading '/ | ||
+ | [...] | ||
+ | parse_file: reading '/ | ||
+ | [...] | ||
+ | ACTION=add | ||
+ | [...] | ||
+ | DRIVER=usb | ||
+ | ID_BUS=usb | ||
+ | [...] | ||
+ | ID_MODEL_ID=3438 | ||
+ | [...] | ||
+ | ID_VENDOR=Gemplus | ||
+ | ID_VENDOR_ENC=Gemplus | ||
+ | ID_VENDOR_ID=08e6 | ||
+ | [...] | ||
+ | PRODUCT=8e6/ | ||
+ | SUBSYSTEM=usb | ||
+ | [...] | ||
+ | run: '/ | ||
+ | # udevadm test --action=' | ||
+ | [...] | ||
+ | run: '/ | ||
+ | </ | ||
+ | |||
+ | Si vous avez bien la ligne '' |