CN112650702B - Port binding method and system for multi-port USB device - Google Patents

Port binding method and system for multi-port USB device Download PDF

Info

Publication number
CN112650702B
CN112650702B CN202011531454.3A CN202011531454A CN112650702B CN 112650702 B CN112650702 B CN 112650702B CN 202011531454 A CN202011531454 A CN 202011531454A CN 112650702 B CN112650702 B CN 112650702B
Authority
CN
China
Prior art keywords
port
usb
equipment
address
identifier
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.)
Active
Application number
CN202011531454.3A
Other languages
Chinese (zh)
Other versions
CN112650702A (en
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.)
Beijing Zhibao Yunke Technology Co ltd
Beijing Huada Zhibao Electronic System Co Ltd
Original Assignee
Beijing Zhibao Yunke Technology Co ltd
Beijing Huada Zhibao Electronic System Co Ltd
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 Beijing Zhibao Yunke Technology Co ltd, Beijing Huada Zhibao Electronic System Co Ltd filed Critical Beijing Zhibao Yunke Technology Co ltd
Priority to CN202011531454.3A priority Critical patent/CN112650702B/en
Publication of CN112650702A publication Critical patent/CN112650702A/en
Application granted granted Critical
Publication of CN112650702B publication Critical patent/CN112650702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention relates to a port binding method and a port binding system for multi-port USB equipment, belongs to the technical field of USB equipment, and solves the problems of complex port binding process flow and low efficiency in the prior art. The method comprises the following steps: acquiring an index information configuration file of the multi-port USB device; the index information configuration file comprises a first port address of at least one port of the multi-port USB device and a corresponding index value; establishing a corresponding relation between the index value and the thread based on the index information configuration file; inserting the USB Key equipment to be produced on one or more ports of at least one port of the multi-port USB equipment, and obtaining second port addresses of all ports inserted into the USB Key equipment to be produced; if the second port address of each port can find the first port address with the same name in the index information configuration file, the thread corresponding to the port is queried according to the index value corresponding to the second port address of each port, and the port binding of the multi-port USB device is completed.

Description

Port binding method and system for multi-port USB device
Technical Field
The invention relates to the technical field of port binding, in particular to a port binding method and a port binding system for multi-port USB equipment.
Background
In the prior art, when a small number of USB type products (such as USB keys) are produced, a single USB port on a computer basically meets the requirements. However, if a large quantity of USB type products are required to be produced, a multi-port USB device is required to expand the number of USB ports, thereby increasing the production speed of the USB type products. When the USB Key is inserted into the USB port, the Windows system on the computer assigns a unique device descriptor to it. When USB Key products are produced, the production tool software opens the equipment to produce according to the equipment descriptor.
When producing a USB Key product by inserting multiple USB keys on a computer, it is conventional practice to use a C/S mode. Namely: the server is responsible for distributing resources, then sending production data to each client, each client runs on an industrial control main board, each industrial control main board runs a Windows operating system, and each industrial control main board is inserted with a USB Key. When the method is adopted to produce the USB Key product, client software is simpler, and the direct communication can be carried out without considering which USB port the USB Key is inserted on. However, this method requires much hardware, resulting in a production system that is cost prohibitive and difficult to maintain.
Disclosure of Invention
In view of the above analysis, the embodiment of the invention aims to provide a port binding method and a system for a multi-port USB device, which are used for solving the problems of complex flow and low efficiency of a port binding process in the prior art.
In one aspect, an embodiment of the present invention provides a port binding method for a multi-port USB device, including the following steps:
Acquiring an index information configuration file of the multi-port USB device; the index information configuration file comprises a first port address of at least one port of the multi-port USB device and a corresponding index value;
Based on the index information configuration file, establishing a corresponding relation between the index value and the thread, and initializing the multi-port USB equipment;
Inserting a USB Key device to be produced on one or more ports of the at least one port of the multi-port USB device, and obtaining second port addresses of all ports inserted into the USB Key device to be produced;
If the second port address of each port can find the first port address with the same name in the index information configuration file, inquiring the thread corresponding to the port according to the index value corresponding to the second port address of each port, and completing port binding of the multi-port USB device.
Based on the scheme, the invention also makes the following improvements:
based on the above improvement, the obtaining the index information configuration file of the multi-port USB device includes:
Inserting the multi-port USB equipment into a USB interface of an upper computer;
Inserting a blank USB Key device on the at least one port of the multi-port USB device, and generating the index information configuration file based on first device address information of the blank USB Key read from an upper computer; the first device address information includes the first port address.
Based on the above improvement, the index information configuration file further includes a port usage number, where the port usage number corresponds to a port number of at least one port of the multi-port USB device.
Based on the improvement of the scheme, after the first port address is determined, a corresponding index value is manually or automatically allocated to the first port address.
Based on the above improvement, the initializing the multi-port USB device includes:
initializing a corresponding number of threads according to the port use number in the index information configuration file;
and establishing a corresponding relation between the first port address and the thread ID, and sending an index value corresponding to the first port address to the corresponding thread.
Based on the improvement of the scheme, the multi-port USB device is a multi-port USB HUB.
Based on the improvement of the scheme, the USB Key equipment to be produced is blank USB Key equipment or filled USB Key equipment.
Based on the improvement of the scheme, after the USB Key equipment to be produced is inserted, reading second equipment address information of the USB Key equipment to be produced, wherein the second equipment address information comprises equipment manufacturer identifiers, equipment identifiers and third port addresses;
and obtaining the second port address through the equipment manufacturer identifier, the equipment identifier and the third port address.
Based on the above improvement, the obtaining the second port address through the equipment manufacturer identifier, the equipment identifier and the third port address includes:
If the device manufacturer identifier is an original device manufacturer identifier VID and the device identifier is an original device identifier PID, the USB Key device is a blank USB Key device, and the third port address is used as the second port address;
if the equipment manufacturer identifier is not the original equipment manufacturer identifier and the equipment identifier is not the original equipment identifier, the USB Key equipment to be produced is the filled USB Key equipment; based on the non-original equipment manufacturer identifier and the non-original equipment identifier, a corresponding original equipment manufacturer identifier VID and a corresponding original equipment identifier PID are obtained; and enumerating all sub-keys under the corresponding original equipment manufacturer identification VID and the corresponding original equipment identification PID in the system registry, and taking the names of the sub-keys containing the third port address as the second port address.
On the other hand, the embodiment of the invention also provides a port binding system of the multi-port USB device, which comprises the following steps:
the index information configuration file acquisition module is used for acquiring index information configuration files of the multi-port USB equipment; the index information configuration file comprises a first port address of at least one port of the multi-port USB device and a corresponding index value;
The multi-port USB equipment initializing module is used for establishing a corresponding relation between the index value and the thread based on the index information configuration file and initializing the multi-port USB equipment;
A port binding module, configured to insert a USB Key device to be produced on one or more ports of the at least one port of the multi-port USB device, and obtain second port addresses of all ports inserted into the USB Key device to be produced; if the second port address of each port can find the first port address with the same name in the index information configuration file, inquiring the thread corresponding to the port according to the index value corresponding to the second port address of each port, and completing port binding of the multi-port USB device.
Compared with the prior art, the invention has at least one of the following beneficial effects:
According to the port binding method and system for the multi-port USB equipment, after the index information configuration file of the multi-port USB equipment is obtained and the corresponding relation between the index value and the thread is established, the initialization of the multi-port USB equipment is completed; after the initialization of the multi-port USB device is completed, the initialized multi-port USB device can be utilized to carry out port binding; therefore, the method only needs to be initialized once, and then the initialized multi-port USB equipment can be used for executing the port binding operation for a plurality of times, and the realization process effectively simplifies the port binding flow and improves the port binding efficiency at the same time;
meanwhile, as a plurality of ports in the multi-port USB equipment are mutually independent, the ports can execute port binding operation in parallel, so that the port binding process is accelerated;
In addition, the scheme of the invention has smaller dependence on hardware, and can reduce the use and maintenance cost of related hardware.
In the invention, the technical schemes can be mutually combined to realize more preferable combination schemes. Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the invention, like reference numerals being used to refer to like parts throughout the several views.
FIG. 1 is a flow chart of a port binding method of a multi-port USB device provided in embodiment 1 of the present invention;
Fig. 2 is a flowchart of acquiring an index information configuration file of a multi-port USB device in the port binding method of the multi-port USB device provided in embodiment 1 of the present invention;
FIG. 3 is a flowchart of initializing a multi-port USB device in the port binding method of the multi-port USB device provided in embodiment 1 of the present invention;
fig. 4 is a schematic diagram of a port binding system of a multi-port USB device according to embodiment 2 of the present invention.
Detailed Description
The following detailed description of preferred embodiments of the application is made in connection with the accompanying drawings, which form a part hereof, and together with the description of the embodiments of the application, are used to explain the principles of the application and are not intended to limit the scope of the application.
Example 1
An embodiment 1 of the present invention discloses a port binding method of a multi-port USB device, and a flowchart is shown in fig. 1, including the following steps:
Step S1: acquiring an index information configuration file of the multi-port USB device; preferably, the multi-port USB device in this embodiment may be a multi-port USB HUB.
Specifically, step S1 obtains the index information configuration file of the multi-port USB device by performing the following operations:
Step S11: inserting a multi-port USB device into a USB interface in an upper computer; generally, the host computer includes a plurality of USB interfaces, and the multi-port USB device may be inserted into any USB interface of the host computer.
Step S12: inserting a blank USB Key device (namely, a bare chip state USB Key device) on at least one port of the multi-port USB device, and generating an index information configuration file based on first device address information of the blank USB Key read from an upper computer; the flow chart of step S1 is shown in fig. 2.
Specifically, the index information configuration file in this embodiment includes a first port address and a corresponding index value of at least one port of the multi-port USB device, and further includes a port usage number, where the port usage number corresponds to a port number of the at least one port of the multi-port USB device;
Number of ports used: considering that the multi-port USB device in this embodiment includes a plurality of ports, in the port binding process, all ports of the multi-port USB device may be bound, or only some ports of the multi-port USB device may be bound. Therefore, the port usage number parameter is set to represent the number of port bindings in this embodiment. In this embodiment, after a blank USB Key device is inserted into any port of the multi-port USB device for the first time, the port usage number is 1, and after a blank USB Key device is inserted into another port of the multi-port USB device for the next time, the port usage number is updated to 2; and so on;
First Port Address: After inserting a blank USB Key device into a port of a multi port USB device, the first port address of the current port can be extracted from the first device address information returned by the upper computer; It should be noted that the device address information read from the upper computer directly includes the first port address; For example, the first device address information returned from the upper computer is: \\?\USB#VID_8888&PID_3106#8&30929ac4&0&3#{50dd5230-ba8a-11d1-bf5d- 0000f805f530}, Extract the port address “8&30929ac4&0&3” from the first device address information and use it as the first port address for the current port;
Index value corresponding to first port address: when the first port address is determined, a corresponding index value may be manually or automatically assigned to the current first port address. Thereby establishing a correspondence between the first port address and the index value.
In order to facilitate a better understanding of the technical solution in this embodiment by those skilled in the art, this embodiment further provides an example of the index information configuration file:
number=2—number of port usage; illustratively, the USB HUB includes 16 ports, and only two ports need to be actually port-bound, that is, a blank USB Key device is inserted into only two ports of the multi-port USB device;
Parentid _1=8 &30929ac4&0&3- - -first port address of first port plugged
[ Port_1] - -the index value corresponding to the first port address of the first port
Parentid _2=8 &30929ac4&0&4- - -first port address of second port plugged
[ Port_1] - -index value corresponding to first port address of second port
In the implementation process, special port initialization software can be developed and used for reading device address information from an upper computer after a blank USB Key device is inserted into a port of a multi-port USB device to generate an index information configuration file; after the index information configuration file is generated, the port initialization tool software can be closed. And (3) finishing the process of the step S1, namely finishing the first operation of port binding.
Step S2: initializing a multi-port USB device based on the index information configuration file;
Specifically, in this step, the following sub-steps are included:
Step S21: copying the index information configuration file to a directory of production tool software;
The production tool software is used for finishing the initialization, port binding and subsequent production processes of the multi-port USB equipment; in addition, before the USB Key is delivered to a user, a series of processes such as downloading word stock data, downloading COS data, writing personalized data, detecting the correctness of the written data and the like are required to be carried out, and all the processes are completed by production tool software.
Step S22: starting the production tool software, and initializing a corresponding number of threads by the production tool software according to the port use number in the index information configuration file;
Step S23: establishing a corresponding relation between the first port address and the thread ID, and sending an index value corresponding to the first port address to a corresponding thread; thus, the initialization of the multi-port USB device is completed. The process of the step S2 is completed, namely the second step of port binding operation is completed;
the flow chart of step S2 is shown in fig. 3.
After the initialization of the multi-port USB device is completed, all threads enter a dormant state and wait for awakening. When the port of the multi-port USB device is inserted with the USB Key device to be produced, the port binding is completed based on the following steps.
Step S3: inserting a USB Key device to be produced on one or more ports of the at least one port of the multi-port USB device, and obtaining second port addresses of all ports inserted into the USB Key device to be produced;
When the USB Key device to be produced is inserted into the port of the multi-port USB device, the production tool software obtains the second device address information distributed to the USB Key device to be produced by the operating system. The type of USB Key device to be produced may be changed at different production stages, so that the obtained second device address information is different. Illustratively, the first step in the production phase is a blank USB Key device (bare chip state), the device type being a smart card device type; and at a later step of the production phase, the device class changes to a Mass Storage type device (filled state).
Specifically, step S3 includes the following sub-steps:
Step S31: after the USB Key equipment to be produced is inserted, reading second equipment address information of the USB Key equipment to be produced, wherein the second equipment address information comprises an equipment manufacturer identifier, an equipment identifier and a third port address;
step S32: and obtaining the second port address through the equipment manufacturer identifier, the equipment identifier and the third port address.
Step S321: if the device manufacturer identifier is an original device manufacturer identifier VID and the device identifier is an original device identifier PID, the USB Key device is a blank USB Key device, and the third port address is used as the second port address;
Step S322: if the equipment manufacturer identifier is not the original equipment manufacturer identifier and the equipment identifier is not the original equipment identifier, the USB Key equipment to be produced is the filled USB Key equipment; based on the non-original equipment manufacturer identifier and the non-original equipment identifier, a corresponding original equipment manufacturer identifier VID and a corresponding original equipment identifier PID are obtained; and enumerating all sub-keys under the corresponding original equipment manufacturer identification VID and the corresponding original equipment identification PID in the system registry, and taking the names of the sub-keys containing the third port address as the second port address.
Step S4: if the second port address of each port can find the first port address with the same name in the index information configuration file, inquiring the thread corresponding to the port according to the index value corresponding to the second port address of each port, and completing port binding of the multi-port USB device.
After port binding is completed, device information of the USB Key device to be produced can be assigned to the thread, the thread is awakened, and then a subsequent production flow can be executed.
After the thread finishes the current production flow, the thread continues to enter a waiting state to wait for the port binding and thread awakening of the next round.
It should be noted that, the ports in the multi-port USB device are independent from each other, so the process in step S3 may be executed in parallel, thereby accelerating the port binding process.
When the USB Key device to be produced is inserted as a blank USB Key device, the second device address information is obtained by way of example:
?? USB#VID_8888& PID_3106#8&30929ac4&0&3# {50dd5230-ba8a-11d1-bf5d-0000f805f530}; wherein, the original equipment manufacturer ID is 8888, the original equipment ID is 3106, and the second port address is 8&30929ac4&0&3; the production tool software knows that the equipment is bare chip equipment according to the value 3106 of the PID and the value 8888 of the VID, directly uses the second port addresses 8&30929ac4&0&3 of the equipment to search the first port addresses in the index information configuration file, and if the first port addresses consistent with the second port addresses exist, the corresponding index values can be obtained, and the corresponding threads are found according to the index values. From this, the last step of bare chip device port binding is completed. Thereafter, the second device address information of the bare chip acquired above may also be assigned to the thread and the thread may be awakened.
When the USB Key device to be produced is inserted into the device, the device type is changed into a Mass Storage type device, and the obtained second device address information is \\?\USBSTOR#CdRom&Ven_BHDC&Prod_USB_AutoRunDisk&Rev_1.00#9&21e171bf&0#{53f56308-b6bf-11d0-94f2-00a0c91efb8b};, the non-original device manufacturer identifier Ven is BHDC, the non-original device identifier Prod is USB_ AutoRunDisk, and the third port address is 9&21e171bf &0;
note that: the corresponding VID and PID values (e.g., VID _155b & PID _ 8102) may be obtained from a list of values of Ven and Prod corresponding to the VID and PID values.
The production tool software enumerates all sub-keys under the SYSTEM registry HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet \Enum\USB\VID_XXXX & PID_YYYY according to the acquired VID and PID values, reads the ParentIdPrefix value in the sub-keys, compares the ParentIdPrefix value with the first port address in the Mass Storage acquired above, and returns the names of the sub-keys if the two sub-keys are equal. Illustratively:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_155B&PID_8102\8&30929ac4&0&4]
"LocationInformation"="Port_#0003.Hub_#0006"
"Capabilities"=dword:000000c4
"HARDWAREID" =hex (7): slightly
"CompatibleIDs" =hex (7): slightly
"ContainerID"="{b85c7196-1e38-11eb-ab9a-989096bbfc9a}"
"ConfigFlags"=dword:00000000
"ClassGUID"="{36fc9e60-c465-11cf-8056-444553540000}"
"Driver"="{36fc9e60-c465-11cf-8056-444553540000}\\0016"
"Class"="USB"
"Mfg" = "@ usbstor. Inf,% generic. Mfg%; compatible USB memory device "
"Service"="USBSTOR"
"ParentIdPrefix"="9&21e171bf&0"
The following steps: one of the sub-keys "8&30929ac4&0&4" of vid_155b & pid_8102 includes a third port address "ParentIdPrefix" = "9&21e171bf &0", and the name of the sub-key containing the third port address (i.e., "8&30929ac4&0& 4") is taken as the second port address.
After the production tool software obtains the name of the sub key, the first port address in the index information configuration file is searched according to the name, and if the first port address consistent with the name of the second port address exists, the corresponding index value can be obtained. And finding a corresponding thread according to the queried index value, and completing the last step of port binding operation of the Mass Storage device. And then, the second device address information acquired above is assigned to the thread, and the thread is awakened.
In summary, in the port binding method of the multi-port USB device provided by the present embodiment, after obtaining the index information configuration file of the multi-port USB device and establishing the correspondence between the index value and the thread, initialization of the multi-port USB device is completed; after the initialization is completed, port binding can be performed by using the initialized multi-port USB equipment; therefore, the method only needs to initialize the multi-port USB device once, and then can execute a plurality of port binding operations by using the initialized multi-port USB device, thereby effectively simplifying the binding flow and improving the binding efficiency; meanwhile, as a plurality of ports in the multi-port USB equipment are mutually independent, the ports can execute port binding operation in parallel, so that the port binding process is accelerated; in addition, the scheme of the invention has smaller dependence on hardware, and can reduce the use and maintenance cost of related hardware.
Example 2
The embodiment 2 of the invention discloses a port binding system of a multi-port USB device, the system structure schematic diagram is shown in fig. 4, comprising: the system comprises an index information configuration file acquisition module, a multi-port USB equipment initialization module and a port binding module; wherein,
The index information configuration file acquisition module is used for acquiring index information configuration files of the multi-port USB equipment; the index information configuration file comprises a first port address of at least one port of the multi-port USB device and a corresponding index value;
The multi-port USB equipment initializing module is used for establishing a corresponding relation between the index value and the thread based on the index information configuration file and initializing the multi-port USB equipment;
A port binding module, configured to insert a USB Key device to be produced on one or more ports of the at least one port of the multi-port USB device, and obtain second port addresses of all ports inserted into the USB Key device to be produced; if the second port address of each port can find the first port address with the same name in the index information configuration file, inquiring the thread corresponding to the port according to the index value corresponding to the second port address of each port, and completing port binding of the multi-port USB device.
The specific implementation process of the embodiment of the present system may be referred to the above method embodiment, and the embodiment of the present system is not described herein again.
The system embodiment has the same principle as the method embodiment, so the system also has the corresponding technical effects of the method embodiment.
Those skilled in the art will appreciate that all or part of the flow of the methods of the embodiments described above may be accomplished by way of a computer program to instruct associated hardware, where the program may be stored on a computer readable storage medium. Wherein the computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory, etc.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention.

Claims (8)

1. The port binding method of the multi-port USB device is characterized by comprising the following steps of:
Acquiring an index information configuration file of the multi-port USB device; the index information configuration file comprises a first port address of at least one port of the multi-port USB device and a corresponding index value;
Based on the index information configuration file, establishing a corresponding relation between the index value and the thread, and initializing the multi-port USB equipment;
Inserting a USB Key device to be produced on one or more ports of the at least one port of the multi-port USB device, and obtaining second port addresses of all ports inserted into the USB Key device to be produced;
if the second port address of each port of the USB Key equipment to be produced can find a first port address with the same name in the index information configuration file, inquiring a thread corresponding to the port according to an index value corresponding to the second port address of each port of the USB Key equipment to be produced, and completing port binding of the multi-port USB equipment;
the second port addresses of all ports inserted into the USB Key equipment to be produced are obtained, and execution is performed:
After the USB Key equipment to be produced is inserted, reading second equipment address information of the USB Key equipment to be produced, wherein the second equipment address information comprises an equipment manufacturer identifier, an equipment identifier and a third port address;
Obtaining the second port address through the equipment manufacturer identifier, the equipment identifier and the third port address; wherein:
If the device manufacturer identifier is an original device manufacturer identifier VID and the device identifier is an original device identifier PID, the USB Key device is a blank USB Key device, and the third port address is used as the second port address;
if the equipment manufacturer identifier is not the original equipment manufacturer identifier and the equipment identifier is not the original equipment identifier, the USB Key equipment to be produced is the filled USB Key equipment; based on the non-original equipment manufacturer identifier and the non-original equipment identifier, a corresponding original equipment manufacturer identifier VID and a corresponding original equipment identifier PID are obtained; and enumerating all sub-keys under the corresponding original equipment manufacturer identification VID and the corresponding original equipment identification PID in the system registry, and taking the names of the sub-keys containing the third port address as the second port address.
2. The method for port binding of a multi-port USB device according to claim 1, wherein the obtaining an index information configuration file of the multi-port USB device includes:
Inserting the multi-port USB equipment into a USB interface of an upper computer;
Inserting a blank USB Key device on the at least one port of the multi-port USB device, and generating the index information configuration file based on first device address information of the blank USB Key device read from an upper computer; the first device address information includes the first port address.
3. The port binding method of a multi-port USB device according to claim 1 or 2, wherein the index information configuration file further includes a port usage number, the port usage number corresponding to a port number of at least one port of the multi-port USB device.
4. A method for port binding of a multi-port USB device according to claim 3, wherein after determining the first port address, a corresponding index value is manually or automatically assigned to the first port address.
5. A method of port binding for a multi-port USB device according to claim 3, wherein initializing the multi-port USB device comprises:
initializing a corresponding number of threads according to the port use number in the index information configuration file;
and establishing a corresponding relation between the first port address and the thread ID, and sending an index value corresponding to the first port address to the corresponding thread.
6. The port binding method of a multi-port USB device of claim 1, wherein the multi-port USB device is a multi-port USB HUB.
7. The port binding method of a multi-port USB device according to claim 1, wherein the USB Key device to be produced is a blank USB Key device or a filled USB Key device.
8. A port binding system for a multi-port USB device, comprising:
the index information configuration file acquisition module is used for acquiring index information configuration files of the multi-port USB equipment; the index information configuration file comprises a first port address of at least one port of the multi-port USB device and a corresponding index value;
The multi-port USB equipment initializing module is used for establishing a corresponding relation between the index value and the thread based on the index information configuration file and initializing the multi-port USB equipment;
A port binding module, configured to insert a USB Key device to be produced on one or more ports of the at least one port of the multi-port USB device, and obtain second port addresses of all ports inserted into the USB Key device to be produced; if the second port address of each port can find the first port address with the same name in the index information configuration file, inquiring a thread corresponding to the port according to the index value corresponding to the second port address of each port, and completing port binding of the multi-port USB device;
in the port binding module, the obtaining the second port addresses of all ports inserted into the USB Key device to be produced performs:
After the USB Key equipment to be produced is inserted, reading second equipment address information of the USB Key equipment to be produced, wherein the second equipment address information comprises an equipment manufacturer identifier, an equipment identifier and a third port address;
Obtaining the second port address through the equipment manufacturer identifier, the equipment identifier and the third port address; wherein:
If the device manufacturer identifier is an original device manufacturer identifier VID and the device identifier is an original device identifier PID, the USB Key device is a blank USB Key device, and the third port address is used as the second port address;
if the equipment manufacturer identifier is not the original equipment manufacturer identifier and the equipment identifier is not the original equipment identifier, the USB Key equipment to be produced is the filled USB Key equipment; based on the non-original equipment manufacturer identifier and the non-original equipment identifier, a corresponding original equipment manufacturer identifier VID and a corresponding original equipment identifier PID are obtained; and enumerating all sub-keys under the corresponding original equipment manufacturer identification VID and the corresponding original equipment identification PID in the system registry, and taking the names of the sub-keys containing the third port address as the second port address.
CN202011531454.3A 2020-12-22 2020-12-22 Port binding method and system for multi-port USB device Active CN112650702B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011531454.3A CN112650702B (en) 2020-12-22 2020-12-22 Port binding method and system for multi-port USB device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011531454.3A CN112650702B (en) 2020-12-22 2020-12-22 Port binding method and system for multi-port USB device

Publications (2)

Publication Number Publication Date
CN112650702A CN112650702A (en) 2021-04-13
CN112650702B true CN112650702B (en) 2024-05-28

Family

ID=75359282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011531454.3A Active CN112650702B (en) 2020-12-22 2020-12-22 Port binding method and system for multi-port USB device

Country Status (1)

Country Link
CN (1) CN112650702B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760373A (en) * 2021-07-20 2021-12-07 深圳市智微智能科技股份有限公司 UVC device error-proofing access method, system, terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101115001A (en) * 2007-08-17 2008-01-30 深圳市共进电子有限公司 Host computer of ADSL router and PVC dynamic binding method
KR20090008494U (en) * 2008-02-19 2009-08-24 (주)위드씨엔에스 Memo paper holder has built in usb port
WO2015188586A1 (en) * 2014-06-11 2015-12-17 西安中兴新软件有限责任公司 Data transmission method, electronic equipment, usb equipment and storage medium
CN106844120A (en) * 2017-02-06 2017-06-13 深圳芯智汇科技有限公司 A kind of method and apparatus for binding multi-channel A/D B device and USB port
CN108462536A (en) * 2018-02-11 2018-08-28 西南电子技术研究所(中国电子科技集团公司第十研究所) Repeater satellite arrow carries the long-range binding system of user terminal initial parameter
CN207937993U (en) * 2018-03-22 2018-10-02 龙芯中科技术有限公司 a kind of USB hub

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215500B (en) * 2010-04-09 2016-03-02 中兴通讯股份有限公司 The dynamic mapping method that the miniport service of AP and communication module configures and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101115001A (en) * 2007-08-17 2008-01-30 深圳市共进电子有限公司 Host computer of ADSL router and PVC dynamic binding method
KR20090008494U (en) * 2008-02-19 2009-08-24 (주)위드씨엔에스 Memo paper holder has built in usb port
WO2015188586A1 (en) * 2014-06-11 2015-12-17 西安中兴新软件有限责任公司 Data transmission method, electronic equipment, usb equipment and storage medium
CN106844120A (en) * 2017-02-06 2017-06-13 深圳芯智汇科技有限公司 A kind of method and apparatus for binding multi-channel A/D B device and USB port
CN108462536A (en) * 2018-02-11 2018-08-28 西南电子技术研究所(中国电子科技集团公司第十研究所) Repeater satellite arrow carries the long-range binding system of user terminal initial parameter
CN207937993U (en) * 2018-03-22 2018-10-02 龙芯中科技术有限公司 a kind of USB hub

Also Published As

Publication number Publication date
CN112650702A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN104580519B (en) A kind of method of rapid deployment openstack cloud computing platforms
CN109104317B (en) Big data cluster automatic configuration method and device based on Docker container
US7734818B2 (en) Method to add IPV6 and DHCP support to the network support package
US6606651B1 (en) Apparatus and method for providing direct local access to file level data in client disk images within storage area networks
CN112650702B (en) Port binding method and system for multi-port USB device
CN109960678B (en) Naming processing method and computer processing device
WO2004053688A2 (en) Decoupled hardware configuration manager
US20090259771A1 (en) Identification of memory cards by host
CN113608790A (en) Linux system based self-adaptive management method and system for serial device and storage medium
CN101960442A (en) Method and apparatus for inputting/outputting data using virtualization technique
CN109936716A (en) A kind of realization method and system of display driving
CN114827178A (en) Data processing method, device and equipment and readable storage medium
EP0903667B1 (en) Identifying a data structure and recording method
US6986035B2 (en) Modular bios for detecting resources of a system and reporting information about the resources during two separate phases
US20020144018A1 (en) Method and system for interfacing to pre-existing software code
US20240004832A1 (en) System and method for providing a container environment in a single file
CN117608856A (en) Memory expansion method, system, terminal and storage medium for NVMe (network video Me) acceleration card
CN116521181B (en) Script data processing method, device, equipment and medium based on game system
US7757030B2 (en) Simulating hardware dynamic partitioning capabilities
US11829616B2 (en) Method for determining a hard disk connection slot connected to a hard disk and terminal device
US7487342B2 (en) Method and apparatus for starting up and maintaining of multiple networked computing systems
US6687717B1 (en) Component aliasing operating within a component-based computing system
CN114936045A (en) Automatic configuration method and system for IO (input/output) driving module of MCAL (micro channel logic) and storage medium
CN102026402A (en) Method for realizing access of computer device to wireless network
CN112540889B (en) Method, device, equipment and medium for adjusting hard disk starting sequence in user mode

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant