LibUsbDotNet仅在写入时发送第一个字节

时间:2017-06-19 19:40:06

标签: c# usb libusbdotnet

我使用LibUsbDotNet在C#中读取和写入usb,但是当写入USB时它只发送第一个字节,因此在UsbEndpointWriter或UsbDevice上需要特殊配置?即使我测试SerialPort类发送数据,我也有同样的问题。

PC将USB检测为虚拟COM端口。

我的USB设备描述符:

STMicroelectronics.- STMicroelectronics Virtual COM Port
OSVersion: Microsoft Windows NT 6.2 .9200 .0 LibUsbDotNet
Version: 2.2 .8 .104
DriverMode: LibUsb
Length: 18
DescriptorType: Device
BcdUsb: 0x0200
Class: Comm
SubClass: 0x02
Protocol: 0x00
MaxPacketSize0: 64
VendorID: 0x0483
ProductID: 0x5740
BcdDevice: 0x0200
ManufacturerStringIndex: 1
ProductStringIndex: 2
SerialStringIndex: 3
ConfigurationCount: 1
ManufacturerString: Altin Payesh Sanat
    ,Inc.
ProductString: Altins Mono Recorder
SerialString: 00000000001 A

CONFIG#1长度:9

  DescriptorType:Configuration TotalLength:67 InterfaceCount:2 ConfigID:1 
  StringIndex:0 Attributes:0xC0 MaxPower:50 ConfigString:

接口(0,0)长度:9

 DescriptorType:Interface InterfaceID:0 AlternateID:0 EndpointCount:1 
 Class:Comm SubClass:0x02 Protocol:0x01 StringIndex:0 InterfaceString:

ENDPOINT 0x82长度:7

 DescriptorType:Endpoint EndpointID:0x82 Attributes:0x03 MaxPacketSize:8 
 Interval:16 Refresh:0 SynchAddress:0x00

接口(1,0)长度:9

 DescriptorType:Interface InterfaceID:1 AlternateID:0 EndpointCount:2 
 Class:Data SubClass:0x00 Protocol:0x00 StringIndex:0 InterfaceString:

ENDPOINT 0x01长度:7

 DescriptorType:Endpoint EndpointID:0x01 Attributes:0x02 MaxPacketSize:64 
 Interval:0 Refresh:0 SynchAddress:0x00

ENDPOINT 0x81长度:7

 DescriptorType:Endpoint EndpointID:0x81 Attributes:0x02 MaxPacketSize:64 
 Interval:0 Refresh:0 SynchAddress:0x00

0 个答案:

没有答案