CH375驅(qū)動HP-1022激光打印機的問題???

以往用AT89C55+CH375驅(qū)動EPSON打印機,現(xiàn)改用HP-1022激光打印機后,傳數(shù)據(jù)到打印機的速度特慢,大約只有600字節(jié)每秒,而數(shù)據(jù)是正確的,因為等十幾分鐘后就可以打印出東西來。改用三星的1610后,數(shù)據(jù)傳送速度是基本正常的,不知HP的怎么會不行?? (好象1610是USB1。1的,而HP-1022是USB2。0的,但CH375是兩種都支持的)

你可以不可以將HP-1022的描述符貼出來看下撒


Device Descriptor: bcdUSB: 0x0200 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x40 (64) idVendor: 0x03F0 (Hewlett Packard) idProduct: 0x2C17 bcdDevice: 0x0100 iManufacturer: 0x01 0x0409: "Hewlett-Packard" iProduct: 0x02 0x0409: "HP LaserJet 1022" iSerialNumber: 0x03 0x0409: "FL02R56" bNumConfigurations: 0x01

ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: Full Device Address: 0x01 Open Pipes: 2

Endpoint Descriptor: bEndpointAddress: 0x01 Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00

Endpoint Descriptor: bEndpointAddress: 0x81 Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00

Configuration Descriptor: wTotalLength: 0x0020 bNumInterfaces: 0x01 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xC0 (Bus Powered Self Powered ) MaxPower: 0x31 (98 Ma)

Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x02 bInterfaceClass: 0x07 bInterfaceSubClass: 0x01 bInterfaceProtocol: 0x02 iInterface: 0x00


首先,你的單片機獲取到了描述符,你在你的枚舉初始化里要進行處理


同時,你還要將wMaxPacketSize修改為64


wMaxPacketSize 和端點地址怎么改在CH375上用什么命令?有沒有SET_Descriptor這條的? 三星的的確有點不同, Device Descriptor: bcdUSB: 0x0110 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x10 (16) idVendor: 0x04E8 idProduct: 0x3268 bcdDevice: 0x0100 iManufacturer: 0x01 0x0409: "Samsung Electronics Co., Ltd." iProduct: 0x02 0x0409: "Samsung ML-1610 Series" iSerialNumber: 0x03 0x0409: "3940BKAL219578Z." bNumConfigurations: 0x01

ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: Full Device Address: 0x01 Open Pipes: 2

Endpoint Descriptor: bEndpointAddress: 0x03 Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00

Endpoint Descriptor: bEndpointAddress: 0x81 Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00

Configuration Descriptor: wTotalLength: 0x0020 bNumInterfaces: 0x01 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xC0 (Bus Powered Self Powered ) MaxPower: 0x01 (2 Ma)

Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x02 bInterfaceClass: 0x07 bInterfaceSubClass: 0x01 bInterfaceProtocol: 0x02 iInterface: 0x00



不是的


usbxf 聽另一個大哥說把包改為64,如果設備能允許修改的話(用Set_Descriptor),問題是否能解決?


你可以發(fā)送該請求試試,大部分的USB設備都不支持該請求.我想這臺打印機也不可能支持,因為如果支持設置描述符的話,它不如在設備描述符中告訴支持多個配置了,那樣我們選擇最大64字節(jié)的數(shù)據(jù)包的配置就可以了.


h還有一個問題你在使用該2.0打印機時使用的是不是64字節(jié)的包長度傳輸?shù)陌?? 會不會在設置最大包長度上有問題啊??比如說你將長度設置為2字節(jié).這時的速度就會慢的可憐了.


是64的,我用BUS Hound來抓了一次,幫忙看一下有沒有其它配置?


31.0 CTL 00 09 00 00 00 00 00 00 SET CONFIG 1.1.0 31.0 USTS 00 70 00 c0 no device 1.2.0 31.0 CTL 80 06 00 02 00 00 09 01 GET DESCRIPTOR 2.1.0 31.0 DI 09 02 20 00 01 01 00 c0 .. ..... 2.2.0 31 09 04 00 00 02 07 01 1....... 2.2.8 02 00 07 05 01 02 00 02 ........ 2.2.16 00 07 05 81 02 00 02 00 ........ 2.2.24 31.0 CTL 00 09 01 00 00 00 00 00 SET CONFIG 3.1.0 31.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR 4.1.0 31.0 DI 12 01 00 02 00 00 00 40 .......@ 4.2.0 f0 03 17 2c 00 01 01 02 ...,.... 4.2.8 03 01 .. 4.2.16 31.0 CTL a1 00 00 00 00 00 f1 03 GET DEVICE ID 5.1.0 31.0 DI 00 63 4d 46 47 3a 48 65 .cMFG:He 5.2.0 77 6c 65 74 74 2d 50 61 wlett-Pa 5.2.8 63 6b 61 72 64 3b 4d 44 ckard;MD 5.2.16 4c 3a 48 50 20 4c 61 73 L:HP Las 5.2.24 65 72 4a 65 74 20 31 30 erJet 10 5.2.32 32 32 3b 43 4d 44 3a 41 22;CMD:A 5.2.40 43 4c 3b 43 4c 53 3a 50 CL;CLS:P 5.2.48 52 49 4e 54 45 52 3b 44 RINTER;D 5.2.56 45 53 3a 48 50 20 4c 61 ES:HP La 5.2.64 73 65 72 4a 65 74 20 31 serJet 1 5.2.72 30 32 32 3b 46 57 56 45 022;FWVE 5.2.80 52 3a 32 30 30 35 30 32 R:200502 5.2.88 31 37 3b 17; 5.2.96


好象沒有.


你的配置值就一個,就是在設備描述符的最后一位就是配置描述符的數(shù)目


Device Phase Data Description Cmd.Phase.Ofs(rep) ------ ----- ------------------------ ---------------- ------------------ 31.0 CTL 00 07 05 01 00 00 07 00 SET DESCRIPTOR 1.1.0 31.0 USTS 04 00 00 c0 stall pid 1.2.0 31.0 CTL 00 07 05 01 00 00 00 00 SET DESCRIPTOR 2.1.0 31.0 USTS 04 00 00 c0 stall pid 2.2.0 我嘗試上面的,是不是證明設備不允許改?或者命令不對?


只有登錄才能回復,可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频