打印

PIPE MaxTransferSize怎么设置?

[复制链接]
4273|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
https://bbs.21ic.com/icview-109584-1-1.html
这个帖子里写的设置PIPE MaxTransferSize这个要怎么设置?应该是usb pc端驱动里面的吧,难道还要先去自学怎么写usb驱动才能改么....
沙发
jimmjimm|  楼主 | 2013-8-15 14:33 | 只看该作者
解决了,不需要学会驱动,参考了winddk的范例以后,网上下一个stmcdc.inf文件在[DriverInstall.nt.AddReg]和[DriverInstall.NTamd64.AddReg]末尾加上HKR,"Parameters","MaximumTransferSize",0xFFFF,65535,然后再在设备管理器里选手动更新,选择inf文件就好了
inf 全部代码

;------------------------------------------------------------------------------
; STMicroelectronics Comunication Device Class driver (CDC) INF FILE
; (C)2009 Copyright STMicroelectronics
;------------------------------------------------------------------------------

[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MANUFACTURER%
LayoutFile=layout.inf
;CatalogFile=%FILENAME%.cat

DriverVer= 9/20/2011,1.4.1

[Manufacturer]
%MANUFACTURER%=DeviceList,NTamd64

[DestinationDirs]
DefaultDestDir=12


;------------------------------------------------------------------------------
;              Windows 2000/XP/Vista32 Support
;------------------------------------------------------------------------------
[DriverInstall.nt]
include=mdmcpq.inf
CopyFiles=DriverCopyFiles.nt
AddReg=DriverInstall.nt.AddReg

[DriverCopyFiles.nt]
usbser.sys,,,0x20

[DriverInstall.nt.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
HKR,"Parameters","MaximumTransferSize",0xFFFF,65535
[DriverInstall.nt.Services]
AddService=usbser, 0x00000002, DriverService.nt

[DriverService.nt]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\%DRIVERFILENAME%.sys



;------------------------------------------------------------------------------
;              Windows Vista64 Support
;------------------------------------------------------------------------------

[DriverInstall.NTamd64]
include=mdmcpq.inf
CopyFiles=DriverCopyFiles.NTamd64
AddReg=DriverInstall.NTamd64.AddReg

[DriverCopyFiles.NTamd64]
%DRIVERFILENAME%.sys,,,0x20

[DriverInstall.NTamd64.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
HKR,"Parameters","MaximumTransferSize",0xFFFF,65535

[DriverInstall.NTamd64.Services]
AddService=usbser, 0x00000002, DriverService.NTamd64

[DriverService.NTamd64]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\%DRIVERFILENAME%.sys


;------------------------------------------------------------------------------
;            VID/PID Settings
;------------------------------------------------------------------------------
[SourceDisksFiles]
[SourceDisksNames]
[DeviceList]
%DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5740

[DeviceList.NTamd64]
%DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5740


;------------------------------------------------------------------------------
;              String Definitions
;------------------------------------------------------------------------------
[Strings]

FILENAME="ST_Virtual"
DRIVERFILENAME ="usbser"
MANUFACTURER="STMicroelectronics"
INSTDISK="CDC_DISK"
DESCRIPTION="STM Virtual COM Port"
SERVICE="Virtual Com Driver"


结合链接里的东西,传输速度可以到达1m/s左右,比原来的20kb好太多了

使用特权

评论回复
评论
BACKCall 2022-6-24 18:00 回复TA
所以怎么测速度@abswzp 
板凳
abswzp| | 2015-9-30 10:00 | 只看该作者
这么改能行吗? USB协议里是有规定的,全速设备的bulk模式,包长最大就是64字节.我参考的是圈圈的书

使用特权

评论回复
地板
wulmg| | 2017-5-26 09:33 | 只看该作者

使用特权

评论回复
5
heluo1985| | 2018-9-7 13:57 | 只看该作者
嗯  楼主的方法不错。。。。。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

24

主题

56

帖子

1

粉丝