Re: Duda sobre la salida de lsusb
El 2023-04-20 a las 17:23 +0200, Luis Muñoz Fuente escribió: > > El 19/4/23 a las 20:57, Camaleón escribió: > > Hum... Es el acrónimo de «ifnum» (InterfaceNumber), pero hasta ahí puedo > > contar O:-) > > > > https://docs.kernel.org/driver-api/usb/usb.html > Ahí dice que If 0 y If 1 son distintas interfaces de una configuración de un > dispositivo USB. No sé que significará en el caso del teclado, pero algo me > ha aclarado. Gracias Camaleón. USB Descriptors https://www.beyondlogic.org/usbnutshell/usb5.shtml USB Report Protocol https://wiki.osdev.org/USB_Human_Interface_Devices#USB_Report_Protocol The interface descriptor could be seen as a header or grouping of the endpoints into a functional group performing a single feature of the device. For example you could have a multi-function fax/scanner/printer device. Interface descriptor one could describe the endpoints of the fax function, Interface descriptor two the scanner function and Interface descriptor three the printer function. Unlike the configuration descriptor, there is no limitation as to having only one interface enabled at a time. A device could have 1 or many interface descriptors enabled at once. Interface descriptors have a bInterfaceNumber field specifying the Interface number and a bAlternateSetting which allows an interface to change settings on the fly. For example we could have a device with two interfaces, interface one and interface two. Interface one has bInterfaceNumber set to zero indicating it is the first interface descriptor and a bAlternativeSetting of zero. Interface two would have a bInterfaceNumber set to one indicating it is the second interface and a bAlternativeSetting of zero (default). We could then throw in another descriptor, also with a bInterfaceNumber set to one indicating it is the second interface, but this time setting the bAlternativeSetting to one, indicating this interface descriptor can be an alternative setting to that of the other interface descriptor two. *** Conforme a la explicación anterior, y trasladado a un teclado multimedia, se me ocurre que pueda ser útil para agrupar funciones de combinaciones de las teclas: 1. Sonido → subir/bajar volumen, silenciar... 2. Pantalla → brillo, conmutar con monitor externo... 3. Control multimedia → iniciar, pausar, avanzar... Saludos, -- Camaleón
Re: Duda sobre la salida de lsusb
El 19/4/23 a las 20:57, Camaleón escribió: Hum... Es el acrónimo de «ifnum» (InterfaceNumber), pero hasta ahí puedo contar O:-) https://docs.kernel.org/driver-api/usb/usb.html Ahí dice que If 0 y If 1 son distintas interfaces de una configuración de un dispositivo USB. No sé que significará en el caso del teclado, pero algo me ha aclarado. Gracias Camaleón.
Re: Duda sobre la salida de lsusb
El 2023-04-19 a las 20:18 +0200, Luis Muñoz Fuente escribió: > Hola lista: > ¿Alguien sabe qué significa la columna If en la salida de lsusb -tv? > Pongo aquí la salida mostrando solo el teclado, que está conectado en el > bus 01, puerto 9 y es el device 3, pero aparecen dos entradas para el > mismo teclado: If 0 y If 1: > > $lsusb -tv > /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M > ID 1d6b:0002 Linux Foundation 2.0 root hub > |__ Port 9: Dev 3, If 0, Class=Human Interface Device, > Driver=usbhid, 1.5M > ID 046d:c31c Logitech, Inc. Keyboard K120 > |__ Port 9: Dev 3, If 1, Class=Human Interface Device, > Driver=usbhid, 1.5M > ID 046d:c31c Logitech, Inc. Keyboard K120 Hum... Es el acrónimo de «ifnum» (InterfaceNumber), pero hasta ahí puedo contar O:-) https://github.com/gregkh/usbutils/blob/master/lsusb-t.c https://docs.kernel.org/driver-api/usb/usb.html Saludos, -- Camaleón
Duda sobre la salida de lsusb
Hola lista: ¿Alguien sabe qué significa la columna If en la salida de lsusb -tv? Pongo aquí la salida mostrando solo el teclado, que está conectado en el bus 01, puerto 9 y es el device 3, pero aparecen dos entradas para el mismo teclado: If 0 y If 1: $lsusb -tv /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M ID 1d6b:0002 Linux Foundation 2.0 root hub |__ Port 9: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M ID 046d:c31c Logitech, Inc. Keyboard K120 |__ Port 9: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M ID 046d:c31c Logitech, Inc. Keyboard K120 Gracias