[求助]模擬打印機(jī)時(shí)的問題

用論壇的例程模擬打印機(jī),模擬成功,因?yàn)闆]安裝驅(qū)動(dòng),所以提示找不到驅(qū)動(dòng)

我對自己的打印機(jī)提取了設(shè)備描述符和配置描述符后,在放在程序中,這樣子模擬的時(shí)候電腦根本無法識別設(shè)備

另外那個(gè)打印機(jī)ID(設(shè)備ID)

unsigned char code buffer_id[]= "\x0\x39MFG:HP;CMD:GDI;MDL:HP_LaserJet_5N;CLS:PRINTER;MODE:GDI;";設(shè)備ID

這個(gè)設(shè)備ID是由什么組成的?我要怎要才能在我的打印機(jī)上查到或者獲取到呢

這個(gè)你要看下1284協(xié)議,USB PRINT類協(xié)議是這樣寫的: 4.2.1 GET_DEVICE_ID (bRequest = 0) This class-specific request returns a device ID string that is compatible with IEEE 1284. See IEEE 1284 fand formatting information. A printer with multiple configurations, interfaces, or alternate settings may comultiple IEEE 1284 device ID strings. The wValue field is used to specify a zero-based configuration ind high-byte of the wIndex field is used to specify the zero-based interface index. The low-byte of the wInde used to specify the zero-based alternate setting. The device ID string is returned in the following format:


你可以用BUSHOUND軟件抓一下PC對你的打印機(jī)枚舉的過程,應(yīng)該是可以抓到設(shè)備描述符、配置描述符和設(shè)備ID的。設(shè)備ID是通過{ 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF1, 0x03 }獲取


模擬打印機(jī)成功了嗎?


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

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