为什么使用Perl的Device :: USB进行USB批量传输会被切断?

SOS*_*SOS 19 linux usb perl

我运行在Linux上运行的Perl代码:

my $command = "\x{11}\x{22}\x{33}\x{44}\x{55}\x{66}\x{77}\x{88}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}"; # total of 20 bytes to transmit
my $bytesWritten = $device->bulk_write(0x01, $command, 1000);
Run Code Online (Sandbox Code Playgroud)

使用Wireshark,我发现传输的实际应用程序数据是

0000    00 00 00 00 00 00 00 00    00 00 00 00 00 00 00 00
0010    00 00 00 00 00 00 00 00    11 22 33 44
Run Code Online (Sandbox Code Playgroud)

打印$bytesWritten显示传输了20个字节,但这与Wireshark捕获的不同.

可能是什么问题呢?

the*_*amk 1

Perl 程序可能运行正常。

我见过wireshark截断USB数据包(另一参考: http://www.mail-archive.com/tcpdump-workers@lists.tcpdump.org/msg04042.html)。

我必须使用“usbmon”应用程序来获取完整的捕获: http://people.redhat.com/zaitcev/linux/