これは、すべての既知のUSBデバイスIDを含むオープンソースプロジェクトです。
キーボード、スキャナー、プリンター、マウスなど、Linuxで動作するUSBデバイスは、市場に何千とあります。これらのベンダーの詳細はUSB IDリポジトリに保存されています。
lsusb
$ lsusbBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 004: ID 046d:082c Logitech, Inc.Bus 001 Device 003: ID Kingston TechnologyBus 001 Device 002: ID 86Bus 001 Device 005: ID 051d:0002 American Power Conversion Uninterruptible Power SupplyBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
" は /dev/bus/usb ディレクトリをスキャンせず、与えられたデバイスファイルが属するデバイスの情報のみを表示します。デバイスファイルは /dev/bus/usb/ のようなものでなければなりません。このオプションはvオプションのように詳細な情報を表示しますが、そのためにはrootユーザーである必要があります。"
$ lsusb -D /dev/bus/usb/ |moreDevice: ID 86Device Descriptor:bLength 18bDescriptorType 1bcdUSB 1.10bDeviceClass 0 (Defined at Interface level)bDeviceSubClass 0bDeviceProtocol 0bMaxPacketSize0 8idVendor 0x18f8idProduct 0x8416bcdDevice 1.00iManufacturer 0iProduct 1iSerial 0bNumConfigurations 1Configuration Descriptor:bLength 9bDescriptorType 2wTotalLength 59bNumInterfaces 2bConfigurationValue 1iConfiguration 0bmAttributes 0xa0(Bus Powered)Remote WakeupMaxPower 100mAInterface Descriptor:bLength 9bDescriptorType 4bInterfaceNumber 0bAlternateSetting 0bNumEndpoints 1bInterfaceClass 3 Human Interface DevicebInterfaceSubClass 1 Boot Interface SubclassbInterfaceProtocol 2 MouseiInterface 0HID Device Descriptor:
USB ID
そのため、私自身だけでなく、他のLinuxユーザーのためにも、これらのフィールドに入力する方法を考えました。すでにオープンソースのプロジェクトがあることがわかりました:USB ID リポジトリ。これは、USBデバイスで使用されているすべての既知のIDのパブリック・リポジトリで、 USB Utilities含むさまざまなプログラムで、人間が読めるデバイス名を表示するためにも使用されています。
USB IDの更新
USB IDデータベースはusb.idsというファイルに保存されています。このファイルの場所はLinuxディストリビューションによって異なります。
Ubuntu 18.04では、このファイルは /var/lib/usbutilsあります。データベースを更新するには、update-usbidsコマンドを使用します。root権限またはsudoで実行する必要があります。
$ sudo update-usbids
新しいファイルがあれば、ダウンロードされます。現在のファイルはバックアップされ、新しいファイルに置き換えられます:
$ ls -latotal 4118drwxr-xr-x 2 root root 4096 Jan .drwxr-xr-x 85 root root 4096 Nov 7 08:05 ..-rw-r--r-- 1 root root Jan 9 15:34 usb.ids-rw-r--r-- 1 root root Jan usb.ids.old
Fedora Linux の最新バージョンは、データベースファイルを /usr/share/hwdata に保持します。また、更新スクリプトもありません。代わりに、データベースは hwdata と呼ばれるパッケージによって管理されています。
# dnf info hwdataInstalled PackagesName : hwdataVersion : 0.233Release : 1.fc31Architecture : noarchSize : 7.5 MSource : hwdata-0.332-1.fc31.src.rpmRepository : @SystemFrom repo : updatesSummary : Hardware identification and configuration dataURL : https://.//taLicense : GPLv2+Description : hwdata contains various hardware identification and configuration data,: such as the pci.ids and usb.ids databases.
$ lsusbBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 004: ID 046d:082c Logitech, Inc. HD Webcam C516Bus 001 Device 003: ID Kingston TechnologyBus 001 Device 014: ID 86 [Maxxter]Bus 001 Device 005: ID 051d:0002 American Power Conversion Uninterruptible Power SupplyBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
倉庫が新規および既存の機器の詳細を定期的に更新しているため、他の機器の説明が変更されていることにお気づきかもしれません。
新しいデータの提出
新しいデータを提出するには、ウェブサイトを使う方法と、特別にフォーマットしたパッチファイルをメールで送る方法の2つがあります。はじめに投稿のガイドラインを読みました。まず、アカウントを登録し、プロジェクトの投稿システムを使ってマウスのIDと名前を入力する必要がありました。USBデバイスを追加する手順は同じです。



