发明名称 Method and device for identifying device ports of data card in Linux system
摘要 A method and an apparatus for identifying device ports of a data card in a Linux system are provided, the method comprises: acquiring information of a Universal Serial Bus (USB) device; recording device information that is related to the USB device to be identified in said information; acquiring port information of each port of said USB device to be identified according to the device information of the said USB device to be identified; identifying attributes of said ports according to the information of each port. By acquiring the device information and the port information, the Attention (AT) port and the Modem port could be identified correctly according to the feature that the AT port and the Modem port could send and receive AT commands as well as the preset order attribute of the AT port and the Modem port, thus identifying the attributes of each port of the device accurately.
申请公布号 US8825916(B2) 申请公布日期 2014.09.02
申请号 US201013578210 申请日期 2010.08.10
申请人 ZTE Corporation 发明人 Chen Ying
分类号 G06F3/00;G06F13/10;G06F9/44 主分类号 G06F3/00
代理机构 Merchant & Gould P.C. 代理人 Merchant & Gould P.C.
主权项 1. A method for identifying device ports of a data card in a Linux system, comprising: acquiring information of a universal serial bus (USB) device, recording device information of the USB device to be identified in the acquired information; acquiring port information of ports of the USB device to be identified according to the device information of the USB device to be identified; and searching out two ports that respond to an attention (AT) command from all the ports according to the port information; after device ports identification is successful, searching for a product identity, PID, of the USB device in a Pid_Positive array, if the Pid_Positive array has the PID of the USB device, indicating that the device ports are positively ordered, therefore an AT port and a Modem port being accurately identified; if the Pid_Positive array does not have the PID of the USB device, searching for the PID of the USB device in a Pid_NePositive array, if the PID is found, indicating that the device ports are reversely ordered, therefore the AT port and the Modem port being accurately identified; if the PID of the USB device is found neither in the Pid_Positive array nor in the Pid_NePositive array, considering the USB device as a positively ordered device by default, therefore the AT port and the Modem port being accurately identified.
地址 CN