CN104182369A - Method for searching terminal on upper computer and upper computer - Google Patents

Method for searching terminal on upper computer and upper computer Download PDF

Info

Publication number
CN104182369A
CN104182369A CN201310195317.0A CN201310195317A CN104182369A CN 104182369 A CN104182369 A CN 104182369A CN 201310195317 A CN201310195317 A CN 201310195317A CN 104182369 A CN104182369 A CN 104182369A
Authority
CN
China
Prior art keywords
terminal
logical device
corresponding relation
usb
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310195317.0A
Other languages
Chinese (zh)
Inventor
李小兵
伏红峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201310195317.0A priority Critical patent/CN104182369A/en
Publication of CN104182369A publication Critical patent/CN104182369A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a method for searching a terminal on an upper computer and the upper computer. The method comprises the following steps: in the initializing stage, establishing and storing corresponding relations between a USB (Universal Serial Bus) physical port number and all logical devices of the terminal connected with the USB physical port number; in the operating process, by the corresponding relations, searching the corresponding logical device of the terminal. By the method and the terminal, the upgrading process of the terminal can become simple and easy to use, the technical requirements for technical personnel on the production line are reduced, meanwhile, manual intervention is also reduced and production efficiency of the production line is greatly improved.

Description

A kind of method and host computer of searching terminal on host computer
Technical field
The present invention relates to terminal production field and user's application, particularly relate to a kind of method and host computer of searching terminal on host computer.
Background technology
At present, along with the end product uses such as mobile phone and data terminal are extensive gradually, users are also increasing for the demand of end product, and this requires the production efficiency of our end product can reach higher level.Meanwhile, user is also increasing to the usable range of end product, comprises the fields such as domestic consumer's online, Industry Control and Internet of Things, and this requires end product can adapt to more flexibly user's demand.
End product is all generally as a USB (Universal Serial BUS, USB (universal serial bus)) equipment complex is connected with PC (PC) machine, to PC, report virtual serial port equipment, wherein virtual serial port equipment has a plurality of logical device such as modem (modulator-demodular unit), diag (debugging passage) and AT (instruction path).The method that PC is searched equipment is all generally by the mode of enumerating serial ports, and finding attribute is the modem mouth that the equipment of modem is end product, and finding attribute is the AT mouth that the equipment of AT is end product.
If be directed to PC of user, only connect a terminal device, the method that PC searches terminal so does not have problem.If but for special user, a PC will connect multi-section terminal device, the method that such PC searches terminal may have problem, and the corresponding relation of the logical device such as a plurality of modem and a plurality of AT is more chaotic, at this moment must user manually specify and could normally use.If user still connects a plurality of terminals next time, and there is variation in the PID (product IDs) and the VID (vendor id) that have changed USB mouth or terminal, and the numbering of virtual serial port equipment can change, and need to manually reassign.
It is very obvious that this problem shows on the production line of end product, on production line during the software release upgrade of terminal in order to raise the efficiency, generally can connect multi-section end product and upgrade simultaneously.With current PC, search the method for terminal, can only when downloading for the first time, manually specify the virtual serial port number (virtual serial port that upgrading terminals software is used) corresponding to diag equipment of each end product, could normally download.If the abnormal conditions in downloading process cause the virtual serial port number that the diag equipment of terminal is corresponding that variation has occurred, must manually reassign again.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method and host computer of searching terminal on host computer, to reduce manual intervention.
In order to solve the problems of the technologies described above, the invention provides a kind of method of searching terminal on host computer, comprising:
During initialization, set up and store the corresponding relation of USB physical port number and all logical device of the terminal being connected;
In operational process, by described corresponding relation, search the logical device of corresponding terminal.
Further, said method also has feature below: described foundation is also stored the corresponding relation of physical USB mouth and all logical device of the terminal being connected, and comprising:
Travel through each USB Root Hub;
Travel through all nodes on each hub;
Judge respectively whether described node is terminal, terminal in this way, obtains all logical device of this terminal;
The corresponding relation of all logical device of the counterpart terminal of storing USB physical port number and obtaining.
Further, said method also has feature below: described in operational process, by described corresponding relation, search the logical device of corresponding terminal, and comprising:
In escalation process, occur extremely, or download port changes, and by described corresponding relation, searches the logical device of corresponding terminal; Or
Before using one or more terminals, the logical device of searching corresponding terminal by described corresponding relation.
Further, said method also has feature below: described logical device comprise following any:
Virtual serial port, virtual network port, virtual modem and Android debug port.
In order to address the above problem, the present invention also provides a kind of host computer, it is characterized in that, comprising:
Initialization module, sets up and stores the corresponding relation of USB physical port number and all logical device of the terminal being connected during for initialization;
Search module, at operational process, by described corresponding relation, search corresponding terminal.
Further, above-mentioned host computer also has feature below: described initialization module comprises:
Set up unit, make in each USB Root Hub of traversal, travel through all nodes on each hub, judge respectively whether described node is terminal, terminal in this way, obtains all logical device of this terminal;
Storage unit, for storing USB physical port number and the described corresponding relation of setting up all logical device of the counterpart terminal that unit obtains.
Further, above-mentioned host computer also has feature below:
The described unit of searching, abnormal specifically for occurring in escalation process, or download port changes, and by described corresponding relation, searches the logical device of corresponding terminal, or before using one or more terminals, the logical device of searching corresponding terminal by described corresponding relation.
Further, above-mentioned host computer also has feature below: described logical device comprise following any:
Virtual serial port, virtual network port, virtual modem and Android debug port.
To sum up, the invention provides a kind of method and host computer of searching terminal on host computer, production line upgrading tool adopts technical solution of the present invention, can make terminal staging process become and be simple and easy to use, be reduced in the technical requirement to technician on production line, also reduced manual intervention, greatly improved the production efficiency of producing line simultaneously; Customer upgrade instrument adopts technical solution of the present invention, can make if there is failed download situation, has an opportunity to continue to download (also needing to have the support of upgrading tool); On user UI instrument, adopt technical solution of the present invention, can allow user use a plurality of terminals not conflict simultaneously, do not need manually to specify modem mouth and AT mouth.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method for searching terminal on host computer of the embodiment of the present invention;
Fig. 2 is the bus topology figure of USB subsystem;
Fig. 3 is the download port process flow diagram that the software of the embodiment of the present invention is searched terminal device automatically;
Fig. 4 is that tradition adopts USB upgrading terminals goods batch figure;
Fig. 5 is the schematic diagram of the host computer of the embodiment of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, hereinafter in connection with accompanying drawing, embodiments of the invention are elaborated.It should be noted that, in the situation that not conflicting, the embodiment in the application and the feature in embodiment be combination in any mutually.
Fig. 1 is the process flow diagram of the method for searching terminal on host computer of the embodiment of the present invention, and as shown in Figure 1, the method for the present embodiment can comprise the following steps:
When S11, initialization, set up and store the corresponding relation of USB physical port number and all logical device of the terminal being connected;
S12, in operational process, by described corresponding relation, search the logical device of corresponding terminal.
The method of the present embodiment just sets up and preserves the mapping relations of the logical device of physical USB mouth and terminal when initialization, if connected a plurality of end products on PC, by mapping relations, just can learn which modem, diag and AT belong to same terminal.If the numbering of diag mouth changes in the downloading process of terminal, also can find very soon the diag mouth of original terminal device.
Fig. 2 is the bus topology figure of USB subsystem, and operating system (windows, unix or linux etc.) is followed this topological structure exactly to the way to manage of USB, need to access each node and can utilize the path of every one-level to visit.Wherein, logical device is the logical device such as the virtual serial port, virtual network port of end product, and modem, AT mouth are all logical device, and the diag using in escalation process is also a logical device.
On host computer, by USB, be connected with one or more terminals, before using terminal, the realization flow that software can be searched download port automatically as shown in Figure 3, comprises the following steps:
Step 101, search N USB root HUB (hub);
PC is upper may there are a plurality of USB root HUB, so need to scan one by one one time.
Step 102, judge whether to find root HUB, as find, go to step 103, otherwise process ends.
Node on step 103, traversal HUB;
The all nodes of traversal on HUB, the node on HUB likely or HUB, is likely also terminal device.
Whether step 104, decision node are HUB, in this way, return to step 103, travel through the node on this HUB, otherwise, go to step 105;
If the node on HUB also has HUB, continue to search downwards.
Whether step 105, decision node are terminal devices, if not, go to step 106; In this way, go to step 107.
Whether the node on step 106, this HUB of judgement traversal completes, as completes, and goes to step 101, searches next USB root HUB; As unfinished, go to step 103.
Step 107, obtain terminal device information;
If the node on HUB is device, obtain device information;
Step 108, by device information, judge whether it is terminal device, in this way, go to step 109; Otherwise go to step 103;
Step 109, can get all logical device of terminal device;
The corresponding relation of step 110, storage USB physical port number and all logical device, then, goes to step 103 continuation traversals, until traveled through the device on all HUB.
After completing these several steps, all logical device of each end product of the upper connection of PC can be set up one-to-one relationship with physical USB port.As long as end product is not extracted from the USB mouth of physics, in use procedure, no matter any reason causes the virtual serial port number of logical device to change like this, as long as again obtained and can be obtained new corresponding logical device by physical USB port numbers.
On the production line of end product, the present invention, by the raising intellectuality of main frame to terminal software upgrading of upgrading, has reduced production cost;
Customer upgrade instrument adopts technical solution of the present invention, make user can continue upgrading upgrading is abnormal later, has reduced the probability that end product returns factory;
On user UI, can allow user use plural end product simultaneously, meet user's specific demand.
Fig. 4 is that current end product produces the process flow diagram that line adopts USB updating software release, comprises the following steps:
Step 201, connect end product to the USB mouth of the main frame of upgrading;
Upgrading starts the front Workers that need to produce and first manually on upgrading main frame, specifies the download port that each end product is corresponding.
Step 202, at PC end, check that terminal device downloads the virtual serial port number of use;
Step 203, the upgrading tool that opens a terminal, and specify the download port of each end product;
Step 204, user select to start upgrading on upgrading tool;
The critical data of step 205, upgrading tool back-up terminals;
The software version of step 206, upgrading tool upgrading terminals;
Step 207, judge whether escalation process occurs extremely, as abnormal in do not occurred, go to step 208; As occurred, extremely, go to step 211;
Step 208, upgraded, terminal is restarted;
After step 209, judgement upgrading, whether VID and the PID of terminal change, and in this way, go to step 213; Otherwise go to step 210;
Step 210, recovery critical data, complete upgrading;
Step 211, manually restart terminal, end product download port changes, and enters abnormal download flow process;
Step 212, repeating step 202 and step 203, then select to start upgrading, then proceeds to step 206;
Step 213, download port change, and need repeating step 202 and 203, then select to continue upgrading.
In above-mentioned flow process, if there is following two kinds of modes, need the artificial upgrading that participates in:
Escalation process occurs extremely causing upgrading not complete (step 207 is abnormal), manually restart rear end product and enter other mode of operation, at this moment the mode of operation of USB may change, download port also can change thereupon, so need to manually reformulate download port (step 211 and step 212), lays equal stress on newly downloaded;
After download completes, VID (the VendorID of new terminal software version USB, be vendor id) or PID (Product ID, be product IDs) change or have new end product to be linked into PC) can cause download port to change, need to manually reassign download port (step 213), otherwise the critical data that cannot continue is below recovered.
By the scheme of the embodiment of the present invention, can solve the problem that three above-mentioned places manually participate in selecting download port, make becoming of whole production more intelligent.
In above-mentioned step 202, upgrading tool is searched the download port of end product automatically, then starts upgrading, does not need artificial participation;
In above-mentioned steps 206, download after appearance extremely, artificial end product restarted and be again inserted into original USB mouth, the USB mode of operation of end product may change and cause download port to change, at this moment upgrading tool finds the download port of this equipment automatically by the USB mouth of physics, starts again to download;
In above-mentioned steps 207, VID and the PID of new terminal software version USB change, and cause download port also to change, and upgrading tool finds the download port of this equipment automatically by the USB mouth of physics, then recover critical data; Whole escalation process does not need the artificial download port that participates in selecting.
In current technology, to search the method for equipment be all generally with enumerating the mode of serial ports to PC, and finding attribute is the modem that the equipment of modem is end product, and finding attribute is the AT mouth that the equipment of AT is end product.If but for special user, a PC will connect multi-section terminal device, PC can be enumerated the logical device of multi-section end product together like this, which terminal is which logical device of None-identified belong to, and this is manually to be specified by user.
The scheme of the physical USB mouth binding terminal Product Logic equipment proposing by the embodiment of the present invention, when user uses a plurality of end product interconnection network simultaneously, user's UI instrument can find the corresponding same portion of which logical device end product accurately, without user, manually specifies.
Fig. 5 is the schematic diagram of the host computer of the embodiment of the present invention, and the host computer of the present embodiment can be a PC or embedded device, by a plurality of USB, connects a plurality of terminals, and as shown in Figure 5, the host computer of the present embodiment can comprise:
Initialization module, sets up and stores the corresponding relation of USB physical port number and all logical device of the terminal being connected during for initialization;
Search module, at operational process, by described corresponding relation, search corresponding terminal.
Wherein, described initialization module can comprise:
Set up unit, make in each USB Root Hub of traversal, travel through all nodes on each hub, judge respectively whether described node is terminal, terminal in this way, obtains all logical device of this terminal;
Storage unit, for storing USB physical port number and the described corresponding relation of setting up all logical device of the counterpart terminal that unit obtains.
In a preferred embodiment, the described unit of searching, abnormal specifically for occurring in escalation process, or download port changes, by described corresponding relation, search the logical device of corresponding terminal, or before using one or more terminals, the logical device of searching corresponding terminal by described corresponding relation.
Wherein, described logical device can comprise following any:
Virtual serial port, virtual network port, virtual modem and Android debug port.
One of ordinary skill in the art will appreciate that all or part of step in said method can come instruction related hardware to complete by program, described program can be stored in computer-readable recording medium, as ROM (read-only memory), disk or CD etc.Alternatively, all or part of step of above-described embodiment also can realize with one or more integrated circuit.Correspondingly, each the module/unit in above-described embodiment can adopt the form of hardware to realize, and also can adopt the form of software function module to realize.The present invention is not restricted to the combination of the hardware and software of any particular form.
These are only the preferred embodiments of the present invention; certainly; the present invention also can have other various embodiments; in the situation that not deviating from spirit of the present invention and essence thereof; those of ordinary skill in the art are when making according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (8)

1. on host computer, search a method for terminal, comprising:
During initialization, set up and store the corresponding relation of USB physical port number and all logical device of the terminal being connected;
In operational process, by described corresponding relation, search the logical device of corresponding terminal.
2. the method for claim 1, is characterized in that: described foundation is also stored the corresponding relation of physical USB mouth and all logical device of the terminal being connected, and comprising:
Travel through each USB Root Hub;
Travel through all nodes on each hub;
Judge respectively whether described node is terminal, terminal in this way, obtains all logical device of this terminal;
The corresponding relation of all logical device of the counterpart terminal of storing USB physical port number and obtaining.
3. the method for claim 1, is characterized in that: described in operational process, by described corresponding relation, search the logical device of corresponding terminal, and comprising:
In escalation process, occur extremely, or download port changes, and by described corresponding relation, searches the logical device of corresponding terminal; Or
Before using one or more terminals, the logical device of searching corresponding terminal by described corresponding relation.
4. the method as described in claim 1-3 any one, is characterized in that: described logical device comprise following any:
Virtual serial port, virtual network port, virtual modem and Android debug port.
5. a host computer, is characterized in that, comprising:
Initialization module, sets up and stores the corresponding relation of USB physical port number and all logical device of the terminal being connected during for initialization;
Search module, at operational process, by described corresponding relation, search corresponding terminal.
6. host computer as claimed in claim 5, is characterized in that: described initialization module comprises:
Set up unit, make in each USB Root Hub of traversal, travel through all nodes on each hub, judge respectively whether described node is terminal, terminal in this way, obtains all logical device of this terminal;
Storage unit, for storing USB physical port number and the described corresponding relation of setting up all logical device of the counterpart terminal that unit obtains.
7. host computer as claimed in claim 5, is characterized in that:
The described unit of searching, abnormal specifically for occurring in escalation process, or download port changes, and by described corresponding relation, searches the logical device of corresponding terminal, or before using one or more terminals, the logical device of searching corresponding terminal by described corresponding relation.
8. the host computer as described in claim 5-7 any one, is characterized in that: described logical device comprise following any:
Virtual serial port, virtual network port, virtual modem and Android debug port.
CN201310195317.0A 2013-05-23 2013-05-23 Method for searching terminal on upper computer and upper computer Pending CN104182369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310195317.0A CN104182369A (en) 2013-05-23 2013-05-23 Method for searching terminal on upper computer and upper computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310195317.0A CN104182369A (en) 2013-05-23 2013-05-23 Method for searching terminal on upper computer and upper computer

Publications (1)

Publication Number Publication Date
CN104182369A true CN104182369A (en) 2014-12-03

Family

ID=51963432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310195317.0A Pending CN104182369A (en) 2013-05-23 2013-05-23 Method for searching terminal on upper computer and upper computer

Country Status (1)

Country Link
CN (1) CN104182369A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371841A (en) * 2016-08-31 2017-02-01 福建联迪商用设备有限公司 Management method of ADB (Android) devices and system thereof
CN109711143A (en) * 2018-12-11 2019-05-03 北京云测信息技术有限公司 A method of Android device is identified based on adb

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201035568Y (en) * 2006-12-22 2008-03-12 康佳集团股份有限公司 USB equipment logical numbering and physical numbering mapping device
CN101281474A (en) * 2008-05-06 2008-10-08 北京握奇数据系统有限公司 Method and apparatus for opening appoint terminal port USB equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201035568Y (en) * 2006-12-22 2008-03-12 康佳集团股份有限公司 USB equipment logical numbering and physical numbering mapping device
CN101281474A (en) * 2008-05-06 2008-10-08 北京握奇数据系统有限公司 Method and apparatus for opening appoint terminal port USB equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371841A (en) * 2016-08-31 2017-02-01 福建联迪商用设备有限公司 Management method of ADB (Android) devices and system thereof
WO2018040929A1 (en) * 2016-08-31 2018-03-08 福建联迪商用设备有限公司 Method for managing adb device, and system therefor
CN109711143A (en) * 2018-12-11 2019-05-03 北京云测信息技术有限公司 A method of Android device is identified based on adb

Similar Documents

Publication Publication Date Title
CN106936636B (en) A kind of implementation method of the cloud computing test platform of rapid deployment containerization
CN108898230B (en) Equipment management method and management server
US9137111B2 (en) Discovering, validating, and configuring hardware-inventory components
CN102929745B (en) Status data updating method and device for virtual equipments
CN113064625B (en) Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band
CN107844305A (en) The method for upgrading software and embedded device of embedded device
CN103309693A (en) Complex programmable logic device updating method and system
CN107153571A (en) A kind of dispositions method and device of virtual management node
CN107770299A (en) A kind of MAC Address writes with a brush dipped in Chinese ink method, system, device and storage medium
CN105224483A (en) Data transmission method, electronic equipment and universal serial bus device
CN104182369A (en) Method for searching terminal on upper computer and upper computer
CN108322341A (en) A kind of method and system in update router configuration data library
CN115129249A (en) SAS link topology identification management method, system, terminal and storage medium
CN102882907A (en) Client configuration system and method
CN106789236B (en) A method of the FOTA remote online upgrading of fusion WiFiP2P
CN103001797A (en) Method for remotely managing operating commands for multiple devices of integrated circuit production line
CN108089968A (en) A kind of method of host's machine monitoring virtual-machine data storehouse state
CN112256500B (en) Storage system test server configuration method, system, terminal and storage medium
CN113612671B (en) Binding configuration method of bus adapter and channel, mapping manager and connection system
CN106293789A (en) VRD firmware automatic update system and method thereof
CN107436790A (en) A kind of component upgrade management method and device
CN108710527A (en) A kind of virtual machine template management system, method based on xen
CN105743686B (en) Port attribute inheritance method and device
CN114237824A (en) Fault positioning method and device, computer readable medium and electronic equipment
CN113238950A (en) System and method for testing distributed system, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20141203

WD01 Invention patent application deemed withdrawn after publication