From 1770fd79fd627b74e2bcc924fb18840136869ee8 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Thu, 12 Sep 2024 10:13:57 +0100 Subject: [PATCH 1/3] Use a macro to simplify declaring byte types. --- src/usb.rs | 80 ++++++++++++++---------------------------------------- 1 file changed, 21 insertions(+), 59 deletions(-) diff --git a/src/usb.rs b/src/usb.rs index 6ae78ab9..5e64ec89 100644 --- a/src/usb.rs +++ b/src/usb.rs @@ -120,60 +120,27 @@ pub fn validate_packet(packet: &[u8]) -> Result> { } } -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct DeviceAddr(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct DeviceField(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct StringId(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct ConfigNum(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct ConfigField(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct InterfaceNum(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct InterfaceField(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct InterfaceEpNum(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct EndpointNum(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct EndpointField(pub u8); - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct EndpointAddr(pub u8); +macro_rules! byte_type { + ($name: ident) => { + #[derive(Copy, Clone, Debug, PartialEq, Eq, Default, + Pod, Zeroable, From, Into, Display)] + #[repr(transparent)] + pub struct $name(pub u8); + } +} + +byte_type!(DeviceAddr); +byte_type!(DeviceField); +byte_type!(StringId); +byte_type!(ConfigNum); +byte_type!(ConfigField); +byte_type!(InterfaceNum); +byte_type!(InterfaceField); +byte_type!(InterfaceEpNum); +byte_type!(EndpointNum); +byte_type!(EndpointField); +byte_type!(EndpointAddr); +byte_type!(EndpointAttr); impl EndpointAddr { pub fn number(&self) -> EndpointNum { @@ -193,11 +160,6 @@ impl EndpointAddr { } } -#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] -#[repr(transparent)] -pub struct EndpointAttr(pub u8); - impl EndpointAttr { pub fn endpoint_type(&self) -> EndpointType { EndpointType::from(self.0 & 0x03) From 650da3ad6926db88afd23da931ca085741d8b618 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Thu, 12 Sep 2024 10:36:47 +0100 Subject: [PATCH 2/3] Fix handling of alternate interface settings. Interfaces need to be stored by (interface number, alternate setting). Previously, we were only using the interface number as a storage key. Descriptors for alternate settings were overwriting previously seen descriptors that had the same interface number. --- src/capture.rs | 42 ++++++++++++++++++++++++++---------------- src/usb.rs | 41 +++++++++++++++++++++++------------------ 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/src/capture.rs b/src/capture.rs index 21130a3a..dd01857b 100644 --- a/src/capture.rs +++ b/src/capture.rs @@ -228,12 +228,12 @@ pub enum DeviceItem { ConfigurationDescriptor(DeviceId, ConfigNum), ConfigurationDescriptorField(DeviceId, ConfigNum, ConfigField, DeviceVersion), - Interface(DeviceId, ConfigNum, InterfaceNum), - InterfaceDescriptor(DeviceId, ConfigNum, InterfaceNum), - InterfaceDescriptorField(DeviceId, ConfigNum, - InterfaceNum, InterfaceField, DeviceVersion), - EndpointDescriptor(DeviceId, ConfigNum, InterfaceNum, InterfaceEpNum), - EndpointDescriptorField(DeviceId, ConfigNum, InterfaceNum, + Interface(DeviceId, ConfigNum, ConfigIfaceNum), + InterfaceDescriptor(DeviceId, ConfigNum, ConfigIfaceNum), + InterfaceDescriptorField(DeviceId, ConfigNum, ConfigIfaceNum, + InterfaceField, DeviceVersion), + EndpointDescriptor(DeviceId, ConfigNum, ConfigIfaceNum, InterfaceEpNum), + EndpointDescriptorField(DeviceId, ConfigNum, ConfigIfaceNum, InterfaceEpNum, EndpointField, DeviceVersion), } @@ -385,7 +385,7 @@ impl DeviceData { if let Some(number) = self.config_number.load().as_ref() { if let Some(config) = &self.configurations.load().get(**number) { self.endpoint_details.update(|endpoint_details| { - for iface in &config.interfaces { + for iface in config.interfaces.values() { for ep_desc in &iface.endpoint_descriptors { let ep_addr = ep_desc.endpoint_address; let ep_type = ep_desc.attributes.endpoint_type(); @@ -497,12 +497,13 @@ impl DeviceData { } impl Configuration { - pub fn interface(&self, number: &InterfaceNum) + pub fn interface(&self, number: &ConfigIfaceNum) -> Result<&Interface, Error> { - match self.interfaces.get(*number) { + let index = number.0 as usize; + match self.interfaces.values().nth(index) { Some(iface) => Ok(iface), - _ => bail!("Configuration has no interface {number}") + _ => bail!("Configuration has no interface with index {index}") } } } @@ -1641,7 +1642,7 @@ impl ItemSource for CaptureReader { Configuration(dev, conf) => match index { 0 => ConfigurationDescriptor(*dev, *conf), n => Interface(*dev, *conf, - InterfaceNum((n - 1).try_into()?)), + ConfigIfaceNum((n - 1).try_into()?)), }, ConfigurationDescriptor(dev, conf) => ConfigurationDescriptorField(*dev, *conf, @@ -1696,9 +1697,8 @@ impl ItemSource for CaptureReader { }, Some(Interface(dev, conf, iface)) => match self.try_configuration(dev, conf) { - Some(conf) => - (Ongoing, - 1 + conf.interface(iface)?.endpoint_descriptors.len()), + Some(conf) => (Ongoing, + 1 + conf.interface(iface)?.endpoint_descriptors.len()), None => (Ongoing, 0) }, Some(InterfaceDescriptor(..)) => @@ -1747,8 +1747,18 @@ impl ItemSource for CaptureReader { let strings = data.strings.load(); config_descriptor.field_text(*field, strings.as_ref()) }, - Interface(_, _, iface) => format!( - "Interface {iface}"), + Interface(dev, conf, iface) => { + let data = self.device_data(dev)?; + let config = data.configuration(conf)?; + let iface_desc = config.interface(iface)?.descriptor; + let num = iface_desc.interface_number; + match iface_desc.alternate_setting { + InterfaceAlt(0) => format!( + "Interface {num}"), + InterfaceAlt(alt) => format!( + "Interface {num} (alternate {alt})"), + } + }, InterfaceDescriptor(..) => "Interface descriptor".to_string(), InterfaceDescriptorField(dev, conf, iface, field, _ver) => { diff --git a/src/usb.rs b/src/usb.rs index 5e64ec89..1c52467f 100644 --- a/src/usb.rs +++ b/src/usb.rs @@ -1,3 +1,4 @@ +use std::collections::BTreeMap; use std::mem::size_of; use bytemuck_derive::{Pod, Zeroable}; @@ -122,8 +123,9 @@ pub fn validate_packet(packet: &[u8]) -> Result> { macro_rules! byte_type { ($name: ident) => { - #[derive(Copy, Clone, Debug, PartialEq, Eq, Default, - Pod, Zeroable, From, Into, Display)] + #[derive(Copy, Clone, Debug, Default, + PartialEq, Eq, PartialOrd, Ord, + Pod, Zeroable, From, Into, Display)] #[repr(transparent)] pub struct $name(pub u8); } @@ -134,7 +136,9 @@ byte_type!(DeviceField); byte_type!(StringId); byte_type!(ConfigNum); byte_type!(ConfigField); +byte_type!(ConfigIfaceNum); byte_type!(InterfaceNum); +byte_type!(InterfaceAlt); byte_type!(InterfaceField); byte_type!(InterfaceEpNum); byte_type!(EndpointNum); @@ -629,7 +633,7 @@ pub struct InterfaceDescriptor { pub length: u8, pub descriptor_type: u8, pub interface_number: InterfaceNum, - pub alternate_setting: u8, + pub alternate_setting: InterfaceAlt, pub num_endpoints: u8, pub interface_class: u8, pub interface_subclass: u8, @@ -764,28 +768,29 @@ pub struct Interface { pub struct Configuration { pub descriptor: ConfigDescriptor, - pub interfaces: VecMap, + pub interfaces: BTreeMap<(InterfaceNum, InterfaceAlt), Interface>, } impl Configuration { pub fn from_bytes(bytes: &[u8]) -> Option { let mut result: Option = None; - let mut iface_num: Option = None; + let mut iface_key: Option<(InterfaceNum, InterfaceAlt)> = None; for descriptor in DescriptorIterator::from(bytes) { match descriptor { Descriptor::Configuration(config_desc) => { result = Some(Configuration { descriptor: config_desc, - interfaces: - VecMap::with_capacity( - config_desc.num_interfaces), + interfaces: BTreeMap::new(), }); }, Descriptor::Interface(iface_desc) => { if let Some(config) = result.as_mut() { - iface_num = Some(iface_desc.interface_number); - config.interfaces.set( - iface_desc.interface_number, + let iface_num = iface_desc.interface_number; + let iface_alt = iface_desc.alternate_setting; + let key = (iface_num, iface_alt); + iface_key = Some(key); + config.interfaces.insert( + key, Interface { descriptor: iface_desc, endpoint_descriptors: @@ -796,13 +801,11 @@ impl Configuration { } }, Descriptor::Endpoint(ep_desc) => { - if let Some(config) = result.as_mut() { - if let Some(num) = iface_num { - if let Some(iface) = - config.interfaces.get_mut(num) - { - iface.endpoint_descriptors.push(ep_desc); - } + if let (Some(config), Some(key)) = + (result.as_mut(), iface_key) + { + if let Some(iface) = config.interfaces.get_mut(&key) { + iface.endpoint_descriptors.push(ep_desc); } } }, @@ -1035,8 +1038,10 @@ pub mod prelude { DeviceField, StringId, ConfigNum, + ConfigIfaceNum, ConfigField, InterfaceNum, + InterfaceAlt, InterfaceField, InterfaceEpNum, EndpointNum, From dc41dffa92f955452ea591a2573052f25f81d9c5 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Thu, 12 Sep 2024 15:32:25 +0100 Subject: [PATCH 3/3] Add tests for alternate interface settings. --- tests/ksolti-core-enum/capture.pcap | Bin 0 -> 4651 bytes tests/ksolti-core-enum/reference.txt | 296 +++++++++++++++++++++++++++ tests/tests.txt | 1 + tests/ui/alt-settings/actions.json | 30 +++ tests/ui/alt-settings/reference.txt | 241 ++++++++++++++++++++++ tests/ui/tests.txt | 1 + 6 files changed, 569 insertions(+) create mode 100644 tests/ksolti-core-enum/capture.pcap create mode 100644 tests/ksolti-core-enum/reference.txt create mode 100644 tests/ui/alt-settings/actions.json create mode 100644 tests/ui/alt-settings/reference.txt diff --git a/tests/ksolti-core-enum/capture.pcap b/tests/ksolti-core-enum/capture.pcap new file mode 100644 index 0000000000000000000000000000000000000000..c23d99f4183172c352e97757b0cac4eadd1f6ccb GIT binary patch literal 4651 zcmZXX3se+k6vw}r*#TBD5REhw$QG%i!U%dYMerHXnrWGxEPR0=ERxAPL*T0P*wE8@>FB}$2Xw48n zdy-}nTKhDhpLZn?dZ7W(f=lUy%Ea__Bk~EAi|L1DtRqw*cA~m{E1`8_Cp^FJCbWJN zwAaQSB(%W=C_DEUp~?|}t{(iH(8kk%!fyOP=*0D>p8``fd{v06?CfZ7)WT-N1idC(yONR%SFcRTn-C&RO)igqKZ`RJX$cC3DqD-dF*qGQewXWH1Dm!xnTradI znqB`ImxOW|aqaXZtPv5X)c2}+aZi$=^M0_LcWV2?q4~nYBovVz)0bd#87VG+kc@OO zXbJiW*@E%OD3g(z;*zbA?qpwyNI|K|W_frm$z`OIO;jTyx$9EULe>m!OEHG>6tH+C zC(C5dvUI+(SSkx)Q~9eEYzfmUA!^#cDQ44o^Os^n8TC;YAsO}8+@)sO#g#<(&l4QoWywI_Sk-0^i99X)?-pNMqv7ZQrYus+I# z&1IynNrYsioJU;fCu9+`(orTO5zY@=VQ!w8 zMM9bKPzfQK@|jAD%wEn zm$Hnpe2ZW?BQ=8=ERsFIe;RBwe~#imqxiqE{Mler#Oo+Fjz5p#YaF|8zc?Cs*=QtA z$>TmbIE>r^HIR_pf`(x^X4&xQT$ITz$cWGFxdlvR%+B`O!1Y2}u37$P9m(YutZt(k zu?6SsZnTg!rGak4m-mC^w5u(OuIPs&2WNxF_z7;a$DDl9%Vg`z3CU!|H5M6j<)N)i z_K-Wznyf{+V+^>yza`J?`r3Jt%c;wLr5cg!LflHUkTq-OtTd+bey}K+PhVzJ_y?>V ztQ3X6aPXT5TLQmRarCii-i-BksEVR6{v{?K0S+&DHwf#6LA8kE~ zA6MO4%-5l5s>a4=lMAf2gEI@z z*2(q!!S((Q-je@kaO&`f7tf~pd-Lz;51HZ<3N8w`@x(o=zsUew->^cnZPasxR@<(E zLbUbtFtH5+lQN};37-H=_}u}{Ho!bva4py#9bII$ty@=wwvAi=fSMEA2+6~}Z+8(+ z;_ObjO23toOSmtlwD_tDjJry|H7;WZCW6bZgktj~i(89v5@|d4tzxwGa1(xb6^$`( zepV@y#eOR~-*r{>vO6?I<2wy6R5(DYU02je+=uC*{8zhP@_G^2Zc8sQ+iqJ^VzrH_ zDlta!T3AkX68|ZhXg+;y3jZ6{X6GLgD!lO4Re0N5FNLRj#a|rj`<0pvDyEmBfxNCi zc#M#|t`97*$l^b(L|J2PUzokzZ#$uFnSgv7>k-MTUwN~hu6|~R^ON7cheCDd>3Z{Q zpAFoJa=GU@ckjd+arKW6ZLrn^MG}(pC&xCROngxH>C=QVIoZv?CYr3+%hr86Gzum= zHm=DmznnsHIoY`^su7dv$D7eY*3_J7rti^kt>FqZPrlS_Za#g?ZWPKxl0TV{j1)9; zw^`QjNDInjq$f_bSR;kA&Y!{6{YQ&gzR}T&ayhOsx)p0gq>8a^)|!!1+Kkb>A1r6M z<#s59e{*K@TU!?kVeu@3-{3Ccx33Drdbx)ykr(2mCext{uwP<`wF*Xf(l literal 0 HcmV?d00001 diff --git a/tests/ksolti-core-enum/reference.txt b/tests/ksolti-core-enum/reference.txt new file mode 100644 index 00000000..f67f5240 --- /dev/null +++ b/tests/ksolti-core-enum/reference.txt @@ -0,0 +1,296 @@ +9 SOF groups + 30 SOF packets + SOF packet with frame number 884, CRC 0C + SOF packet with frame number 885, CRC 13 + SOF packet with frame number 886, CRC 1B + SOF packet with frame number 887, CRC 04 + SOF packet with frame number 888, CRC 05 + SOF packet with frame number 889, CRC 1A + SOF packet with frame number 890, CRC 12 + SOF packet with frame number 891, CRC 0D + SOF packet with frame number 892, CRC 02 + SOF packet with frame number 893, CRC 1D + SOF packet with frame number 894, CRC 15 + SOF packet with frame number 895, CRC 0A + SOF packet with frame number 896, CRC 1B + SOF packet with frame number 897, CRC 04 + SOF packet with frame number 898, CRC 0C + SOF packet with frame number 899, CRC 13 + SOF packet with frame number 900, CRC 1C + SOF packet with frame number 901, CRC 03 + SOF packet with frame number 902, CRC 0B + SOF packet with frame number 903, CRC 14 + SOF packet with frame number 904, CRC 15 + SOF packet with frame number 905, CRC 0A + SOF packet with frame number 906, CRC 02 + SOF packet with frame number 907, CRC 1D + SOF packet with frame number 908, CRC 12 + SOF packet with frame number 909, CRC 0D + SOF packet with frame number 910, CRC 05 + SOF packet with frame number 911, CRC 1A + SOF packet with frame number 912, CRC 07 + SOF packet with frame number 913, CRC 18 + 4 SOF packets + SOF packet with frame number 914, CRC 10 + SOF packet with frame number 915, CRC 0F + SOF packet with frame number 916, CRC 00 + SOF packet with frame number 917, CRC 1F + 2 SOF packets + SOF packet with frame number 918, CRC 17 + SOF packet with frame number 919, CRC 08 + 1 SOF packets + SOF packet with frame number 920, CRC 09 + 1 SOF packets + SOF packet with frame number 921, CRC 16 + 1 SOF packets + SOF packet with frame number 922, CRC 1E + 2 SOF packets + SOF packet with frame number 923, CRC 01 + SOF packet with frame number 924, CRC 0E + 1 SOF packets + SOF packet with frame number 925, CRC 11 + 4 SOF packets + SOF packet with frame number 926, CRC 19 + SOF packet with frame number 927, CRC 06 + SOF packet with frame number 928, CRC 0A + SOF packet with frame number 929, CRC 15 +Setting address to 27 for device 0 + SETUP transaction on 0.0 with 8 data bytes, ACK: [00, 05, 1B, 00, 00, 00, 00, 00] + SETUP packet on 0.0, CRC 02 + DATA0 packet with CRC 1FE9 and 8 data bytes: [00, 05, 1B, 00, 00, 00, 00, 00] + ACK packet + IN transaction on 0.0, NAK + IN packet on 0.0, CRC 02 + NAK packet + IN transaction on 0.0 with no data, ACK + IN packet on 0.0, CRC 02 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting device descriptor #0 for device 27, reading 8 bytes + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 00, 01, 00, 00, 08, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC 94EB and 8 data bytes: [80, 06, 00, 01, 00, 00, 08, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 8 data bytes, ACK: [12, 01, 00, 02, EF, 02, 01, 40] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 55C3 and 8 data bytes: [12, 01, 00, 02, EF, 02, 01, 40] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting device descriptor #0 for device 27, reading 18 bytes + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 00, 01, 00, 00, 12, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC F4E0 and 8 data bytes: [80, 06, 00, 01, 00, 00, 12, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 18 data bytes, ACK: [12, 01, 00, 02, EF, 02, 01, 40, C0, 16, 44, 04, 00, 02, 01, 05, 03, 01] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC CAB3 and 18 data bytes: [12, 01, 00, 02, EF, 02, 01, 40, C0, 16, 44, 04, 00, 02, 01, 05, 03, 01] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting string descriptor #5, language 0x0409 (English/US) for device 27, reading 2 bytes + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 05, 03, 09, 04, 02, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC FCD6 and 8 data bytes: [80, 06, 05, 03, 09, 04, 02, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 2 data bytes, ACK: [1A, 03] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 2EB5 and 2 data bytes: [1A, 03] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting string descriptor #5, language 0x0409 (English/US) for device 27, reading 26 bytes: 'Ksoloti Core' + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 05, 03, 09, 04, 1A, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC FCDC and 8 data bytes: [80, 06, 05, 03, 09, 04, 1A, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 26 data bytes, ACK: [1A, 03, 4B, 00, 73, 00, 6F, 00, 6C, 00, 6F, 00, 74, 00, 69, 00, 20, 00, 43, 00, 6F, 00, 72, 00, 65, 00] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 8E03 and 26 data bytes: [1A, 03, 4B, 00, 73, 00, 6F, 00, 6C, 00, 6F, 00, 74, 00, 69, 00, 20, 00, 43, 00, 6F, 00, 72, 00, 65, 00] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting string descriptor #1, language 0x0409 (English/US) for device 27, reading 2 bytes + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 01, 03, 09, 04, 02, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC 78D7 and 8 data bytes: [80, 06, 01, 03, 09, 04, 02, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 2 data bytes, ACK: [10, 03] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 8EB3 and 2 data bytes: [10, 03] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting string descriptor #1, language 0x0409 (English/US) for device 27, reading 16 bytes: 'Ksoloti' + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 01, 03, 09, 04, 10, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC D8DB and 8 data bytes: [80, 06, 01, 03, 09, 04, 10, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 16 data bytes, ACK: [10, 03, 4B, 00, 73, 00, 6F, 00, 6C, 00, 6F, 00, 74, 00, 69, 00] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC FE08 and 16 data bytes: [10, 03, 4B, 00, 73, 00, 6F, 00, 6C, 00, 6F, 00, 74, 00, 69, 00] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting string descriptor #3, language 0x0409 (English/US) for device 27, reading 2 bytes + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 03, 03, 09, 04, 02, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC 9AD6 and 8 data bytes: [80, 06, 03, 03, 09, 04, 02, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 2 data bytes, ACK: '2\x03' + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 2EAB and 2 data bytes: '2\x03' + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting string descriptor #3, language 0x0409 (English/US) for device 27, reading 50 bytes: '002900193133510B33383438' + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 03, 03, 09, 04, 32, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC 9AC2 and 8 data bytes: [80, 06, 03, 03, 09, 04, 32, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 50 data bytes, ACK: [32, 03, 30, 00, 30, 00, 32, 00, 39, 00, 30, 00, 30, 00, 31, 00, 39, 00, 33, 00, 31, 00, 33, 00, 33, 00, 35, 00, 31, 00, 30, 00, 42, 00, 33, 00, 33, 00, 33, 00, 38, 00, 33, 00, 34, 00, 33, 00, 38, 00] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC B529 and 50 data bytes: [32, 03, 30, 00, 30, 00, 32, 00, 39, 00, 30, 00, 30, 00, 31, 00, 39, 00, 33, 00, 31, 00, 33, 00, 33, 00, 35, 00, 31, 00, 30, 00, 42, 00, 33, 00, 33, 00, 33, 00, 38, 00, 33, 00, 34, 00, 33, 00, 38, 00] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting configuration descriptor #0 for device 27, reading 9 bytes + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 00, 02, 00, 00, 09, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC 04AE and 8 data bytes: [80, 06, 00, 02, 00, 00, 09, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 9 data bytes, ACK: [09, 02, AA, 01, 05, 01, 05, C0, 32] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 7519 and 9 data bytes: [09, 02, AA, 01, 05, 01, 05, C0, 32] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting configuration descriptor #0 for device 27, reading 426 bytes + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 00, 02, 00, 00, AA, 01] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC 3417 and 8 data bytes: [80, 06, 00, 02, 00, 00, AA, 01] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 64 data bytes, ACK: [09, 02, AA, 01, 05, 01, 05, C0, 32, 08, 0B, 00, 04, 01, 00, 20, 00, 09, 04, 00, 00, 00, 01, 01, 20, 00, 09, 24, 01, 00, 02, 04, 5D, 00, 00, 08, 24, 0A, 04, 03, 07, 00, 00, 11, 24, 02, 01, 01, 01, 00, 04, 02, 00, 00, 00, 00, 00, 00, 00, 00, 12, 24, 06, 02] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 1DB0 and 64 data bytes: [09, 02, AA, 01, 05, 01, 05, C0, 32, 08, 0B, 00, 04, 01, 00, 20, 00, 09, 04, 00, 00, 00, 01, 01, 20, 00, 09, 24, 01, 00, 02, 04, 5D, 00, 00, 08, 24, 0A, 04, 03, 07, 00, 00, 11, 24, 02, 01, 01, 01, 00, 04, 02, 00, 00, 00, 00, 00, 00, 00, 00, 12, 24, 06, 02] + ACK packet + IN transaction on 27.0 with 64 data bytes, ACK: [01, 0F, 00, 00, 00, 0F, 00, 00, 00, 0F, 00, 00, 00, 00, 0C, 24, 03, 03, 02, 03, 00, 02, 04, 00, 00, 00, 11, 24, 02, 11, 01, 02, 00, 04, 02, 00, 00, 00, 00, 00, 00, 00, 00, 0C, 24, 03, 13, 01, 01, 00, 11, 04, 00, 00, 00, 09, 04, 01, 00, 00, 01, 02, 20, 00] + IN packet on 27.0, CRC 18 + DATA0 packet with CRC 3F59 and 64 data bytes: [01, 0F, 00, 00, 00, 0F, 00, 00, 00, 0F, 00, 00, 00, 00, 0C, 24, 03, 03, 02, 03, 00, 02, 04, 00, 00, 00, 11, 24, 02, 11, 01, 02, 00, 04, 02, 00, 00, 00, 00, 00, 00, 00, 00, 0C, 24, 03, 13, 01, 01, 00, 11, 04, 00, 00, 00, 09, 04, 01, 00, 00, 01, 02, 20, 00] + ACK packet + IN transaction on 27.0 with 64 data bytes, ACK: [09, 04, 01, 01, 01, 01, 02, 20, 00, 10, 24, 01, 01, 00, 01, 01, 00, 00, 00, 02, 00, 00, 00, 00, 00, 06, 24, 02, 01, 02, 10, 07, 05, 03, 09, C4, 00, 01, 08, 25, 01, 00, 00, 01, 01, 00, 09, 04, 01, 02, 01, 01, 02, 20, 00, 10, 24, 01, 01, 00, 01, 01, 00, 00] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 6EDE and 64 data bytes: [09, 04, 01, 01, 01, 01, 02, 20, 00, 10, 24, 01, 01, 00, 01, 01, 00, 00, 00, 02, 00, 00, 00, 00, 00, 06, 24, 02, 01, 02, 10, 07, 05, 03, 09, C4, 00, 01, 08, 25, 01, 00, 00, 01, 01, 00, 09, 04, 01, 02, 01, 01, 02, 20, 00, 10, 24, 01, 01, 00, 01, 01, 00, 00] + ACK packet + IN transaction on 27.0 with 64 data bytes, ACK: [00, 02, 00, 00, 00, 00, 00, 06, 24, 02, 01, 04, 18, 07, 05, 03, 09, 88, 01, 01, 08, 25, 01, 00, 00, 01, 01, 00, 09, 04, 02, 00, 00, 01, 02, 20, 00, 09, 04, 02, 01, 01, 01, 02, 20, 00, 10, 24, 01, 13, 00, 01, 01, 00, 00, 00, 02, 00, 00, 00, 00, 00, 06, 24] + IN packet on 27.0, CRC 18 + DATA0 packet with CRC 9B1F and 64 data bytes: [00, 02, 00, 00, 00, 00, 00, 06, 24, 02, 01, 04, 18, 07, 05, 03, 09, 88, 01, 01, 08, 25, 01, 00, 00, 01, 01, 00, 09, 04, 02, 00, 00, 01, 02, 20, 00, 09, 04, 02, 01, 01, 01, 02, 20, 00, 10, 24, 01, 13, 00, 01, 01, 00, 00, 00, 02, 00, 00, 00, 00, 00, 06, 24] + ACK packet + IN transaction on 27.0 with 64 data bytes, ACK: [02, 01, 02, 10, 07, 05, 83, 05, C4, 00, 01, 08, 25, 01, 00, 00, 00, 00, 00, 09, 04, 02, 02, 01, 01, 02, 20, 00, 10, 24, 01, 13, 00, 01, 01, 00, 00, 00, 02, 00, 00, 00, 00, 00, 06, 24, 02, 01, 04, 18, 07, 05, 83, 05, 88, 01, 01, 08, 25, 01, 00, 00, 00, 00] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 3DB6 and 64 data bytes: [02, 01, 02, 10, 07, 05, 83, 05, C4, 00, 01, 08, 25, 01, 00, 00, 00, 00, 00, 09, 04, 02, 02, 01, 01, 02, 20, 00, 10, 24, 01, 13, 00, 01, 01, 00, 00, 00, 02, 00, 00, 00, 00, 00, 06, 24, 02, 01, 04, 18, 07, 05, 83, 05, 88, 01, 01, 08, 25, 01, 00, 00, 00, 00] + ACK packet + IN transaction on 27.0 with 64 data bytes, ACK: [00, 09, 04, 03, 00, 02, 01, 03, 00, 00, 07, 24, 01, 00, 01, 41, 00, 06, 24, 02, 01, 01, 05, 06, 24, 02, 02, 02, 06, 09, 24, 03, 01, 03, 01, 02, 01, 06, 09, 24, 03, 02, 04, 01, 01, 01, 02, 09, 05, 01, 02, 40, 00, 00, 00, 00, 05, 25, 01, 01, 01, 09, 05, 81] + IN packet on 27.0, CRC 18 + DATA0 packet with CRC 7FAF and 64 data bytes: [00, 09, 04, 03, 00, 02, 01, 03, 00, 00, 07, 24, 01, 00, 01, 41, 00, 06, 24, 02, 01, 01, 05, 06, 24, 02, 02, 02, 06, 09, 24, 03, 01, 03, 01, 02, 01, 06, 09, 24, 03, 02, 04, 01, 01, 01, 02, 09, 05, 01, 02, 40, 00, 00, 00, 00, 05, 25, 01, 01, 01, 09, 05, 81] + ACK packet + IN transaction on 27.0 with 42 data bytes, ACK: [02, 40, 00, 00, 00, 00, 05, 25, 01, 01, 03, 08, 0B, 04, 01, FF, 00, 00, 04, 09, 04, 04, 00, 02, FF, 00, 00, 04, 07, 05, 02, 02, 40, 00, 00, 07, 05, 82, 02, 40, 00, 00] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 1F28 and 42 data bytes: [02, 40, 00, 00, 00, 00, 05, 25, 01, 01, 03, 08, 0B, 04, 01, FF, 00, 00, 04, 09, 04, 04, 00, 02, FF, 00, 00, 04, 07, 05, 02, 02, 40, 00, 00, 07, 05, 82, 02, 40, 00, 00] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Setting configuration 1 for device 27 + SETUP transaction on 27.0 with 8 data bytes, ACK: [00, 09, 01, 00, 00, 00, 00, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC 2527 and 8 data bytes: [00, 09, 01, 00, 00, 00, 00, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with no data, ACK + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting string descriptor #4, language 0x0409 (English/US) for device 27, reading 2 bytes + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 04, 03, 09, 04, 02, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC 2DD7 and 8 data bytes: [80, 06, 04, 03, 09, 04, 02, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 2 data bytes, ACK: '.\x03' + IN packet on 27.0, CRC 18 + DATA1 packet with CRC EEA3 and 2 data bytes: '.\x03' + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet +Getting string descriptor #4, language 0x0409 (English/US) for device 27, reading 46 bytes: 'Ksoloti Bulk Interface' + SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 04, 03, 09, 04, 2E, 00] + SETUP packet on 27.0, CRC 18 + DATA0 packet with CRC EDCB and 8 data bytes: [80, 06, 04, 03, 09, 04, 2E, 00] + ACK packet + IN transaction on 27.0, NAK + IN packet on 27.0, CRC 18 + NAK packet + IN transaction on 27.0 with 46 data bytes, ACK: [2E, 03, 4B, 00, 73, 00, 6F, 00, 6C, 00, 6F, 00, 74, 00, 69, 00, 20, 00, 42, 00, 75, 00, 6C, 00, 6B, 00, 20, 00, 49, 00, 6E, 00, 74, 00, 65, 00, 72, 00, 66, 00, 61, 00, 63, 00, 65, 00] + IN packet on 27.0, CRC 18 + DATA1 packet with CRC 25A8 and 46 data bytes: [2E, 03, 4B, 00, 73, 00, 6F, 00, 6C, 00, 6F, 00, 74, 00, 69, 00, 20, 00, 42, 00, 75, 00, 6C, 00, 6B, 00, 20, 00, 49, 00, 6E, 00, 74, 00, 65, 00, 72, 00, 66, 00, 61, 00, 63, 00, 65, 00] + ACK packet + OUT transaction on 27.0 with no data, ACK + OUT packet on 27.0, CRC 18 + DATA1 packet with CRC 0000 and no data + ACK packet diff --git a/tests/tests.txt b/tests/tests.txt index 48ccbeba..918a7f23 100644 --- a/tests/tests.txt +++ b/tests/tests.txt @@ -4,6 +4,7 @@ emf2022-badge hackrf-connect hackrf-dfu-enum hackrf-restart-failure +ksolti-core-enum mouse split-enum split-poll diff --git a/tests/ui/alt-settings/actions.json b/tests/ui/alt-settings/actions.json new file mode 100644 index 00000000..cc78ecc1 --- /dev/null +++ b/tests/ui/alt-settings/actions.json @@ -0,0 +1,30 @@ +{"Open":"tests/ksolti-core-enum/capture.pcap"} +{"Update":212} +{"SetExpanded":["devices",0,true]} +{"SetExpanded":["devices",1,true]} +{"SetExpanded":["devices",15,true]} +{"SetExpanded":["devices",16,true]} +{"SetExpanded":["devices",25,true]} +{"SetExpanded":["devices",26,true]} +{"SetExpanded":["devices",36,true]} +{"SetExpanded":["devices",37,true]} +{"SetExpanded":["devices",47,true]} +{"SetExpanded":["devices",48,true]} +{"SetExpanded":["devices",58,true]} +{"SetExpanded":["devices",65,true]} +{"SetExpanded":["devices",66,true]} +{"SetExpanded":["devices",76,true]} +{"SetExpanded":["devices",83,true]} +{"SetExpanded":["devices",84,true]} +{"SetExpanded":["devices",94,true]} +{"SetExpanded":["devices",95,true]} +{"SetExpanded":["devices",105,true]} +{"SetExpanded":["devices",112,true]} +{"SetExpanded":["devices",113,true]} +{"SetExpanded":["devices",123,true]} +{"SetExpanded":["devices",130,true]} +{"SetExpanded":["devices",131,true]} +{"SetExpanded":["devices",141,true]} +{"SetExpanded":["devices",142,true]} +{"SetExpanded":["devices",152,true]} +{"SetExpanded":["devices",159,true]} diff --git a/tests/ui/alt-settings/reference.txt b/tests/ui/alt-settings/reference.txt new file mode 100644 index 00000000..55bf9f59 --- /dev/null +++ b/tests/ui/alt-settings/reference.txt @@ -0,0 +1,241 @@ +Opening file tests/ksolti-core-enum/capture.pcap +Updating after 212 packets decoded +At traffic row 0: ++ 9 SOF groups ++ Setting address to 27 for device 0 ++ Getting device descriptor #0 for device 27, reading 8 bytes ++ Getting device descriptor #0 for device 27, reading 18 bytes ++ Getting string descriptor #5, language 0x0409 (English/US) for device 27, reading 2 bytes ++ Getting string descriptor #5, language 0x0409 (English/US) for device 27, reading 26 bytes: 'Ksoloti Core' ++ Getting string descriptor #1, language 0x0409 (English/US) for device 27, reading 2 bytes ++ Getting string descriptor #1, language 0x0409 (English/US) for device 27, reading 16 bytes: 'Ksoloti' ++ Getting string descriptor #3, language 0x0409 (English/US) for device 27, reading 2 bytes ++ Getting string descriptor #3, language 0x0409 (English/US) for device 27, reading 50 bytes: '002900193133510B33383438' ++ Getting configuration descriptor #0 for device 27, reading 9 bytes ++ Getting configuration descriptor #0 for device 27, reading 426 bytes ++ Setting configuration 1 for device 27 ++ Getting string descriptor #4, language 0x0409 (English/US) for device 27, reading 2 bytes ++ Getting string descriptor #4, language 0x0409 (English/US) for device 27, reading 46 bytes: 'Ksoloti Bulk Interface' +At devices row 0: ++ Device 27: Ksoloti Core +Expanding devices view, row 0: Device 27: Ksoloti Core +At devices row 1: ++ Device descriptor ++ Configuration 1 +Expanding devices view, row 1: Device descriptor +At devices row 2: ++ Length: 18 bytes ++ Type: 0x01 ++ USB Version: 2.00 ++ Class: 0xEF: Miscellaneous Device ++ Subclass: 0x02: ? ++ Protocol: 0x01: Interface Association ++ Max EP0 packet size: 64 bytes ++ Vendor ID: 0x16C0: Van Ooijen Technische Informatica ++ Product ID: 0x0444 ++ Version: 2.00 ++ Manufacturer string: #1 'Ksoloti' ++ Product string: #5 'Ksoloti Core' ++ Serial string: #3 '002900193133510B33383438' +Expanding devices view, row 15: Configuration 1 +At devices row 16: ++ Configuration descriptor ++ Interface 0 ++ Interface 1 ++ Interface 1 (alternate 1) ++ Interface 1 (alternate 2) ++ Interface 2 ++ Interface 2 (alternate 1) ++ Interface 2 (alternate 2) ++ Interface 3 ++ Interface 4 +Expanding devices view, row 16: Configuration descriptor +At devices row 17: ++ Length: 9 bytes ++ Type: 0x02 ++ Total length: 426 bytes ++ Number of interfaces: 5 ++ Configuration number: 1 ++ Configuration string: #5 'Ksoloti Core' ++ Attributes: 0xC0 ++ Max power: 100mA +Expanding devices view, row 25: Interface 0 +At devices row 26: ++ Interface descriptor +Expanding devices view, row 26: Interface descriptor +At devices row 27: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 0 ++ Alternate setting: 0 ++ Number of endpoints: 0 ++ Class: 0x01: Audio ++ Subclass: 0x01: Control Device ++ Protocol: 0x20 ++ Interface string: (none) +Expanding devices view, row 36: Interface 1 +At devices row 37: ++ Interface descriptor +Expanding devices view, row 37: Interface descriptor +At devices row 38: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 1 ++ Alternate setting: 0 ++ Number of endpoints: 0 ++ Class: 0x01: Audio ++ Subclass: 0x02: Streaming ++ Protocol: 0x20 ++ Interface string: (none) +Expanding devices view, row 47: Interface 1 (alternate 1) +At devices row 48: ++ Interface descriptor ++ Endpoint 3 OUT (isochronous) +Expanding devices view, row 48: Interface descriptor +At devices row 49: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 1 ++ Alternate setting: 1 ++ Number of endpoints: 1 ++ Class: 0x01: Audio ++ Subclass: 0x02: Streaming ++ Protocol: 0x20 ++ Interface string: (none) +Expanding devices view, row 58: Endpoint 3 OUT (isochronous) +At devices row 59: ++ Length: 7 bytes ++ Type: 0x05 ++ Endpoint address: 0x03 ++ Attributes: 0x09 ++ Max packet size: 196 bytes ++ Interval: 0x01 +Expanding devices view, row 65: Interface 1 (alternate 2) +At devices row 66: ++ Interface descriptor ++ Endpoint 3 OUT (isochronous) +Expanding devices view, row 66: Interface descriptor +At devices row 67: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 1 ++ Alternate setting: 2 ++ Number of endpoints: 1 ++ Class: 0x01: Audio ++ Subclass: 0x02: Streaming ++ Protocol: 0x20 ++ Interface string: (none) +Expanding devices view, row 76: Endpoint 3 OUT (isochronous) +At devices row 77: ++ Length: 7 bytes ++ Type: 0x05 ++ Endpoint address: 0x03 ++ Attributes: 0x09 ++ Max packet size: 392 bytes ++ Interval: 0x01 +Expanding devices view, row 83: Interface 2 +At devices row 84: ++ Interface descriptor +Expanding devices view, row 84: Interface descriptor +At devices row 85: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 2 ++ Alternate setting: 0 ++ Number of endpoints: 0 ++ Class: 0x01: Audio ++ Subclass: 0x02: Streaming ++ Protocol: 0x20 ++ Interface string: (none) +Expanding devices view, row 94: Interface 2 (alternate 1) +At devices row 95: ++ Interface descriptor ++ Endpoint 3 IN (isochronous) +Expanding devices view, row 95: Interface descriptor +At devices row 96: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 2 ++ Alternate setting: 1 ++ Number of endpoints: 1 ++ Class: 0x01: Audio ++ Subclass: 0x02: Streaming ++ Protocol: 0x20 ++ Interface string: (none) +Expanding devices view, row 105: Endpoint 3 IN (isochronous) +At devices row 106: ++ Length: 7 bytes ++ Type: 0x05 ++ Endpoint address: 0x83 ++ Attributes: 0x05 ++ Max packet size: 196 bytes ++ Interval: 0x01 +Expanding devices view, row 112: Interface 2 (alternate 2) +At devices row 113: ++ Interface descriptor ++ Endpoint 3 IN (isochronous) +Expanding devices view, row 113: Interface descriptor +At devices row 114: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 2 ++ Alternate setting: 2 ++ Number of endpoints: 1 ++ Class: 0x01: Audio ++ Subclass: 0x02: Streaming ++ Protocol: 0x20 ++ Interface string: (none) +Expanding devices view, row 123: Endpoint 3 IN (isochronous) +At devices row 124: ++ Length: 7 bytes ++ Type: 0x05 ++ Endpoint address: 0x83 ++ Attributes: 0x05 ++ Max packet size: 392 bytes ++ Interval: 0x01 +Expanding devices view, row 130: Interface 3 +At devices row 131: ++ Interface descriptor +Expanding devices view, row 131: Interface descriptor +At devices row 132: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 3 ++ Alternate setting: 0 ++ Number of endpoints: 2 ++ Class: 0x01: Audio ++ Subclass: 0x03: MIDI Streaming ++ Protocol: 0x00 ++ Interface string: (none) +Expanding devices view, row 141: Interface 4 +At devices row 142: ++ Interface descriptor ++ Endpoint 2 OUT (bulk) ++ Endpoint 2 IN (bulk) +Expanding devices view, row 142: Interface descriptor +At devices row 143: ++ Length: 9 bytes ++ Type: 0x04 ++ Interface number: 4 ++ Alternate setting: 0 ++ Number of endpoints: 2 ++ Class: 0xFF: Vendor Specific Class ++ Subclass: 0x00 ++ Protocol: 0x00 ++ Interface string: #4 'Ksoloti Bulk Interface' +Expanding devices view, row 152: Endpoint 2 OUT (bulk) +At devices row 153: ++ Length: 7 bytes ++ Type: 0x05 ++ Endpoint address: 0x02 ++ Attributes: 0x02 ++ Max packet size: 64 bytes ++ Interval: 0x00 +Expanding devices view, row 159: Endpoint 2 IN (bulk) +At devices row 160: ++ Length: 7 bytes ++ Type: 0x05 ++ Endpoint address: 0x82 ++ Attributes: 0x02 ++ Max packet size: 64 bytes ++ Interval: 0x00 diff --git a/tests/ui/tests.txt b/tests/ui/tests.txt index 9cece9f4..d01280ae 100644 --- a/tests/ui/tests.txt +++ b/tests/ui/tests.txt @@ -1,3 +1,4 @@ +alt-settings emf2022-badge mouse-step split-poll-step