看了一下Celluar Emulator的內(nèi)容,除了應(yīng)用程序,還需要安裝一個(gè)虛擬硬件的驅(qū)動(dòng),名為XPVCOM。安裝完畢后,會(huì)出現(xiàn)一個(gè)XPVCOM port。這個(gè)虛擬硬件將接受Device Emulator的AT指令,模仿手機(jī)的相應(yīng)功能。
??? 很簡(jiǎn)單,安裝這個(gè)虛擬硬件的驅(qū)動(dòng)即可。查找驅(qū)動(dòng)然后定位到xpvcom.inf。問(wèn)題在于我想把這些工作打包,全部自動(dòng)執(zhí)行,不用點(diǎn)來(lái)點(diǎn)去。想起了以前解決OSD的ACPI問(wèn)題時(shí)用的工具,devcon。
??? DEVCON是設(shè)備管理器的命令行版本,可以查看其幫助:
C:\Users\hhu\Desktop\WME\Drivers>devcon /? Device Console Help: devcon [-r] [-m:\\][...] -r if specified will reboot machine after command is complete, if needed. is name of target machine. is command to perform (see below). ... is one or more arguments if required by command. For help on a specific command, type: devcon help classfilter????????? Allows modification of class filters. classes????????????? List all device setup classes. disable????????????? Disable devices that match the specific hardware or instanc e ID. driverfiles????????? List driver files installed for devices. drivernodes????????? Lists all the driver nodes of devices. enable?????????????? Enable devices that match the specific hardware or instance ID. find???????????????? Find devices that match the specific hardware or instance I D. findall????????????? Find devices including those that are not present. help???????????????? Display this information. hwids??????????????? Lists hardware ID's of devices. install????????????? Manually install a device. listclass??????????? List all devices for a setup class. reboot?????????????? Reboot local machine. remove?????????????? Remove devices that match the specific hardware or instance ID. rescan?????????????? Scan for new hardware. resources??????????? Lists hardware resources of devices. restart????????????? Restart devices that match the specific hardware or instanc e ID. sethwid????????????? Modify Hardware ID's of listed root-enumerated devices. stack??????????????? Lists expected driver stack of devices. status?????????????? List running status of devices. update?????????????? Manually update a device. updateni???????????? Manually update a device (non interactive). |
??? 為了安裝這個(gè)虛擬硬件,只需要運(yùn)行以下命令行:
devcon install xpvcom.inf "root\XPVCOM"
devcon rescan
??? 你要問(wèn)“root\XPVCOM”設(shè)備描述符哪里來(lái)的?打開(kāi)inf文件就能看到
……
[Standard] ; ; %XPVCOM.DeviceDesc%=XPVCOM_Device,root\XPVCOM …… |
??? 命令行安裝一個(gè)驅(qū)動(dòng),就這么簡(jiǎn)單。