Projet

Général

Profil

Feature - Fonctionnalité #4755

Ajout du support des douchettes / scannettes USB pour lire les codes barres

Ajouté par Eric Seigne il y a environ 8 ans. Mis à jour il y a environ 8 ans.

Statut:
Fixed - Corrigé - Implémenté
Priorité:
Haute
Assigné à:
Version cible:
-
Début:
16/03/2016
Echéance:
% réalisé:

100%

Temps estimé:
10.00 h

Description

Le douchettes 928110 livrées dans les écoles ne sont pas directement utilisables, il faut les configurer et surtout faire en sorte qu'elles soient considérées comme des "claviers USA" lors de l'ajout ...

20160318-usb-scan_documentation.pdf (869 ko) Eric Seigne, 18/03/2016 10:31


Demandes liées

Lié à horizon-admin-tools - Bug #4754: Paquet 11.08.75 Fixed - Corrigé - Implémenté 15/03/2016

Révisions associées

Révision b8f94717
Ajouté par Eric Seigne il y a environ 8 ans

partial fix #4755 : detection et configuration de la douchette code barre pessac BCD

Historique

#1 Mis à jour par Eric Seigne il y a environ 8 ans

Il faut développer "deux" solutions, la 1ere pour que ça marche "à chaud" est celle-ci:

Dès qu'on aura les bons identifiants (lsusb -v à faire quand la douchette est branchée une fois)
  • fichier /etc/udev/rules.d/90-horizon-usb-scancode.rules
  • fichier /usr/bin/horizon-usb-scancode

Dans le 1er fichier il faut remplacer les id qu'on aura avec le lsusb

ATTR{idVendor}=="05e0", ATTR{idProduct}=="1200" 

Dans le second il faut changer la signature retournée lorsqu'on fait un xinput --list sur le poste et que la douchette est branchée

SIGNATURE="Bar Code" 

#2 Mis à jour par Eric Seigne il y a environ 8 ans

La seconde partie concerne la situation où la douchette est présente dès le boot du pc et/ou avant que l'utilisateur ne s'authentifie ...

Il faut créer un fichier /usr/share/X11/xorg.conf.d/90-horizon-usb-scancode.conf

Section "InputClass" 
    Identifier "maDouchette" 
    MatchProduct "bmabmabma" 
    MatchVendor "bmabmabma" 
    Option "XkbModel" "pc105" 
    Option "XkbLayout" "us" 
EndSection

#3 Mis à jour par Eric Seigne il y a environ 8 ans

Bon, les douchettes ref 928110 sont

  • lsusb
Bus 002 Device 040: ID 04b4:0100 Cypress Semiconductor Corp. 
  • lsusb -v
Bus 002 Device 040: ID 04b4:0100 Cypress Semiconductor Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x04b4 Cypress Semiconductor Corp.
  idProduct          0x0100 
  bcdDevice            0.01
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              300mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              5 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      63
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
  • xinput list
    ↳ Future             USB Virtual PS2 Port        id=11    [slave  keyboard (3)]

#4 Mis à jour par Eric Seigne il y a environ 8 ans

#5 Mis à jour par Eric Seigne il y a environ 8 ans

Voilà ma méthode pour trouver le MatchVendor et MatchProduct ...

  • find /dev/input/ avant de brancher la scannette
  • find /dev/input/ après avoir branché la scannette -> je vois quel dev/input/event* est en plus ... je pouvais aussi l'avoir dans les logs et toussa, bref ensuite
udevadm info --query=all --path=$(udevadm info --query=path --name=/dev/input/event7)

P: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input42/event7
N: input/event7
S: char/13:71
S: input/by-id/usb-Future_USB_Virtual_PS2_Port-event-kbd
S: input/by-path/pci-0000:00:1d.0-usb-0:1.2:1.0-event-kbd
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input42/event7
E: MAJOR=13
E: MINOR=71
E: DEVNAME=/dev/input/event7
E: SUBSYSTEM=input
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_VENDOR=Future
E: ID_VENDOR_ENC=Future\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_VENDOR_ID=04b4
E: ID_MODEL=USB_Virtual_PS2_Port
E: ID_MODEL_ENC=USB\x20Virtual\x20PS2\x20Port\x20\x20\x20\x20
E: ID_MODEL_ID=0100
E: ID_REVISION=0001
E: ID_SERIAL=Future_USB_Virtual_PS2_Port
E: ID_TYPE=hid
E: ID_BUS=usb
E: ID_USB_INTERFACES=:030101:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=usbhid
E: ID_PATH=pci-0000:00:1d.0-usb-0:1.2:1.0
E: DEVLINKS=/dev/char/13:71 /dev/input/by-id/usb-Future_USB_Virtual_PS2_Port-event-kbd /dev/input/by-path/pci-0000:00:1d.0-usb-0:1.2:1.0-event-kbd
E: XKBLAYOUT=fr
E: XKBVARIANT=oss

Je vais essayer de mettre ID_VENDOR=Future et ID_MODEL=USB_Virtual_PS2_Port ... et vous dis si ça marche

#6 Mis à jour par Eric Seigne il y a environ 8 ans

  • Statut changé de Assigned - En cours à Fixed - Corrigé - Implémenté
  • % réalisé changé de 0 à 100
Bilan de la journée, tout est ok, diffusé dans le paquet horizon-shell-tools:
  • règle udev
  • script lancé
  • fork appliqué pour avoir la disponibilité des xinput --list

Formats disponibles : Atom PDF

Redmine Appliance - Powered by TurnKey Linux