diff --git a/.gitignore b/.gitignore index b411df26..50defa51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /docs/build/ /target /tests/*/output.txt +/tests/*/devices-output.txt /tests/ui/*/output.txt /vcpkg /wix/LICENSE-dynamic-libraries.txt diff --git a/src/capture.rs b/src/capture.rs index de219924..4d5cde46 100644 --- a/src/capture.rs +++ b/src/capture.rs @@ -21,6 +21,7 @@ use arc_swap::{ArcSwap, ArcSwapOption}; use bytemuck_derive::{Pod, Zeroable}; use itertools::Itertools; use num_enum::{IntoPrimitive, FromPrimitive}; +use usb_ids::FromId; // Use 2MB block size for packet data, which is a large page size on x86_64. const PACKET_DATA_BLOCK_SIZE: usize = 0x200000; @@ -215,7 +216,7 @@ pub type EndpointDataEvent = u64; pub type EndpointByteCount = u64; pub type DeviceVersion = u32; -#[derive(Copy, Clone, Debug)] +#[derive(Clone, Debug)] pub enum TrafficItem { Transfer(TransferId), Transaction(Option, TransactionId), @@ -263,24 +264,36 @@ impl TrafficViewMode { } } -#[derive(Copy, Clone, Debug)] -pub enum DeviceItem { - Device(DeviceId, DeviceVersion), - DeviceDescriptor(DeviceId), - DeviceDescriptorField(DeviceId, DeviceField, DeviceVersion), - Configuration(DeviceId, ConfigNum), - ConfigurationDescriptor(DeviceId, ConfigNum), - ConfigurationDescriptorField(DeviceId, ConfigNum, - ConfigField, DeviceVersion), - 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), +#[derive(Clone, Debug)] +pub struct DeviceItem { + device_id: DeviceId, + version: DeviceVersion, + content: DeviceItemContent, + indent: u8, } +#[derive(Clone, Debug)] +pub enum DeviceItemContent { + Device(Option), + DeviceDescriptor(Option), + DeviceDescriptorField(DeviceDescriptor, DeviceField), + Configuration(ConfigNum, ConfigDescriptor), + ConfigurationDescriptor(ConfigDescriptor), + ConfigurationDescriptorField(ConfigDescriptor, ConfigField), + Function(ConfigNum, InterfaceAssociationDescriptor), + FunctionDescriptor(InterfaceAssociationDescriptor), + FunctionDescriptorField(InterfaceAssociationDescriptor, IfaceAssocField), + Interface(ConfigNum, InterfaceDescriptor), + InterfaceDescriptor(InterfaceDescriptor), + InterfaceDescriptorField(InterfaceDescriptor, InterfaceField), + Endpoint(ConfigNum, InterfaceKey, IfaceEpNum), + EndpointDescriptor(EndpointDescriptor), + EndpointDescriptorField(EndpointDescriptor, EndpointField), + OtherDescriptor(Descriptor), +} + +type IfaceEpNum = u8; + #[derive(Copy, Clone, Debug, Default, Pod, Zeroable)] #[repr(C)] pub struct Device { @@ -420,10 +433,10 @@ impl DeviceData { } } - pub fn configuration(&self, number: &ConfigNum) + pub fn configuration(&self, number: ConfigNum) -> Result, Error> { - match self.configurations.load().get(*number) { + match self.configurations.load().get(number) { Some(config) => Ok(config.clone()), None => bail!("No descriptor for config {number}") } @@ -456,7 +469,8 @@ impl DeviceData { self.endpoint_details.update(|endpoint_details| { for ((num, alt), iface) in config.interfaces.iter() { if iface_settings.get(*num) == Some(alt) { - for ep_desc in &iface.endpoint_descriptors { + for endpoint in &iface.endpoints { + let ep_desc = &endpoint.descriptor; let ep_addr = ep_desc.endpoint_address; let ep_type = ep_desc.attributes.endpoint_type(); let ep_max = ep_desc.max_packet_size as usize; @@ -594,24 +608,69 @@ impl DeviceData { } impl Configuration { - pub fn interface(&self, number: &ConfigIfaceNum) + pub fn function(&self, number: usize) -> Result<&Function, Error> { + match self.functions.values().nth(number) { + Some(function) => Ok(function), + _ => bail!("Configuration has no function with index {number}") + } + } + + pub fn interface(&self, key: InterfaceKey) -> Result<&Interface, Error> { - let index = number.0 as usize; - match self.interfaces.values().nth(index) { - Some(iface) => Ok(iface), - _ => bail!("Configuration has no interface with index {index}") + self.interfaces + .get(&key) + .context("Configuration has no interface matching {key:?}") + } + + pub fn associated_interfaces(&self, desc: &InterfaceAssociationDescriptor) + -> impl Iterator + { + self.interfaces.range(desc.interface_range()).map(|(_k, v)| v) + } + + pub fn unassociated_interfaces(&self) -> impl Iterator { + let associated_ranges = self.functions + .values() + .map(|f| f.descriptor.interface_range()) + .collect::>(); + self.interfaces + .iter() + .filter_map(move |(key, interface)| { + if associated_ranges.iter().any(|range| range.contains(key)) { + None + } else { + Some(interface) + } + }) + } + + pub fn other_descriptor(&self, number: usize) + -> Result<&Descriptor, Error> + { + match self.other_descriptors.get(number) { + Some(desc) => Ok(desc), + _ => bail!("Configuration has no other descriptor {number}") } } } impl Interface { - pub fn endpoint_descriptor(&self, number: &InterfaceEpNum) - -> Result<&EndpointDescriptor, Error> + pub fn endpoint(&self, number: IfaceEpNum) + -> Result<&usb::Endpoint, Error> + { + match self.endpoints.get(number as usize) { + Some(ep) => Ok(ep), + _ => bail!("Interface has no endpoint {number}") + } + } + + pub fn other_descriptor(&self, number: usize) + -> Result<&Descriptor, Error> { - match self.endpoint_descriptors.get(*number) { + match self.other_descriptors.get(number) { Some(desc) => Ok(desc), - _ => bail!("Interface has no endpoint descriptor {number}") + _ => bail!("Interface has no other descriptor {number}") } } } @@ -1154,31 +1213,16 @@ impl CaptureReader { }) } - pub fn device_data(&self, id: &DeviceId) + pub fn device_data(&self, id: DeviceId) -> Result, Error> { Ok(self.shared.device_data .load() - .get(*id) + .get(id) .with_context(|| format!("Capture has no device with ID {id}"))? .clone()) } - fn device_version(&self, id: &DeviceId) -> Result { - Ok(self.device_data(id)?.version()) - } - - pub fn try_configuration(&self, dev: &DeviceId, conf: &ConfigNum) - -> Option> - { - self.device_data(dev) - .ok()? - .configurations - .load() - .get(*conf) - .cloned() - } - fn transfer_extended(&mut self, endpoint_id: EndpointId, transfer_id: TransferId) @@ -1560,7 +1604,7 @@ impl ItemSource for CaptureReader { let endpoint_id = entry.endpoint_id(); let endpoint = self.endpoints.get(endpoint_id)?; let device_id = endpoint.device_id(); - let dev_data = self.device_data(&device_id)?; + let dev_data = self.device_data(device_id)?; let ep_addr = endpoint.address(); let (ep_type, _) = dev_data.endpoint_details(ep_addr); let range = self.transfer_range(&entry)?; @@ -1816,8 +1860,16 @@ impl ItemSource for CaptureReader { match parent { None => { let device_id = DeviceId::from(index + 1); - let data = self.device_data(&device_id)?; - Ok(DeviceItem::Device(device_id, data.version())) + let data = self.device_data(device_id)?; + let descriptor = data.device_descriptor.load_full(); + Ok(DeviceItem { + device_id, + version: data.version(), + content: DeviceItemContent::Device( + descriptor.map(|arc| *arc) + ), + indent: 0, + }) }, Some(item) => self.child_item(item, index) } @@ -1826,73 +1878,130 @@ impl ItemSource for CaptureReader { fn item_update(&mut self, item: &DeviceItem) -> Result, Error> { - use DeviceItem::*; - Ok(match item { - Device(dev, version) | - DeviceDescriptorField(dev, .., version) | - ConfigurationDescriptorField(dev, .., version) | - InterfaceDescriptorField(dev, .., version) | - EndpointDescriptorField(dev, .., version) => { - let new = self.device_version(dev)?; - if *version != new { - Some(match *item { - Device(dev, _) => - Device(dev, new), - DeviceDescriptorField(dev, field, _) => - DeviceDescriptorField(dev, field, new), - ConfigurationDescriptorField(dev, conf, field, _) => - ConfigurationDescriptorField(dev, conf, field, new), - InterfaceDescriptorField(dev, conf, iface, field, _) => - InterfaceDescriptorField(dev, conf, iface, field, new), - EndpointDescriptorField(dev, conf, iface, ep, field, _) => - EndpointDescriptorField(dev, conf, iface, ep, field, new), - _ => unreachable!() - }) - } else { - None + use DeviceItemContent::*; + let data = self.device_data(item.device_id)?; + if data.version() == item.version { + return Ok(None) + } + // These items may have changed because we saw a new descriptor. + Ok(match item.content { + Device(_) | + DeviceDescriptorField(..) | + ConfigurationDescriptorField(..) | + InterfaceDescriptorField(..) => Some( + DeviceItem { + device_id: item.device_id, + version: data.version(), + content: item.content.clone(), + indent: item.indent, } - }, - _ => None + ), + _ => None, }) } fn child_item(&mut self, parent: &DeviceItem, index: u64) -> Result { - use DeviceItem::*; - Ok(match parent { - Device(dev, _version) => match index { - 0 => DeviceDescriptor(*dev), - conf => Configuration(*dev, - ConfigNum(conf.try_into()?)), + use DeviceItemContent::*; + let data = self.device_data(parent.device_id)?; + let content = match parent.content { + Device(desc_opt) => match index { + 0 => DeviceDescriptor(desc_opt), + n => { + let conf = ConfigNum(n.try_into()?); + let config = data.configuration(conf)?; + Configuration(conf, config.descriptor) + } }, - DeviceDescriptor(dev) => - DeviceDescriptorField(*dev, - DeviceField(index.try_into()?), - self.device_version(dev)?), - Configuration(dev, conf) => match index { - 0 => ConfigurationDescriptor(*dev, *conf), - n => Interface(*dev, *conf, - ConfigIfaceNum((n - 1).try_into()?)), + DeviceDescriptor(desc_opt) => match desc_opt { + Some(desc) => + DeviceDescriptorField(desc, + DeviceField(index.try_into()?)), + None => bail!("Device descriptor fields not available") }, - ConfigurationDescriptor(dev, conf) => - ConfigurationDescriptorField(*dev, *conf, - ConfigField(index.try_into()?), - self.device_version(dev)?), - Interface(dev, conf, iface) => match index { - 0 => InterfaceDescriptor(*dev, *conf, *iface), - n => EndpointDescriptor(*dev, *conf, *iface, - InterfaceEpNum((n - 1).try_into()?)) + Configuration(conf, desc) => { + let config = data.configuration(conf)?; + let other_count = config.other_descriptors.len(); + let func_count = config.functions.len(); + match index.try_into()? { + 0 => ConfigurationDescriptor(desc), + n if n < 1 + other_count => + OtherDescriptor(config + .other_descriptor(n - 1)? + .clone()), + n if n < 1 + other_count + func_count => + Function(conf, config + .function(n - 1 - other_count)? + .descriptor), + n => Interface(conf, config + .unassociated_interfaces() + .nth(n - 1 - other_count - func_count) + .context("Failed to find unassociated interface")? + .descriptor) + } + }, + ConfigurationDescriptor(desc) => + ConfigurationDescriptorField(desc, + ConfigField(index.try_into()?)), + Function(conf, desc) => { + let config = data.configuration(conf)?; + match index.try_into()? { + 0 => FunctionDescriptor(desc), + n => match config.associated_interfaces(&desc).nth(n - 1) { + Some(interface) => + Interface(conf, interface.descriptor), + None => bail!( + "Function has no interface with index {n}") + } + } + }, + FunctionDescriptor(desc) => + FunctionDescriptorField(desc, + IfaceAssocField(index.try_into()?)), + Interface(conf, if_desc) => { + let config = data.configuration(conf)?; + let interface = config.interface(if_desc.key())?; + let desc_count = interface.other_descriptors.len(); + match index.try_into()? { + 0 => InterfaceDescriptor(if_desc), + n if n < 1 + desc_count => { + let desc = interface.other_descriptor(n - 1)?.clone(); + OtherDescriptor(desc) + }, + n => { + let ep_num = (n - 1 - desc_count).try_into()?; + Endpoint(conf, if_desc.key(), ep_num) + } + } }, - InterfaceDescriptor(dev, conf, iface) => - InterfaceDescriptorField(*dev, *conf, *iface, - InterfaceField(index.try_into()?), - self.device_version(dev)?), - EndpointDescriptor(dev, conf, iface, ep) => - EndpointDescriptorField(*dev, *conf, *iface, *ep, - EndpointField(index.try_into()?), - self.device_version(dev)?), + Endpoint(conf, if_key, ep_num) => { + let config = data.configuration(conf)?; + let interface = config.interface(if_key)?; + let endpoint = interface.endpoint(ep_num)?; + match index.try_into()? { + 0 => EndpointDescriptor(endpoint.descriptor), + n => OtherDescriptor( + endpoint.other_descriptors + .get(n - 1) + .context("Other endpoint descriptor not found")? + .clone() + ) + } + }, + InterfaceDescriptor(desc) => + InterfaceDescriptorField(desc, + InterfaceField(index.try_into()?)), + EndpointDescriptor(desc) => + EndpointDescriptorField(desc, + EndpointField(index.try_into()?)), _ => bail!("This device item type cannot have children") + }; + Ok(DeviceItem { + device_id: parent.device_id, + version: data.version(), + content, + indent: parent.indent + 1, }) } @@ -1901,44 +2010,64 @@ impl ItemSource for CaptureReader { _view_mode: DeviceViewMode) -> Result<(CompletionStatus, u64), Error> { - use DeviceItem::*; + use DeviceItemContent::*; use CompletionStatus::*; let (completion, children) = match parent { None => (self.completion(), self.devices.len().saturating_sub(1) as usize), - Some(Device(dev, _version)) => - (Ongoing, { - let configs = &self.device_data(dev)?.configurations; - let count = configs.load().len(); - if count == 0 { 1 } else { count } - }), - Some(DeviceDescriptor(dev)) => - match self.device_data(dev)?.device_descriptor.load().as_ref() { - Some(_) => (Ongoing, usb::DeviceDescriptor::NUM_FIELDS), - None => (Ongoing, 0), - }, - Some(Configuration(dev, conf)) => - match self.try_configuration(dev, conf) { - Some(conf) => (Ongoing, 1 + conf.interfaces.len()), - None => (Ongoing, 0) - }, - Some(ConfigurationDescriptor(dev, conf)) => - match self.try_configuration(dev, conf) { - Some(_) => (Ongoing, usb::ConfigDescriptor::NUM_FIELDS), - None => (Ongoing, 0) - }, - Some(Interface(dev, conf, iface)) => - match self.try_configuration(dev, conf) { - Some(conf) => (Ongoing, - 1 + conf.interface(iface)?.endpoint_descriptors.len()), - None => (Ongoing, 0) - }, - Some(InterfaceDescriptor(..)) => - (Ongoing, usb::InterfaceDescriptor::NUM_FIELDS), - Some(EndpointDescriptor(..)) => - (Complete, usb::EndpointDescriptor::NUM_FIELDS), - _ => (Ongoing, 0) + Some(item) => { + let data = self.device_data(item.device_id)?; + match item.content { + Device(_) => { + let count = data.configurations.load().len(); + (Ongoing, if count == 0 { 1 } else { count }) + }, + DeviceDescriptor(_) => + match data.device_descriptor.load().as_ref() { + Some(_) => + (Ongoing, usb::DeviceDescriptor::NUM_FIELDS), + None => (Ongoing, 0), + }, + Configuration(conf, _) => { + let config = data.configuration(conf)?; + (Ongoing, + 1 + config.other_descriptors.len() + + config.functions.len() + + config.unassociated_interfaces().count()) + } + ConfigurationDescriptor(_) => + (Ongoing, usb::ConfigDescriptor::NUM_FIELDS), + Function(conf, desc) => { + let config = data.configuration(conf)?; + let interfaces = config.associated_interfaces(&desc); + (Complete, 1 + interfaces.count()) + } + FunctionDescriptor(_) => + (Complete, + usb::InterfaceAssociationDescriptor::NUM_FIELDS), + Interface(conf, desc) => { + let config = data.configuration(conf)?; + let interface = config.interface(desc.key())?; + (Ongoing, + 1 + interface.endpoints.len() + + interface.other_descriptors.len()) + }, + Endpoint(conf, key, ep_num) => { + let config = data.configuration(conf)?; + let interface = config.interface(key)?; + let endpoint = interface.endpoint(ep_num)?; + (Complete, 1 + endpoint.other_descriptors.len()) + } + InterfaceDescriptor(_) => + (Ongoing, usb::InterfaceDescriptor::NUM_FIELDS), + EndpointDescriptor(_) => + (Complete, usb::EndpointDescriptor::NUM_FIELDS), + + // Other types have no children. + _ => (Complete, 0), + } + } }; Ok((completion, children as u64)) } @@ -1946,97 +2075,79 @@ impl ItemSource for CaptureReader { fn description(&mut self, item: &DeviceItem, _detail: bool) -> Result { - use DeviceItem::*; - Ok(match item { - Device(dev, _version) => { - let device = self.devices.get(*dev)?; - let data = self.device_data(dev)?; + use DeviceItemContent::*; + let data = self.device_data(item.device_id)?; + Ok(match &item.content { + Device(_) => { + let device = self.devices.get(item.device_id)?; format!("Device {}: {}", device.address, data.description()) }, - DeviceDescriptor(dev) => { - match self.device_data(dev)?.device_descriptor.load().as_ref() { + DeviceDescriptor(desc) => { + match desc { Some(_) => "Device descriptor", None => "No device descriptor" }.to_string() }, - DeviceDescriptorField(dev, field, _ver) => { - let data = self.device_data(dev)?; - let device_descriptor = data.device_descriptor.load(); - match device_descriptor.as_ref() { - Some(descriptor) => { - let strings = data.strings.load(); - descriptor.field_text(*field, strings.as_ref()) - }, - None => bail!("Device descriptor missing") - } + DeviceDescriptorField(desc, field) => { + let strings = data.strings.load(); + desc.field_text(*field, strings.as_ref()) }, - Configuration(_, conf) => format!( + Configuration(conf, _) => format!( "Configuration {conf}"), - ConfigurationDescriptor(..) => + ConfigurationDescriptor(_) => "Configuration descriptor".to_string(), - ConfigurationDescriptorField(dev, conf, field, _ver) => { - let data = self.device_data(dev)?; - let config_descriptor = data.configuration(conf)?.descriptor; + ConfigurationDescriptorField(desc, field) => { let strings = data.strings.load(); - config_descriptor.field_text(*field, strings.as_ref()) + desc.field_text(*field, strings.as_ref()) }, - 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 { + Function(_conf, desc) => { + format!("Function {}: {}", + desc.function, + usb_ids::Class::from_id(desc.function_class) + .map_or("Unknown", |c| c.name()) + ) + }, + FunctionDescriptor(_) => + "Interface association descriptor".to_string(), + FunctionDescriptorField(desc, field) => desc.field_text(*field), + Interface(_conf, desc) => { + let num = desc.interface_number; + let class = usb_ids::Class::from_id(desc.interface_class) + .map_or("Unknown", |c| c.name()); + match desc.alternate_setting { InterfaceAlt(0) => format!( - "Interface {num}"), + "Interface {num}: {class}"), InterfaceAlt(alt) => format!( - "Interface {num} (alternate {alt})"), + "Interface {num} alt {alt}: {class}"), } }, - InterfaceDescriptor(..) => + InterfaceDescriptor(_) => "Interface descriptor".to_string(), - InterfaceDescriptorField(dev, conf, iface, field, _ver) => { - let data = self.device_data(dev)?; - let config = data.configuration(conf)?; - let interface = config.interface(iface)?; + InterfaceDescriptorField(desc, field) => { let strings = data.strings.load(); - interface.descriptor.field_text(*field, strings.as_ref()) + desc.field_text(*field, strings.as_ref()) }, - EndpointDescriptor(dev, conf, iface, ep) => { - let config = self.device_data(dev)?.configuration(conf)?; - let desc = config.interface(iface)?.endpoint_descriptor(ep)?; + Endpoint(conf, if_key, ep_num) => { + let config = data.configuration(*conf)?; + let interface = config.interface(*if_key)?; + let endpoint = interface.endpoint(*ep_num)?; + let desc = &endpoint.descriptor; let addr = desc.endpoint_address; let attrs = desc.attributes; format!("Endpoint {} {} ({})", addr.number(), addr.direction(), attrs.endpoint_type()) }, - EndpointDescriptorField(dev, conf, iface, ep, field, _ver) => { - self.device_data(dev)? - .configuration(conf)? - .interface(iface)? - .endpoint_descriptor(ep)? - .field_text(*field) - } + EndpointDescriptor(_) => + "Endpoint descriptor".to_string(), + EndpointDescriptorField(desc, field) => desc.field_text(*field), + OtherDescriptor(desc) => desc.description(), }) } fn connectors(&mut self, _view_mode: (), item: &DeviceItem) -> Result { - use DeviceItem::*; - let depth = match item { - Device(..) => 0, - DeviceDescriptor(..) => 1, - DeviceDescriptorField(..) => 2, - Configuration(..) => 1, - ConfigurationDescriptor(..) => 2, - ConfigurationDescriptorField(..) => 3, - Interface(..) => 2, - InterfaceDescriptor(..) => 3, - InterfaceDescriptorField(..) => 4, - EndpointDescriptor(..) => 3, - EndpointDescriptorField(..) => 4, - }; - Ok(" ".repeat(depth)) + Ok(" ".repeat(item.indent as usize)) } fn timestamp(&mut self, _item: &DeviceItem) @@ -2055,17 +2166,23 @@ mod tests { use crate::decoder::Decoder; use crate::pcap::Loader; - fn summarize_item(cap: &mut CaptureReader, item: &TrafficItem, depth: usize) - -> String + fn summarize_item( + cap: &mut CaptureReader, + item: &Item, + mode: ViewMode, + depth: usize + ) -> String + where CaptureReader: ItemSource, + ViewMode: Copy { let mut summary = cap.description(item, false).unwrap(); let (_completion, num_children) = - cap.item_children(Some(item), TrafficViewMode::Hierarchical).unwrap(); + cap.item_children(Some(item), mode).unwrap(); let child_ids = 0..num_children; for (n, child_summary) in child_ids .map(|child_id| { let child = cap.child_item(item, child_id).unwrap(); - summarize_item(cap, &child, depth + 1) + summarize_item(cap, &child, mode, depth + 1) }) .dedup_with_count() { @@ -2080,10 +2197,17 @@ mod tests { summary } - fn write_item(cap: &mut CaptureReader, item: &TrafficItem, depth: usize, - writer: &mut dyn Write) + fn write_item( + cap: &mut CaptureReader, + item: &Item, + mode: ViewMode, + depth: usize, + writer: &mut dyn Write + ) + where CaptureReader: ItemSource, + ViewMode: Copy { - let summary = summarize_item(cap, item, depth); + let summary = summarize_item(cap, item, mode, depth); for _ in 0..depth { writer.write(b" ").unwrap(); } @@ -2097,15 +2221,20 @@ mod tests { let mut list_path = test_dir.clone(); list_path.push("tests.txt"); let list_file = File::open(list_path).unwrap(); + let mode = TrafficViewMode::Hierarchical; for test_name in BufReader::new(list_file).lines() { let mut test_path = test_dir.clone(); test_path.push(test_name.unwrap()); let mut cap_path = test_path.clone(); - let mut ref_path = test_path.clone(); - let mut out_path = test_path.clone(); + let mut traf_ref_path = test_path.clone(); + let mut traf_out_path = test_path.clone(); + let mut dev_ref_path = test_path.clone(); + let mut dev_out_path = test_path.clone(); cap_path.push("capture.pcap"); - ref_path.push("reference.txt"); - out_path.push("output.txt"); + traf_ref_path.push("reference.txt"); + traf_out_path.push("output.txt"); + dev_ref_path.push("devices-reference.txt"); + dev_out_path.push("devices-output.txt"); { let file = File::open(cap_path).unwrap(); let mut loader = Loader::open(file).unwrap(); @@ -2118,24 +2247,35 @@ mod tests { .unwrap(); } decoder.finish().unwrap(); - let out_file = File::create(out_path.clone()).unwrap(); - let mut out_writer = BufWriter::new(out_file); + let traf_out_file = File::create(traf_out_path.clone()).unwrap(); + let mut traf_out_writer = BufWriter::new(traf_out_file); let num_items = reader.item_index.len(); for item_id in 0 .. num_items { - let item = reader.item( - None, TrafficViewMode::Hierarchical, item_id).unwrap(); - write_item(&mut reader, &item, 0, &mut out_writer); + let item = reader.item(None, mode, item_id).unwrap(); + write_item(&mut reader, &item, mode, 0, &mut traf_out_writer); + } + let dev_out_file = File::create(dev_out_path.clone()).unwrap(); + let mut dev_out_writer = BufWriter::new(dev_out_file); + let num_devices = reader.devices.len() - 1; + for device_id in 0 .. num_devices { + let item = reader.item(None, (), device_id).unwrap(); + write_item(&mut reader, &item, (), 0, &mut dev_out_writer); } } - let ref_file = File::open(ref_path).unwrap(); - let out_file = File::open(out_path.clone()).unwrap(); - let ref_reader = BufReader::new(ref_file); - let out_reader = BufReader::new(out_file); - let mut out_lines = out_reader.lines(); - for line in ref_reader.lines() { - let expected = line.unwrap(); - let actual = out_lines.next().unwrap().unwrap(); - assert_eq!(actual, expected); + for (ref_path, out_path) in [ + (traf_ref_path, traf_out_path), + (dev_ref_path, dev_out_path), + ] { + let ref_file = File::open(ref_path).unwrap(); + let out_file = File::open(out_path.clone()).unwrap(); + let ref_reader = BufReader::new(ref_file); + let out_reader = BufReader::new(out_file); + let mut out_lines = out_reader.lines(); + for line in ref_reader.lines() { + let expected = line.unwrap(); + let actual = out_lines.next().unwrap().unwrap(); + assert_eq!(actual, expected); + } } } } diff --git a/src/record_ui.rs b/src/record_ui.rs index 41a7095a..830d35b2 100644 --- a/src/record_ui.rs +++ b/src/record_ui.rs @@ -160,7 +160,7 @@ impl Recording { Model: ListModelExt + GenericModel, CaptureReader: ItemSource, Object: ToGenericRowData, - Item: Copy, + Item: Clone, ViewMode: Copy, { if (removed, added) == (0, 0) { @@ -204,17 +204,16 @@ impl Recording { where Model: ListModelExt + GenericModel, CaptureReader: ItemSource, Object: ToGenericRowData, - Item: Copy, + Item: Clone, ViewMode: Copy { - let item = model + let node = &model .item(position) .expect("Failed to retrieve row data") .to_generic_row_data() .node() - .expect("Failed to fetch item node from row data") - .borrow() - .item; + .expect("Failed to fetch item node from row data"); + let item = &node.borrow().item; self.capture .description(&item, false) .expect("Failed to generate item summary") diff --git a/src/row_data.rs b/src/row_data.rs index 32dc0b9d..87ee2170 100644 --- a/src/row_data.rs +++ b/src/row_data.rs @@ -10,7 +10,7 @@ use crate::capture::{TrafficItem, DeviceItem}; use crate::tree_list_model::ItemNodeRc; /// Trait implemented by each of our row data types. -pub trait GenericRowData where Item: Copy { +pub trait GenericRowData where Item: Clone { /// Create a row for the given node. fn new(node: Result, String>) -> Self where Self: Sized; diff --git a/src/test_cynthion.rs b/src/test_cynthion.rs index 63fdd23d..15379aca 100644 --- a/src/test_cynthion.rs +++ b/src/test_cynthion.rs @@ -117,7 +117,7 @@ fn test(save_capture: bool, // Look for the test device in the capture. let device_id = DeviceId::from(1); - let device_data = reader.device_data(&device_id)?; + let device_data = reader.device_data(device_id)?; ensure!(device_data.description() == "USB Analyzer Test Device", "Device found did not have expected description"); println!("Found test device in capture"); diff --git a/src/tree_list_model.rs b/src/tree_list_model.rs index c9106801..63b8d79f 100644 --- a/src/tree_list_model.rs +++ b/src/tree_list_model.rs @@ -157,7 +157,7 @@ impl Node for RootNode { } } -impl Node for ItemNode where Item: Copy { +impl Node for ItemNode where Item: Clone { fn item(&self) -> Option<&Item> { Some(&self.item) } @@ -205,7 +205,7 @@ trait UpdateTotal { } impl UpdateTotal for Rc> -where T: Node + 'static, Item: Copy + 'static +where T: Node + 'static, Item: Clone + 'static { fn update_total(&self, expanded: bool, rows_affected: u64) -> Result<(), Error> @@ -232,7 +232,7 @@ trait NodeRcOps: UpdateTotal { } impl NodeRcOps for RootNodeRc -where Item: Copy + 'static +where Item: Clone + 'static { fn source(&self) -> Source { TopLevelItems() @@ -244,7 +244,7 @@ where Item: Copy + 'static } impl NodeRcOps for ItemNodeRc -where Item: Copy + 'static +where Item: Clone + 'static { fn source(&self) -> Source { ChildrenOf(self.clone()) @@ -255,7 +255,7 @@ where Item: Copy + 'static } } -impl ItemNode where Item: Copy { +impl ItemNode where Item: Clone { pub fn expanded(&self) -> bool { Node::::expanded(self) @@ -357,7 +357,7 @@ pub struct TreeListModel { } impl TreeListModel -where Item: 'static + Copy + Debug, +where Item: 'static + Clone + Debug, ViewMode: Copy, Model: GenericModel + ListModelExt, RowData: GenericRowData + IsA + Cast, diff --git a/src/ui.rs b/src/ui.rs index 9e751863..11e06f8c 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -629,7 +629,7 @@ fn create_view( recording_args: (&Rc>, &'static str)) -> (Model, SingleSelection, ColumnView) where - Item: Copy + 'static, + Item: Clone + 'static, ViewMode: Copy, Model: GenericModel + IsA + IsA, RowData: GenericRowData + IsA, diff --git a/src/usb.rs b/src/usb.rs index 1cc5b9d5..9a9f11cb 100644 --- a/src/usb.rs +++ b/src/usb.rs @@ -1,5 +1,6 @@ use std::collections::BTreeMap; use std::mem::size_of; +use std::ops::Range; use bytemuck_derive::{Pod, Zeroable}; use bytemuck::pod_read_unaligned; @@ -8,6 +9,7 @@ use num_enum::{IntoPrimitive, FromPrimitive}; use derive_more::{From, Into, Display}; use usb_ids::FromId; +use crate::util::titlecase; use crate::vec_map::VecMap; fn crc16(bytes: &[u8]) -> u16 { @@ -136,15 +138,16 @@ 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); byte_type!(EndpointField); byte_type!(EndpointAddr); byte_type!(EndpointAttr); +byte_type!(IfaceAssocField); + +pub type InterfaceKey = (InterfaceNum, InterfaceAlt); impl EndpointAddr { pub fn number(&self) -> EndpointNum { @@ -453,16 +456,22 @@ fn language_name(code: u16) -> Option { #[derive(Copy, Clone, Debug, FromPrimitive, PartialEq, Eq)] #[repr(u8)] pub enum DescriptorType { - Device = 1, - Configuration = 2, - String = 3, - Interface = 4, - Endpoint = 5, - DeviceQualifier = 6, - OtherSpeedConfiguration = 7, - InterfacePower = 8, + Invalid = 0x00, + Device = 0x01, + Configuration = 0x02, + String = 0x03, + Interface = 0x04, + Endpoint = 0x05, + DeviceQualifier = 0x06, + OtherSpeedConfiguration = 0x07, + InterfacePower = 0x08, + OnTheGo = 0x09, + Debug = 0x0A, + InterfaceAssociation = 0x0B, + BinaryObjectStore = 0x0F, + DeviceCapability = 0x10, #[default] - Unknown = 9 + Unknown = 0xFF, } impl DescriptorType { @@ -473,6 +482,8 @@ impl DescriptorType { Some(size_of::()), Configuration => Some(size_of::()), + InterfaceAssociation => + Some(size_of::()), Interface => Some(size_of::()), Endpoint => @@ -481,23 +492,26 @@ impl DescriptorType { None } } -} -impl DescriptorType { - pub fn description(self) -> &'static str { - const STRINGS: [&str; 10] = [ - "invalid", - "device", - "configuration", - "string", - "interface", - "endpoint", - "device qualifier", - "other speed configuration", - "interface power", - "unknown", - ]; - STRINGS[self as usize] + pub fn description(&self) -> &'static str { + use DescriptorType::*; + match self { + Invalid => "invalid", + Device => "device", + Configuration => "configuration", + String => "string", + Interface => "interface", + Endpoint => "endpoint", + DeviceQualifier => "device qualifier", + OtherSpeedConfiguration => "other speed", + InterfacePower => "interface power", + OnTheGo => "OTG", + Debug => "debug", + InterfaceAssociation => "interface association", + BinaryObjectStore => "BOS", + DeviceCapability => "device capability", + Unknown => "unknown", + } } } @@ -626,6 +640,56 @@ impl ConfigDescriptor { pub const NUM_FIELDS: usize = 8; } +#[derive(Copy, Clone, Debug, Default, Pod, Zeroable)] +#[repr(C, packed)] +pub struct InterfaceAssociationDescriptor { + pub length: u8, + pub descriptor_type: u8, + pub first_interface: u8, + pub interface_count: u8, + pub function_class: u8, + pub function_subclass: u8, + pub function_protocol: u8, + pub function: u8, +} + +#[allow(dead_code)] +impl InterfaceAssociationDescriptor { + pub fn field_text(&self, id: IfaceAssocField) -> String + { + match id.0 { + 0 => format!("Length: {} bytes", self.length), + 1 => format!("Type: 0x{:02X}", self.descriptor_type), + 2 => format!("First interface: {}", self.first_interface), + 3 => format!("Interface count: {}", self.interface_count), + 4 => format!("Function class: 0x{:02X}{}", self.function_class, + usb_ids::Class::from_id(self.function_class) + .map_or_else(String::new, |c| format!(": {}", c.name()))), + 5 => format!("Function subclass: 0x{:02X}{}", self.function_subclass, + usb_ids::SubClass::from_cid_scid( + self.function_class, self.function_subclass) + .map_or_else(String::new, |s| format!(": {}", s.name()))), + 6 => format!("Function protocol: 0x{:02X}{}", self.function_protocol, + usb_ids::Protocol::from_cid_scid_pid( + self.function_class, self.function_subclass, + self.function_protocol) + .map_or_else(String::new, |p| format!(": {}", p.name()))), + 7 => format!("Function number: {}", self.function), + i => format!("Error: Invalid field ID {i}") + } + } + + pub const NUM_FIELDS: usize = 8; + + pub fn interface_range(&self) -> Range { + let start = self.first_interface; + let count = self.interface_count; + let start_key = (InterfaceNum(start), InterfaceAlt(0)); + let end_key = (InterfaceNum(start + count), InterfaceAlt(0)); + start_key..end_key + } +} + #[derive(Copy, Clone, Debug, Default, Pod, Zeroable)] #[repr(C, packed)] pub struct InterfaceDescriptor { @@ -671,6 +735,10 @@ impl InterfaceDescriptor { } pub const NUM_FIELDS: usize = 9; + + pub fn key(&self) -> InterfaceKey { + (self.interface_number, self.alternate_setting) + } } #[derive(Copy, Clone, Debug, Default, Pod, Zeroable)] @@ -703,12 +771,57 @@ impl EndpointDescriptor { } #[allow(dead_code)] +#[derive(Clone, Debug)] pub enum Descriptor { Device(DeviceDescriptor), Configuration(ConfigDescriptor), + InterfaceAssociation(InterfaceAssociationDescriptor), Interface(InterfaceDescriptor), Endpoint(EndpointDescriptor), - Other(DescriptorType) + Other(DescriptorType, Vec), + Malformed(DescriptorType, Vec), +} + +impl Descriptor { + pub fn description(&self) -> String { + use Descriptor::*; + match self { + Device(_) => "Device descriptor".to_string(), + Configuration(_) => "Configuration descriptor".to_string(), + Interface(_) => "Interface descriptor".to_string(), + Endpoint(_) => "Endpoint descriptor".to_string(), + InterfaceAssociation(_) => + "Interface association descriptor".to_string(), + Other(desc_type, bytes) => + if *desc_type == DescriptorType::Unknown { + let type_code = bytes[1]; + let type_group = match type_code { + 0x00..=0x1F => "Standard", + 0x20..=0x3F => "Class", + 0x40..=0x5F => "Custom", + 0x60..=0xFF => "Reserved", + }; + format!("{} descriptor 0x{:02X}, {} bytes", + type_group, type_code, bytes.len()) + } else { + format!("{} descriptor, {} bytes", + titlecase(desc_type.description()), bytes.len()) + }, + Malformed(desc_type, bytes) => { + let description = desc_type.description(); + let length = bytes.len(); + if let Some(expected) = desc_type.expected_length() { + format!( + "Malformed {} descriptor (only {}/{} bytes)", + description, length, expected) + } else { + format!( + "Malformed {} descriptor ({} bytes)", + description, length) + } + }, + } + } } pub struct DescriptorIterator<'bytes> { @@ -729,89 +842,139 @@ impl Iterator for DescriptorIterator<'_> { type Item = Descriptor; fn next(&mut self) -> Option { - while self.offset < self.bytes.len() - 2 { + if self.offset < self.bytes.len() - 2 { let remaining_bytes = &self.bytes[self.offset .. self.bytes.len()]; let desc_length = remaining_bytes[0] as usize; let desc_type = DescriptorType::from(remaining_bytes[1]); self.offset += desc_length; - // The expected length is the minimum length, but sometimes the - // descriptors have extra padding/garbage data at the end. - // Handle this by trimming off the extra data. + let mut bytes = &remaining_bytes[0 .. desc_length]; if let Some(expected) = desc_type.expected_length() { + // If there aren't enough bytes for the descriptor type, it is + // malformed and we can't interpret it. if desc_length < expected { - continue + return Some(Descriptor::Malformed(desc_type, bytes.to_vec())) } - let bytes = &remaining_bytes[0 .. expected]; - return Some(match desc_type { - DescriptorType::Device => - Descriptor::Device( - DeviceDescriptor::from_bytes(bytes)), - DescriptorType::Configuration => - Descriptor::Configuration( - pod_read_unaligned::(bytes)), - DescriptorType::Interface => - Descriptor::Interface( - pod_read_unaligned::(bytes)), - DescriptorType::Endpoint => - Descriptor::Endpoint( - pod_read_unaligned::(bytes)), - _ => Descriptor::Other(desc_type) - }); - } + // The expected length is the minimum length, but sometimes the + // descriptors have extra padding/garbage data at the end. + // Handle this by trimming off the extra data. + bytes = &bytes[0 .. expected]; + }; + return Some(match desc_type { + DescriptorType::Device => + Descriptor::Device( + DeviceDescriptor::from_bytes(bytes)), + DescriptorType::Configuration => + Descriptor::Configuration( + pod_read_unaligned::(bytes)), + DescriptorType::Interface => + Descriptor::Interface( + pod_read_unaligned::(bytes)), + DescriptorType::Endpoint => + Descriptor::Endpoint( + pod_read_unaligned::(bytes)), + DescriptorType::InterfaceAssociation => + Descriptor::InterfaceAssociation( + pod_read_unaligned::(bytes)), + _ => Descriptor::Other(desc_type, bytes.to_vec()) + }); } + // Not enough data for another descriptor. None } } +pub struct Function { + pub descriptor: InterfaceAssociationDescriptor, +} + +pub struct Endpoint { + pub descriptor: EndpointDescriptor, + pub other_descriptors: Vec, +} + pub struct Interface { pub descriptor: InterfaceDescriptor, - pub endpoint_descriptors: VecMap + pub endpoints: Vec, + pub other_descriptors: Vec, } pub struct Configuration { pub descriptor: ConfigDescriptor, - pub interfaces: BTreeMap<(InterfaceNum, InterfaceAlt), Interface>, + pub functions: BTreeMap, + pub interfaces: BTreeMap, + pub other_descriptors: Vec, } impl Configuration { pub fn from_bytes(bytes: &[u8]) -> Option { let mut result: Option = None; - let mut iface_key: Option<(InterfaceNum, InterfaceAlt)> = None; + let mut iface_key: Option = None; + let mut ep_index: Option = None; for descriptor in DescriptorIterator::from(bytes) { match descriptor { Descriptor::Configuration(config_desc) => { result = Some(Configuration { descriptor: config_desc, + functions: BTreeMap::new(), interfaces: BTreeMap::new(), + other_descriptors: Vec::new(), }); }, + Descriptor::InterfaceAssociation(assoc_desc) => { + if let Some(config) = result.as_mut() { + config.functions.insert( + assoc_desc.function, + Function { + descriptor: assoc_desc, + } + ); + } + }, Descriptor::Interface(iface_desc) => { if let Some(config) = result.as_mut() { let iface_num = iface_desc.interface_number; let iface_alt = iface_desc.alternate_setting; let key = (iface_num, iface_alt); iface_key = Some(key); + ep_index = None; config.interfaces.insert( key, Interface { descriptor: iface_desc, - endpoint_descriptors: - VecMap::with_capacity( - iface_desc.num_endpoints), + endpoints: + Vec::with_capacity( + iface_desc.num_endpoints as usize), + other_descriptors: Vec::new(), } ); } }, - Descriptor::Endpoint(ep_desc) => { - if let (Some(config), Some(key)) = - (result.as_mut(), iface_key) - { + _ => match (result.as_mut(), iface_key) { + (Some(config), Some(key)) => { if let Some(iface) = config.interfaces.get_mut(&key) { - iface.endpoint_descriptors.push(ep_desc); + if let Descriptor::Endpoint(ep_desc) = descriptor { + ep_index = Some(iface.endpoints.len()); + iface.endpoints.push( + Endpoint { + descriptor: ep_desc, + other_descriptors: Vec::new() + } + ); + } else if let Some(i) = ep_index { + iface + .endpoints[i] + .other_descriptors + .push(descriptor); + } else { + iface.other_descriptors.push(descriptor); + } } } + (Some(config), None) => { + config.other_descriptors.push(descriptor); + } + _ => {} }, - _ => {}, }; } result @@ -1027,12 +1190,15 @@ pub mod prelude { StandardRequest, RequestType, Recipient, + Descriptor, DescriptorType, DeviceDescriptor, ConfigDescriptor, + InterfaceAssociationDescriptor, InterfaceDescriptor, EndpointDescriptor, Configuration, + Function, Interface, ControlTransfer, ControlResult, @@ -1040,12 +1206,12 @@ pub mod prelude { DeviceField, StringId, ConfigNum, - ConfigIfaceNum, ConfigField, + IfaceAssocField, InterfaceNum, InterfaceAlt, + InterfaceKey, InterfaceField, - InterfaceEpNum, EndpointNum, EndpointField, UTF16ByteVec, diff --git a/src/util.rs b/src/util.rs index f085a719..ae7f79c4 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,6 +1,7 @@ use anyhow::{Error, bail}; use num_format::{Locale, ToFormattedString}; use humansize::{SizeFormatter, BINARY}; +use itertools::Itertools; pub fn fmt_count(count: u64) -> String { count.to_formatted_string(&Locale::en) @@ -34,3 +35,17 @@ pub fn handle_thread_panic(result: std::thread::Result) } } } + +pub fn titlecase(text: &str) -> String { + format!("{}{}", + text + .chars() + .take(1) + .map(|c| c.to_uppercase().to_string()) + .join(""), + text + .chars() + .skip(1) + .collect::() + ) +} diff --git a/tests/analyzer-test-bad-cable/devices-reference.txt b/tests/analyzer-test-bad-cable/devices-reference.txt new file mode 100644 index 00000000..583111c5 --- /dev/null +++ b/tests/analyzer-test-bad-cable/devices-reference.txt @@ -0,0 +1,44 @@ +Device 1: USB Analyzer Test Device + Device descriptor + Length: 18 bytes + Type: 0x01 + USB Version: 2.00 + Class: 0x00: (Defined at Interface level) + Subclass: 0x00 + Protocol: 0x00 + Max EP0 packet size: 64 bytes + Vendor ID: 0x1209: Generic + Product ID: 0x000A: pid.codes Test PID + Version: 0.01 + Manufacturer string: #1 'Cynthion Project' + Product string: #2 'USB Analyzer Test Device' + Serial string: (none) + Configuration 1 + Configuration descriptor + Length: 9 bytes + Type: 0x02 + Total length: 25 bytes + Number of interfaces: 1 + Configuration number: 1 + Configuration string: (none) + Attributes: 0x80 + Max power: 500mA + Interface 0: Vendor Specific Class + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 0 + Alternate setting: 0 + Number of endpoints: 1 + Class: 0xFF: Vendor Specific Class + Subclass: 0xFF: Vendor Specific Subclass + Protocol: 0xFF: Vendor Specific Protocol + Interface string: (none) + Endpoint 1 IN (interrupt) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x81 + Attributes: 0x03 + Max packet size: 512 bytes + Interval: 0x05 diff --git a/tests/bad-crcs/devices-reference.txt b/tests/bad-crcs/devices-reference.txt new file mode 100644 index 00000000..603af12d --- /dev/null +++ b/tests/bad-crcs/devices-reference.txt @@ -0,0 +1,2 @@ +Device 7: Unknown + No device descriptor diff --git a/tests/emf2022-badge/devices-reference.txt b/tests/emf2022-badge/devices-reference.txt new file mode 100644 index 00000000..b2d6c28c --- /dev/null +++ b/tests/emf2022-badge/devices-reference.txt @@ -0,0 +1,215 @@ +Device 1: USB JTAG/serial debug unit\u{0} + Device descriptor + 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: 0x303A + Product ID: 0x1001 + Version: 1.01 + Manufacturer string: #1 'Espressif\u{0}' + Product string: #2 'USB JTAG/serial debug unit\u{0}' + Serial string: #3 'F4:12:FA:4D:F1:7C' + Configuration 1 + Configuration descriptor + Length: 9 bytes + Type: 0x02 + Total length: 98 bytes + Number of interfaces: 3 + Configuration number: 1 + Configuration string: (none) + Attributes: 0xC0 + Max power: 500mA + Function 0: Communications + Interface association descriptor + Length: 8 bytes + Type: 0x0B + First interface: 0 + Interface count: 2 + Function class: 0x02: Communications + Function subclass: 0x02: Abstract (modem) + Function protocol: 0x00: None + Function number: 0 + Interface 0: Communications + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 0 + Alternate setting: 0 + Number of endpoints: 1 + Class: 0x02: Communications + Subclass: 0x02: Abstract (modem) + Protocol: 0x00: None + Interface string: (none) + Class descriptor 0x24, 5 bytes + Class descriptor 0x24, 4 bytes + 2 times: Class descriptor 0x24, 5 bytes + Endpoint 2 IN (interrupt) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x82 + Attributes: 0x03 + Max packet size: 64 bytes + Interval: 0x01 + Interface 1: CDC Data + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 1 + Alternate setting: 0 + Number of endpoints: 2 + Class: 0x0A: CDC Data + Subclass: 0x02 + Protocol: 0x00 + Interface string: (none) + Endpoint 1 OUT (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x01 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x01 + Endpoint 1 IN (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x81 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x01 + Interface 2: Vendor Specific Class + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 2 + Alternate setting: 0 + Number of endpoints: 2 + Class: 0xFF: Vendor Specific Class + Subclass: 0xFF: Vendor Specific Subclass + Protocol: 0x01 + Interface string: (none) + Endpoint 2 OUT (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x02 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x01 + Endpoint 3 IN (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x83 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x01 +Device 2: TiDAL + Device descriptor + 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: 0x16D0: MCS + Product ID: 0x1114 + Version: 1.00 + Manufacturer string: #1 'Electromagnetic Field' + Product string: #2 'TiDAL' + Serial string: #3 '123456' + Configuration 1 + Configuration descriptor + Length: 9 bytes + Type: 0x02 + Total length: 100 bytes + Number of interfaces: 3 + Configuration number: 1 + Configuration string: (none) + Attributes: 0x80 + Max power: 500mA + Function 0: Communications + Interface association descriptor + Length: 8 bytes + Type: 0x0B + First interface: 0 + Interface count: 2 + Function class: 0x02: Communications + Function subclass: 0x02: Abstract (modem) + Function protocol: 0x00: None + Function number: 0 + Interface 0: Communications + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 0 + Alternate setting: 0 + Number of endpoints: 1 + Class: 0x02: Communications + Subclass: 0x02: Abstract (modem) + Protocol: 0x00: None + Interface string: #4 'Espressif CDC Device' + 2 times: Class descriptor 0x24, 5 bytes + Class descriptor 0x24, 4 bytes + Class descriptor 0x24, 5 bytes + Endpoint 1 IN (interrupt) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x81 + Attributes: 0x03 + Max packet size: 8 bytes + Interval: 0x10 + Interface 1: CDC Data + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 1 + Alternate setting: 0 + Number of endpoints: 2 + Class: 0x0A: CDC Data + Subclass: 0x00: Unused + Protocol: 0x00 + Interface string: (none) + Endpoint 2 OUT (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x02 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 + Endpoint 2 IN (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x82 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 + Interface 2: Human Interface Device + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 2 + Alternate setting: 0 + Number of endpoints: 1 + Class: 0x03: Human Interface Device + Subclass: 0x01: Boot Interface Subclass + Protocol: 0x01: Keyboard + Interface string: #5 'TiDAL badge' + Class descriptor 0x21, 9 bytes + Endpoint 3 IN (interrupt) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x83 + Attributes: 0x03 + Max packet size: 8 bytes + Interval: 0x0A diff --git a/tests/hackrf-connect/devices-reference.txt b/tests/hackrf-connect/devices-reference.txt new file mode 100644 index 00000000..5a389f25 --- /dev/null +++ b/tests/hackrf-connect/devices-reference.txt @@ -0,0 +1,52 @@ +Device 29: HackRF One + Device descriptor + Length: 18 bytes + Type: 0x01 + USB Version: 2.00 + Class: 0x00: (Defined at Interface level) + Subclass: 0x00 + Protocol: 0x00 + Max EP0 packet size: 64 bytes + Vendor ID: 0x1D50: OpenMoko, Inc. + Product ID: 0x6089: Great Scott Gadgets HackRF One SDR + Version: 1.06 + Manufacturer string: #1 'Great Scott Gadgets' + Product string: #2 'HackRF One' + Serial string: #4 '0000000000000000325866e6215c4023' + Configuration 1 + Configuration descriptor + Length: 9 bytes + Type: 0x02 + Total length: 32 bytes + Number of interfaces: 1 + Configuration number: 1 + Configuration string: #3 'Transceiver' + Attributes: 0x80 + Max power: 500mA + Interface 0: Vendor Specific Class + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 0 + Alternate setting: 0 + Number of endpoints: 2 + Class: 0xFF: Vendor Specific Class + Subclass: 0xFF: Vendor Specific Subclass + Protocol: 0xFF: Vendor Specific Protocol + Interface string: (none) + Endpoint 1 IN (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x81 + Attributes: 0x02 + Max packet size: 512 bytes + Interval: 0x00 + Endpoint 2 OUT (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x02 + Attributes: 0x02 + Max packet size: 512 bytes + Interval: 0x00 diff --git a/tests/hackrf-dfu-enum/devices-reference.txt b/tests/hackrf-dfu-enum/devices-reference.txt new file mode 100644 index 00000000..eb8a7916 --- /dev/null +++ b/tests/hackrf-dfu-enum/devices-reference.txt @@ -0,0 +1,37 @@ +Device 11: LPC + Device descriptor + Length: 18 bytes + Type: 0x01 + USB Version: 2.00 + Class: 0x00: (Defined at Interface level) + Subclass: 0x00 + Protocol: 0x00 + Max EP0 packet size: 64 bytes + Vendor ID: 0x1FC9: NXP Semiconductors + Product ID: 0x000C: LPC4330FET180 [ARM Cortex M4 + M0] (device firmware upgrade mode) + Version: 1.00 + Manufacturer string: #1 'NXP' + Product string: #2 'LPC' + Serial string: #3 'ABCD' + Configuration 1 + Configuration descriptor + Length: 9 bytes + Type: 0x02 + Total length: 27 bytes + Number of interfaces: 1 + Configuration number: 1 + Configuration string: (none) + Attributes: 0xC0 + Max power: 100mA + Interface 0: Application Specific Interface + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 0 + Alternate setting: 0 + Number of endpoints: 0 + Class: 0xFE: Application Specific Interface + Subclass: 0x01: Device Firmware Update + Protocol: 0x01 + Interface string: #4 'DFU' + Class descriptor 0x21, 9 bytes diff --git a/tests/hackrf-restart-failure/devices-reference.txt b/tests/hackrf-restart-failure/devices-reference.txt new file mode 100644 index 00000000..603af12d --- /dev/null +++ b/tests/hackrf-restart-failure/devices-reference.txt @@ -0,0 +1,2 @@ +Device 7: Unknown + No device descriptor diff --git a/tests/iso-ambiguous/devices-reference.txt b/tests/iso-ambiguous/devices-reference.txt new file mode 100644 index 00000000..b8914f64 --- /dev/null +++ b/tests/iso-ambiguous/devices-reference.txt @@ -0,0 +1,2 @@ +Device 27: Unknown + No device descriptor diff --git a/tests/iso-unambiguous/devices-reference.txt b/tests/iso-unambiguous/devices-reference.txt new file mode 100644 index 00000000..1b07d5f0 --- /dev/null +++ b/tests/iso-unambiguous/devices-reference.txt @@ -0,0 +1,232 @@ +Device 27: Ksoloti Core + Device descriptor + 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' + Configuration 1 + Configuration descriptor + 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 + Function 0: Audio + Interface association descriptor + Length: 8 bytes + Type: 0x0B + First interface: 0 + Interface count: 4 + Function class: 0x01: Audio + Function subclass: 0x00 + Function protocol: 0x20 + Function number: 0 + Interface 0: Audio + Interface descriptor + 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) + Class descriptor 0x24, 9 bytes + Class descriptor 0x24, 8 bytes + Class descriptor 0x24, 17 bytes + Class descriptor 0x24, 18 bytes + Class descriptor 0x24, 12 bytes + Class descriptor 0x24, 17 bytes + Class descriptor 0x24, 12 bytes + Interface 1: Audio + Interface descriptor + 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) + Interface 1 alt 1: Audio + Interface descriptor + 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) + Class descriptor 0x24, 16 bytes + Class descriptor 0x24, 6 bytes + Endpoint 3 OUT (isochronous) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x03 + Attributes: 0x09 + Max packet size: 196 bytes + Interval: 0x01 + Class descriptor 0x25, 8 bytes + Interface 1 alt 2: Audio + Interface descriptor + 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) + Class descriptor 0x24, 16 bytes + Class descriptor 0x24, 6 bytes + Endpoint 3 OUT (isochronous) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x03 + Attributes: 0x09 + Max packet size: 392 bytes + Interval: 0x01 + Class descriptor 0x25, 8 bytes + Interface 2: Audio + Interface descriptor + 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) + Interface 2 alt 1: Audio + Interface descriptor + 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) + Class descriptor 0x24, 16 bytes + Class descriptor 0x24, 6 bytes + Endpoint 3 IN (isochronous) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x83 + Attributes: 0x05 + Max packet size: 196 bytes + Interval: 0x01 + Class descriptor 0x25, 8 bytes + Interface 2 alt 2: Audio + Interface descriptor + 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) + Class descriptor 0x24, 16 bytes + Class descriptor 0x24, 6 bytes + Endpoint 3 IN (isochronous) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x83 + Attributes: 0x05 + Max packet size: 392 bytes + Interval: 0x01 + Class descriptor 0x25, 8 bytes + Interface 3: Audio + Interface descriptor + 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) + Class descriptor 0x24, 7 bytes + 2 times: Class descriptor 0x24, 6 bytes + 2 times: Class descriptor 0x24, 9 bytes + Endpoint 1 OUT (bulk) + Endpoint descriptor + Length: 9 bytes + Type: 0x05 + Endpoint address: 0x01 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 + Class descriptor 0x25, 5 bytes + Endpoint 1 IN (bulk) + Endpoint descriptor + Length: 9 bytes + Type: 0x05 + Endpoint address: 0x81 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 + Class descriptor 0x25, 5 bytes + Function 4: Vendor Specific Class + Interface association descriptor + Length: 8 bytes + Type: 0x0B + First interface: 4 + Interface count: 1 + Function class: 0xFF: Vendor Specific Class + Function subclass: 0x00 + Function protocol: 0x00 + Function number: 4 + Interface 4: Vendor Specific Class + Interface descriptor + 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' + Endpoint 2 OUT (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x02 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 + Endpoint 2 IN (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x82 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 diff --git a/tests/ksolti-core-enum/devices-reference.txt b/tests/ksolti-core-enum/devices-reference.txt new file mode 100644 index 00000000..1b07d5f0 --- /dev/null +++ b/tests/ksolti-core-enum/devices-reference.txt @@ -0,0 +1,232 @@ +Device 27: Ksoloti Core + Device descriptor + 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' + Configuration 1 + Configuration descriptor + 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 + Function 0: Audio + Interface association descriptor + Length: 8 bytes + Type: 0x0B + First interface: 0 + Interface count: 4 + Function class: 0x01: Audio + Function subclass: 0x00 + Function protocol: 0x20 + Function number: 0 + Interface 0: Audio + Interface descriptor + 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) + Class descriptor 0x24, 9 bytes + Class descriptor 0x24, 8 bytes + Class descriptor 0x24, 17 bytes + Class descriptor 0x24, 18 bytes + Class descriptor 0x24, 12 bytes + Class descriptor 0x24, 17 bytes + Class descriptor 0x24, 12 bytes + Interface 1: Audio + Interface descriptor + 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) + Interface 1 alt 1: Audio + Interface descriptor + 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) + Class descriptor 0x24, 16 bytes + Class descriptor 0x24, 6 bytes + Endpoint 3 OUT (isochronous) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x03 + Attributes: 0x09 + Max packet size: 196 bytes + Interval: 0x01 + Class descriptor 0x25, 8 bytes + Interface 1 alt 2: Audio + Interface descriptor + 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) + Class descriptor 0x24, 16 bytes + Class descriptor 0x24, 6 bytes + Endpoint 3 OUT (isochronous) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x03 + Attributes: 0x09 + Max packet size: 392 bytes + Interval: 0x01 + Class descriptor 0x25, 8 bytes + Interface 2: Audio + Interface descriptor + 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) + Interface 2 alt 1: Audio + Interface descriptor + 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) + Class descriptor 0x24, 16 bytes + Class descriptor 0x24, 6 bytes + Endpoint 3 IN (isochronous) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x83 + Attributes: 0x05 + Max packet size: 196 bytes + Interval: 0x01 + Class descriptor 0x25, 8 bytes + Interface 2 alt 2: Audio + Interface descriptor + 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) + Class descriptor 0x24, 16 bytes + Class descriptor 0x24, 6 bytes + Endpoint 3 IN (isochronous) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x83 + Attributes: 0x05 + Max packet size: 392 bytes + Interval: 0x01 + Class descriptor 0x25, 8 bytes + Interface 3: Audio + Interface descriptor + 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) + Class descriptor 0x24, 7 bytes + 2 times: Class descriptor 0x24, 6 bytes + 2 times: Class descriptor 0x24, 9 bytes + Endpoint 1 OUT (bulk) + Endpoint descriptor + Length: 9 bytes + Type: 0x05 + Endpoint address: 0x01 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 + Class descriptor 0x25, 5 bytes + Endpoint 1 IN (bulk) + Endpoint descriptor + Length: 9 bytes + Type: 0x05 + Endpoint address: 0x81 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 + Class descriptor 0x25, 5 bytes + Function 4: Vendor Specific Class + Interface association descriptor + Length: 8 bytes + Type: 0x0B + First interface: 4 + Interface count: 1 + Function class: 0xFF: Vendor Specific Class + Function subclass: 0x00 + Function protocol: 0x00 + Function number: 4 + Interface 4: Vendor Specific Class + Interface descriptor + 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' + Endpoint 2 OUT (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x02 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 + Endpoint 2 IN (bulk) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x82 + Attributes: 0x02 + Max packet size: 64 bytes + Interval: 0x00 diff --git a/tests/mouse/devices-reference.txt b/tests/mouse/devices-reference.txt new file mode 100644 index 00000000..b953e1e4 --- /dev/null +++ b/tests/mouse/devices-reference.txt @@ -0,0 +1,45 @@ +Device 4: USB Optical Mouse + Device descriptor + Length: 18 bytes + Type: 0x01 + USB Version: 2.00 + Class: 0x00: (Defined at Interface level) + Subclass: 0x00 + Protocol: 0x00 + Max EP0 packet size: 8 bytes + Vendor ID: 0x1BCF: Sunplus Innovation Technology Inc. + Product ID: 0x0005: Optical Mouse + Version: 0.14 + Manufacturer string: (none) + Product string: #2 'USB Optical Mouse' + Serial string: (none) + Configuration 1 + Configuration descriptor + Length: 9 bytes + Type: 0x02 + Total length: 34 bytes + Number of interfaces: 1 + Configuration number: 1 + Configuration string: (none) + Attributes: 0xA0 + Max power: 98mA + Interface 0: Human Interface Device + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 0 + Alternate setting: 0 + Number of endpoints: 1 + Class: 0x03: Human Interface Device + Subclass: 0x01: Boot Interface Subclass + Protocol: 0x02: Mouse + Interface string: (none) + Class descriptor 0x21, 9 bytes + Endpoint 1 IN (interrupt) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x81 + Attributes: 0x03 + Max packet size: 7 bytes + Interval: 0x0A diff --git a/tests/split-enum/devices-reference.txt b/tests/split-enum/devices-reference.txt new file mode 100644 index 00000000..ab8cce01 --- /dev/null +++ b/tests/split-enum/devices-reference.txt @@ -0,0 +1,67 @@ +Device 12: Unknown + No device descriptor +Device 14: USB Device + Device descriptor + Length: 18 bytes + Type: 0x01 + USB Version: 2.00 + Class: 0x00: (Defined at Interface level) + Subclass: 0x00 + Protocol: 0x00 + Max EP0 packet size: 8 bytes + Vendor ID: 0x0C45: Microdia + Product ID: 0x7403: Foot Switch + Version: 0.01 + Manufacturer string: #1 (not seen) + Product string: #2 'USB Device' + Serial string: (none) + Configuration 1 + Configuration descriptor + Length: 9 bytes + Type: 0x02 + Total length: 59 bytes + Number of interfaces: 2 + Configuration number: 1 + Configuration string: (none) + Attributes: 0xA0 + Max power: 100mA + Interface 0: Human Interface Device + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 0 + Alternate setting: 0 + Number of endpoints: 1 + Class: 0x03: Human Interface Device + Subclass: 0x01: Boot Interface Subclass + Protocol: 0x01: Keyboard + Interface string: (none) + Class descriptor 0x21, 9 bytes + Endpoint 1 IN (interrupt) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x81 + Attributes: 0x03 + Max packet size: 8 bytes + Interval: 0x0A + Interface 1: Human Interface Device + Interface descriptor + Length: 9 bytes + Type: 0x04 + Interface number: 1 + Alternate setting: 0 + Number of endpoints: 1 + Class: 0x03: Human Interface Device + Subclass: 0x01: Boot Interface Subclass + Protocol: 0x02: Mouse + Interface string: (none) + Class descriptor 0x21, 9 bytes + Endpoint 2 IN (interrupt) + Endpoint descriptor + Length: 7 bytes + Type: 0x05 + Endpoint address: 0x82 + Attributes: 0x03 + Max packet size: 5 bytes + Interval: 0x0A diff --git a/tests/split-poll/devices-reference.txt b/tests/split-poll/devices-reference.txt new file mode 100644 index 00000000..441a8293 --- /dev/null +++ b/tests/split-poll/devices-reference.txt @@ -0,0 +1,2 @@ +Device 14: Unknown + No device descriptor diff --git a/tests/ui/alt-settings/actions.json b/tests/ui/alt-settings/actions.json deleted file mode 100644 index 61b31282..00000000 --- a/tests/ui/alt-settings/actions.json +++ /dev/null @@ -1,30 +0,0 @@ -{"Open":"tests/ksolti-core-enum/capture.pcap"} -{"Update":212} -{"SetExpanded":["devices",0,true]} -{"SetExpanded":["devices",2,true]} -{"SetExpanded":["devices",4,true]} -{"SetExpanded":["devices",5,true]} -{"SetExpanded":["devices",15,true]} -{"SetExpanded":["devices",16,true]} -{"SetExpanded":["devices",26,true]} -{"SetExpanded":["devices",27,true]} -{"SetExpanded":["devices",37,true]} -{"SetExpanded":["devices",44,true]} -{"SetExpanded":["devices",45,true]} -{"SetExpanded":["devices",55,true]} -{"SetExpanded":["devices",62,true]} -{"SetExpanded":["devices",63,true]} -{"SetExpanded":["devices",73,true]} -{"SetExpanded":["devices",74,true]} -{"SetExpanded":["devices",84,true]} -{"SetExpanded":["devices",91,true]} -{"SetExpanded":["devices",92,true]} -{"SetExpanded":["devices",102,true]} -{"SetExpanded":["devices",109,true]} -{"SetExpanded":["devices",110,true]} -{"SetExpanded":["devices",120,true]} -{"SetExpanded":["devices",127,true]} -{"SetExpanded":["devices",134,true]} -{"SetExpanded":["devices",135,true]} -{"SetExpanded":["devices",145,true]} -{"SetExpanded":["devices",152,true]} diff --git a/tests/ui/alt-settings/reference.txt b/tests/ui/alt-settings/reference.txt deleted file mode 100644 index e355eb31..00000000 --- a/tests/ui/alt-settings/reference.txt +++ /dev/null @@ -1,517 +0,0 @@ -Opening file tests/ksolti-core-enum/capture.pcap -Updating after 212 packets decoded -At traffic-hierarchical 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 traffic-transactions row 0: -+ 30 SOF packets -+ SETUP transaction on 0.0 with 8 data bytes, ACK: [00, 05, 1B, 00, 00, 00, 00, 00] -+ IN transaction on 0.0, NAK -+ IN transaction on 0.0 with no data, ACK -+ 4 SOF packets -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 00, 01, 00, 00, 08, 00] -+ IN transaction on 27.0, NAK -+ IN transaction on 27.0 with 8 data bytes, ACK: [12, 01, 00, 02, EF, 02, 01, 40] -+ OUT transaction on 27.0 with no data, ACK -+ 2 SOF packets -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 00, 01, 00, 00, 12, 00] -+ 1 SOF packets -+ IN transaction on 27.0, NAK -+ 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] -+ OUT transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 05, 03, 09, 04, 02, 00] -+ IN transaction on 27.0, NAK -+ IN transaction on 27.0 with 2 data bytes, ACK: [1A, 03] -+ OUT transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 05, 03, 09, 04, 1A, 00] -+ IN transaction on 27.0, NAK -+ 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] -+ OUT transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 01, 03, 09, 04, 02, 00] -+ IN transaction on 27.0, NAK -+ IN transaction on 27.0 with 2 data bytes, ACK: [10, 03] -+ OUT transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 01, 03, 09, 04, 10, 00] -+ IN transaction on 27.0, NAK -+ 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] -+ OUT transaction on 27.0 with no data, ACK -+ 1 SOF packets -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 03, 03, 09, 04, 02, 00] -+ IN transaction on 27.0, NAK -+ IN transaction on 27.0 with 2 data bytes, ACK: '2\x03' -+ OUT transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 03, 03, 09, 04, 32, 00] -+ IN transaction on 27.0, NAK -+ 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] -+ OUT transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 00, 02, 00, 00, 09, 00] -+ IN transaction on 27.0, NAK -+ IN transaction on 27.0 with 9 data bytes, ACK: [09, 02, AA, 01, 05, 01, 05, C0, 32] -+ OUT transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 00, 02, 00, 00, AA, 01] -+ IN transaction on 27.0, NAK -+ 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 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 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 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] -+ 1 SOF packets -+ 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 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 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] -+ OUT transaction on 27.0 with no data, ACK -+ 2 SOF packets -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [00, 09, 01, 00, 00, 00, 00, 00] -+ IN transaction on 27.0, NAK -+ IN transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 04, 03, 09, 04, 02, 00] -+ IN transaction on 27.0, NAK -+ IN transaction on 27.0 with 2 data bytes, ACK: '.\x03' -+ OUT transaction on 27.0 with no data, ACK -+ SETUP transaction on 27.0 with 8 data bytes, ACK: [80, 06, 04, 03, 09, 04, 2E, 00] -+ IN transaction on 27.0, NAK -+ 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] -+ 1 SOF packets -+ OUT transaction on 27.0 with no data, ACK -+ 4 SOF packets -At traffic-packets row 0: -+ 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 -+ 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 packet on 0.0, CRC 02 -+ NAK packet -+ IN packet on 0.0, CRC 02 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ 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 packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ SOF packet with frame number 918, CRC 17 -+ SOF packet with frame number 919, CRC 08 -+ 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 -+ SOF packet with frame number 920, CRC 09 -+ IN packet on 27.0, CRC 18 -+ NAK packet -+ 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 packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ IN packet on 27.0, CRC 18 -+ DATA1 packet with CRC 2EB5 and 2 data bytes: [1A, 03] -+ ACK packet -+ OUT packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ 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 packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ IN packet on 27.0, CRC 18 -+ DATA1 packet with CRC 8EB3 and 2 data bytes: [10, 03] -+ ACK packet -+ OUT packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ 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 packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ SOF packet with frame number 921, CRC 16 -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ IN packet on 27.0, CRC 18 -+ DATA1 packet with CRC 2EAB and 2 data bytes: '2\x03' -+ ACK packet -+ OUT packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ 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 packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ 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 packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ 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 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 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 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 -+ SOF packet with frame number 922, CRC 1E -+ 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 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 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 packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ SOF packet with frame number 923, CRC 01 -+ SOF packet with frame number 924, CRC 0E -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ IN packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ IN packet on 27.0, CRC 18 -+ DATA1 packet with CRC EEA3 and 2 data bytes: '.\x03' -+ ACK packet -+ OUT packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 packet on 27.0, CRC 18 -+ NAK packet -+ 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 -+ SOF packet with frame number 925, CRC 11 -+ OUT packet on 27.0, CRC 18 -+ DATA1 packet with CRC 0000 and no data -+ ACK packet -+ 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 -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 2: Configuration 1 -At devices row 3: -+ 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 4: Interface 0 -At devices row 5: -+ Interface descriptor -Expanding devices view, row 5: Interface descriptor -At devices row 6: -+ 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 15: Interface 1 -At devices row 16: -+ Interface descriptor -Expanding devices view, row 16: Interface descriptor -At devices row 17: -+ 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 26: Interface 1 (alternate 1) -At devices row 27: -+ Interface descriptor -+ Endpoint 3 OUT (isochronous) -Expanding devices view, row 27: Interface descriptor -At devices row 28: -+ 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 37: Endpoint 3 OUT (isochronous) -At devices row 38: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x03 -+ Attributes: 0x09 -+ Max packet size: 196 bytes -+ Interval: 0x01 -Expanding devices view, row 44: Interface 1 (alternate 2) -At devices row 45: -+ Interface descriptor -+ Endpoint 3 OUT (isochronous) -Expanding devices view, row 45: Interface descriptor -At devices row 46: -+ 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 55: Endpoint 3 OUT (isochronous) -At devices row 56: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x03 -+ Attributes: 0x09 -+ Max packet size: 392 bytes -+ Interval: 0x01 -Expanding devices view, row 62: Interface 2 -At devices row 63: -+ Interface descriptor -Expanding devices view, row 63: Interface descriptor -At devices row 64: -+ 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 73: Interface 2 (alternate 1) -At devices row 74: -+ Interface descriptor -+ Endpoint 3 IN (isochronous) -Expanding devices view, row 74: Interface descriptor -At devices row 75: -+ 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 84: Endpoint 3 IN (isochronous) -At devices row 85: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x83 -+ Attributes: 0x05 -+ Max packet size: 196 bytes -+ Interval: 0x01 -Expanding devices view, row 91: Interface 2 (alternate 2) -At devices row 92: -+ Interface descriptor -+ Endpoint 3 IN (isochronous) -Expanding devices view, row 92: Interface descriptor -At devices row 93: -+ 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 102: Endpoint 3 IN (isochronous) -At devices row 103: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x83 -+ Attributes: 0x05 -+ Max packet size: 392 bytes -+ Interval: 0x01 -Expanding devices view, row 109: Interface 3 -At devices row 110: -+ Interface descriptor -+ Endpoint 1 OUT (bulk) -+ Endpoint 1 IN (bulk) -Expanding devices view, row 110: Interface descriptor -At devices row 111: -+ 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 120: Endpoint 1 OUT (bulk) -At devices row 121: -+ Length: 9 bytes -+ Type: 0x05 -+ Endpoint address: 0x01 -+ Attributes: 0x02 -+ Max packet size: 64 bytes -+ Interval: 0x00 -Expanding devices view, row 127: Endpoint 1 IN (bulk) -At devices row 128: -+ Length: 9 bytes -+ Type: 0x05 -+ Endpoint address: 0x81 -+ Attributes: 0x02 -+ Max packet size: 64 bytes -+ Interval: 0x00 -Expanding devices view, row 134: Interface 4 -At devices row 135: -+ Interface descriptor -+ Endpoint 2 OUT (bulk) -+ Endpoint 2 IN (bulk) -Expanding devices view, row 135: Interface descriptor -At devices row 136: -+ 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 145: Endpoint 2 OUT (bulk) -At devices row 146: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x02 -+ Attributes: 0x02 -+ Max packet size: 64 bytes -+ Interval: 0x00 -Expanding devices view, row 152: Endpoint 2 IN (bulk) -At devices row 153: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x82 -+ Attributes: 0x02 -+ Max packet size: 64 bytes -+ Interval: 0x00 diff --git a/tests/ui/emf2022-badge/actions.json b/tests/ui/emf2022-badge/actions.json index 685c79d7..b5457270 100644 --- a/tests/ui/emf2022-badge/actions.json +++ b/tests/ui/emf2022-badge/actions.json @@ -1,20 +1,6 @@ {"Open":"tests/emf2022-badge/capture.pcap"} {"Update":3710} {"Update":4406} -{"SetExpanded":["devices",0,true]} -{"SetExpanded":["devices",1,true]} -{"SetExpanded":["devices",15,true]} -{"SetExpanded":["devices",17,true]} -{"SetExpanded":["devices",20,true]} -{"SetExpanded":["devices",24,true]} -{"SetExpanded":["devices",28,true]} -{"SetExpanded":["devices",30,true]} -{"SetExpanded":["devices",34,true]} -{"SetExpanded":["devices",33,true]} -{"SetExpanded":["devices",35,true]} -{"SetExpanded":["devices",42,true]} -{"SetExpanded":["devices",15,false]} -{"SetExpanded":["devices",0,false]} {"SetExpanded":["traffic-hierarchical",10,true]} {"SetExpanded":["traffic-hierarchical",12,true]} {"SetExpanded":["traffic-hierarchical",33,true]} @@ -24,4 +10,3 @@ {"SetExpanded":["traffic-hierarchical",33,false]} {"SetExpanded":["traffic-hierarchical",10,false]} {"SetExpanded":["traffic-hierarchical",29,false]} -{"SetExpanded":["devices",1,false]} diff --git a/tests/ui/emf2022-badge/reference.txt b/tests/ui/emf2022-badge/reference.txt index 1d4c6ebb..d60e90cf 100644 --- a/tests/ui/emf2022-badge/reference.txt +++ b/tests/ui/emf2022-badge/reference.txt @@ -5123,115 +5123,6 @@ At traffic-packets row 3710: + SOF packet with frame number 350, CRC 0E + SOF packet with frame number 351, CRC 11 + SOF packet with frame number 352, CRC 1D -Expanding devices view, row 0: Device 1: USB JTAG/serial debug unit\u{0} -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: 0x303A -+ Product ID: 0x1001 -+ Version: 1.01 -+ Manufacturer string: #1 'Espressif\u{0}' -+ Product string: #2 'USB JTAG/serial debug unit\u{0}' -+ Serial string: #3 'F4:12:FA:4D:F1:7C' -Expanding devices view, row 15: Configuration 1 -At devices row 16: -+ Configuration descriptor -+ Interface 0 -+ Interface 1 -+ Interface 2 -Expanding devices view, row 17: Interface 0 -At devices row 18: -+ Interface descriptor -+ Endpoint 2 IN (interrupt) -Expanding devices view, row 20: Interface 1 -At devices row 21: -+ Interface descriptor -+ Endpoint 1 OUT (bulk) -+ Endpoint 1 IN (bulk) -Expanding devices view, row 24: Interface 2 -At devices row 25: -+ Interface descriptor -+ Endpoint 2 OUT (bulk) -+ Endpoint 3 IN (bulk) -Expanding devices view, row 28: Device 2: TiDAL -At devices row 29: -+ Device descriptor -+ Configuration 1 -Expanding devices view, row 30: Configuration 1 -At devices row 31: -+ Configuration descriptor -+ Interface 0 -+ Interface 1 -+ Interface 2 -Expanding devices view, row 34: Interface 2 -At devices row 35: -+ Interface descriptor -+ Endpoint 3 IN (interrupt) -Expanding devices view, row 33: Interface 1 -At devices row 34: -+ Interface descriptor -+ Endpoint 2 OUT (bulk) -+ Endpoint 2 IN (bulk) -Expanding devices view, row 35: Endpoint 2 OUT (bulk) -At devices row 36: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x02 -+ Attributes: 0x02 -+ Max packet size: 64 bytes -+ Interval: 0x00 -Expanding devices view, row 42: Endpoint 2 IN (bulk) -At devices row 43: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x82 -+ Attributes: 0x02 -+ Max packet size: 64 bytes -+ Interval: 0x00 -Collapsing devices view, row 15: Configuration 1 -At devices row 18: -- Interface descriptor -- Endpoint 2 IN (interrupt) -At devices row 19: -- Interface descriptor -- Endpoint 1 OUT (bulk) -- Endpoint 1 IN (bulk) -At devices row 20: -- Interface descriptor -- Endpoint 2 OUT (bulk) -- Endpoint 3 IN (bulk) -At devices row 16: -- Configuration descriptor -- Interface 0 -- Interface 1 -- Interface 2 -Collapsing devices view, row 0: Device 1: USB JTAG/serial debug unit\u{0} -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: 0x303A -- Product ID: 0x1001 -- Version: 1.01 -- Manufacturer string: #1 'Espressif\u{0}' -- Product string: #2 'USB JTAG/serial debug unit\u{0}' -- Serial string: #3 'F4:12:FA:4D:F1:7C' -At devices row 1: -- Device descriptor -- Configuration 1 Expanding traffic-hierarchical view, row 10: Getting string descriptor #2, language 0x0409 (English/US) for device 1, reading 56 of 255 requested bytes: 'USB JTAG/serial debug unit\u{0}' At traffic-hierarchical row 11: + SETUP transaction on 1.0 with 8 data bytes, ACK: [80, 06, 02, 03, 09, 04, FF, 00] @@ -5293,33 +5184,3 @@ At traffic-hierarchical row 30: - OUT transaction on 2.0 with 7 data bytes, ACK: [80, 25, 00, 00, 00, 00, 08] - IN transaction on 2.0, NAK - IN transaction on 2.0 with no data, ACK -Collapsing devices view, row 1: Device 2: TiDAL -At devices row 9: -- Length: 7 bytes -- Type: 0x05 -- Endpoint address: 0x02 -- Attributes: 0x02 -- Max packet size: 64 bytes -- Interval: 0x00 -At devices row 10: -- Length: 7 bytes -- Type: 0x05 -- Endpoint address: 0x82 -- Attributes: 0x02 -- Max packet size: 64 bytes -- Interval: 0x00 -At devices row 7: -- Interface descriptor -- Endpoint 2 OUT (bulk) -- Endpoint 2 IN (bulk) -At devices row 8: -- Interface descriptor -- Endpoint 3 IN (interrupt) -At devices row 4: -- Configuration descriptor -- Interface 0 -- Interface 1 -- Interface 2 -At devices row 2: -- Device descriptor -- Configuration 1 diff --git a/tests/ui/mouse-step/actions.json b/tests/ui/mouse-step/actions.json index e39ea4bf..b7f71fcb 100644 --- a/tests/ui/mouse-step/actions.json +++ b/tests/ui/mouse-step/actions.json @@ -41,7 +41,6 @@ {"Update":33} {"Update":34} {"Update":35} -{"SetExpanded":["devices",0,true]} {"Update":36} {"Update":37} {"Update":38} @@ -66,7 +65,6 @@ {"Update":57} {"Update":58} {"Update":59} -{"SetExpanded":["devices",1,true]} {"Update":60} {"Update":61} {"Update":62} @@ -85,8 +83,6 @@ {"Update":75} {"Update":76} {"Update":77} -{"SetExpanded":["devices",15,true]} -{"SetExpanded":["devices",16,true]} {"Update":78} {"Update":79} {"Update":80} @@ -126,9 +122,6 @@ {"Update":114} {"Update":115} {"Update":116} -{"SetExpanded":["devices",25,true]} -{"SetExpanded":["devices",26,true]} -{"SetExpanded":["devices",36,true]} {"Update":117} {"Update":118} {"Update":119} @@ -178,8 +171,6 @@ {"Update":163} {"Update":164} {"SetExpanded":["traffic-hierarchical",29,true]} -{"SetExpanded":["devices",15,false]} -{"SetExpanded":["devices",0,false]} {"SetExpanded":["traffic-hierarchical",29,false]} {"SetExpanded":["traffic-hierarchical",3,false]} {"SetExpanded":["traffic-hierarchical",0,false]} diff --git a/tests/ui/mouse-step/reference.txt b/tests/ui/mouse-step/reference.txt index 52fa9dd9..14b6e9b4 100644 --- a/tests/ui/mouse-step/reference.txt +++ b/tests/ui/mouse-step/reference.txt @@ -386,9 +386,6 @@ At traffic-packets row 34: + SETUP packet on 4.0, CRC 05 At devices row 0: + Device 4: Unknown -Expanding devices view, row 0: Device 4: Unknown -At devices row 1: -+ No device descriptor Updating after 36 packets decoded At traffic-transactions row 14: - SETUP transaction on 4.0 @@ -554,24 +551,6 @@ At traffic-packets row 58: At devices row 0: - Device 4: Unknown + Device 4: 1BCF:0005 -At devices row 1: -- No device descriptor -+ Device descriptor -Expanding devices view, row 1: No device descriptor -At devices row 2: -+ Length: 18 bytes -+ Type: 0x01 -+ USB Version: 2.00 -+ Class: 0x00: (Defined at Interface level) -+ Subclass: 0x00 -+ Protocol: 0x00 -+ Max EP0 packet size: 8 bytes -+ Vendor ID: 0x1BCF: Sunplus Innovation Technology Inc. -+ Product ID: 0x0005: Optical Mouse -+ Version: 0.14 -+ Manufacturer string: (none) -+ Product string: #2 (not seen) -+ Serial string: (none) Updating after 60 packets decoded At traffic-hierarchical row 26: + Incomplete control transfer on device 4 @@ -696,21 +675,6 @@ At traffic-packets row 76: At devices row 0: - Device 4: Unknown + Device 4: 1BCF:0005 -At devices row 15: -+ Configuration 1 -Expanding devices view, row 15: Configuration 1 -At devices row 16: -+ Configuration descriptor -Expanding devices view, row 16: Configuration descriptor -At devices row 17: -+ Length: 9 bytes -+ Type: 0x02 -+ Total length: 34 bytes -+ Number of interfaces: 1 -+ Configuration number: 1 -+ Configuration string: (none) -+ Attributes: 0xA0 -+ Max power: 98mA Updating after 78 packets decoded At traffic-hierarchical row 27: + Incomplete control transfer on device 4 @@ -982,31 +946,6 @@ At traffic-packets row 115: At devices row 0: - Device 4: Unknown + Device 4: 1BCF:0005 -At devices row 25: -+ Interface 0 -Expanding devices view, row 25: Interface 0 -At devices row 26: -+ Interface descriptor -+ Endpoint 1 IN (interrupt) -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: 1 -+ Class: 0x03: Human Interface Device -+ Subclass: 0x01: Boot Interface Subclass -+ Protocol: 0x02: Mouse -+ Interface string: (none) -Expanding devices view, row 36: Endpoint 1 IN (interrupt) -At devices row 37: -+ Length: 7 bytes -+ Type: 0x05 -+ Endpoint address: 0x81 -+ Attributes: 0x03 -+ Max packet size: 7 bytes -+ Interval: 0x0A Updating after 117 packets decoded At traffic-hierarchical row 28: + Incomplete control transfer on device 4 @@ -1337,9 +1276,6 @@ At traffic-packets row 163: At devices row 0: - Device 4: Unknown + Device 4: USB Optical Mouse -At devices row 13: -- Product string: #2 (not seen) -+ Product string: #2 'USB Optical Mouse' Expanding traffic-hierarchical view, row 29: Incomplete control transfer on device 4 At traffic-hierarchical row 30: + SETUP transaction on 4.0 with 8 data bytes, ACK: [80, 06, 02, 03, 09, 04, FF, 00] @@ -1353,57 +1289,6 @@ At traffic-hierarchical row 30: + IN transaction on 4.0, NAK + IN transaction on 4.0 with 4 data bytes, ACK: [73, 00, 65, 00] + OUT transaction on 4.0 with no data, ACK -Collapsing devices view, row 15: Configuration 1 -At devices row 17: -- Length: 9 bytes -- Type: 0x02 -- Total length: 34 bytes -- Number of interfaces: 1 -- Configuration number: 1 -- Configuration string: (none) -- Attributes: 0xA0 -- Max power: 98mA -At devices row 19: -- Length: 9 bytes -- Type: 0x04 -- Interface number: 0 -- Alternate setting: 0 -- Number of endpoints: 1 -- Class: 0x03: Human Interface Device -- Subclass: 0x01: Boot Interface Subclass -- Protocol: 0x02: Mouse -- Interface string: (none) -At devices row 20: -- Length: 7 bytes -- Type: 0x05 -- Endpoint address: 0x81 -- Attributes: 0x03 -- Max packet size: 7 bytes -- Interval: 0x0A -At devices row 18: -- Interface descriptor -- Endpoint 1 IN (interrupt) -At devices row 16: -- Configuration descriptor -- Interface 0 -Collapsing devices view, row 0: Device 4: Unknown -At devices row 2: -- Length: 18 bytes -- Type: 0x01 -- USB Version: 2.00 -- Class: 0x00: (Defined at Interface level) -- Subclass: 0x00 -- Protocol: 0x00 -- Max EP0 packet size: 8 bytes -- Vendor ID: 0x1BCF: Sunplus Innovation Technology Inc. -- Product ID: 0x0005: Optical Mouse -- Version: 0.14 -- Manufacturer string: (none) -- Product string: #2 (not seen) -- Serial string: (none) -At devices row 1: -- No device descriptor -- Configuration 1 Collapsing traffic-hierarchical view, row 29: Incomplete control transfer on device 4 At traffic-hierarchical row 30: - SETUP transaction on 4.0 with 8 data bytes, ACK: [80, 06, 02, 03, 09, 04, FF, 00] diff --git a/tests/ui/tests.txt b/tests/ui/tests.txt index d01280ae..9cece9f4 100644 --- a/tests/ui/tests.txt +++ b/tests/ui/tests.txt @@ -1,4 +1,3 @@ -alt-settings emf2022-badge mouse-step split-poll-step