我买了一个新的 N64 控制器,我正在使用 PyUSB 与它通信。我需要 productID 和 vendorID 来将我的计算机连接到控制器。
N64 控制器的每个 productID 和 vendorID 列表都在此站点上提供:https ://www.the-sz.com/products/usbid/index.php?v=&p=&n=N64%20Controller 。他们都没有工作。
我在设备属性中找到了我需要的 ID:ProductID:0575 VendorID:2563,但是当我连接到设备时,控制器使用了意外的数据包通信方案(通常是 32 位数据包用于用户通信)。
无论控制器输入如何,我确实收到的数据包始终是全 0 的 9 个字节。
DEVICE ID 2563:0575 on Bus 001 Address 004 =================
bLength : 0x12 (18 bytes)
bDescriptorType : 0x1 Device
bcdUSB : 0x200 USB 2.0
bDeviceClass : 0x0 Specified at interface
bDeviceSubClass : 0x0
bDeviceProtocol : 0x0
bMaxPacketSize0 : 0x40 (64 bytes)
idVendor : 0x2563
idProduct : 0x0575
bcdDevice : 0x100 Device 1.0
iManufacturer : 0x1 SWITCH CO.,LTD.
iProduct : 0x2 Controller (Dinput)
iSerialNumber : 0x3 AZ-RB-N64P-215 H0
bNumConfigurations : 0x1
CONFIGURATION 1: 500 mA ==================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x2 Configuration
wTotalLength : 0x29 (41 bytes)
bNumInterfaces : 0x1
bConfigurationValue : 0x1
iConfiguration : 0x0
bmAttributes : 0x80 Bus Powered
bMaxPower : 0xfa (500 mA)
INTERFACE 0: Human Interface Device ====================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x0
bAlternateSetting : 0x0
bNumEndpoints : 0x2
bInterfaceClass : 0x3 Human Interface Device
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x0
ENDPOINT 0x2: Interrupt OUT ==========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x2 OUT
bmAttributes : 0x3 Interrupt
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x5
ENDPOINT 0x81: Interrupt IN ==========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x81 IN
bmAttributes : 0x3 Interrupt
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x5
序列号没有鸭鸭结果,谷歌搜索产品 ID 和供应商 ID 显示与 neogeomini-pad 匹配的结果:http://technojapan.net/2018/08/02/neogeomini-pad/但那里的数据包通信方案类似,但与控制器不同。搜索 productID 和 vendorID 导致与 ZD-V+ 有线游戏控制器匹配:https ://www.the-sz.com/products/usbid/index.php?v=0x2563 。作为顶部的樱桃,控制器上有一个物理标签,上面写着“中国制造”,但控制器给出的制造商是位于苏丹的 SWITCH CO. LDT。
问题:如何让控制器发送对应于不同输入的非零字节流?
可能的解决方案:我在 PyUSB 的问答中读到,对于 HID 设备,最好使用 hid 模块。我阅读了 HID 设备是什么,而控制器可能是 HID 设备。我将尝试通过 pip 安装此模块并希望最好。