CN1851679A - USB device automatic initialization method and device - Google Patents

USB device automatic initialization method and device Download PDF

Info

Publication number
CN1851679A
CN1851679A CNA2006100832094A CN200610083209A CN1851679A CN 1851679 A CN1851679 A CN 1851679A CN A2006100832094 A CNA2006100832094 A CN A2006100832094A CN 200610083209 A CN200610083209 A CN 200610083209A CN 1851679 A CN1851679 A CN 1851679A
Authority
CN
China
Prior art keywords
usb
usb device
monitoring
initialization
mouth
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.)
Granted
Application number
CNA2006100832094A
Other languages
Chinese (zh)
Other versions
CN100386751C (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.)
Feitian Technologies Co Ltd
Original Assignee
Beijing Feitian Technologies 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 Feitian Technologies Co Ltd filed Critical Beijing Feitian Technologies Co Ltd
Priority to CNB2006100832094A priority Critical patent/CN100386751C/en
Publication of CN1851679A publication Critical patent/CN1851679A/en
Application granted granted Critical
Publication of CN100386751C publication Critical patent/CN100386751C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

Monitoring device in Initialisation equipment automatically judges USB equipment inserting and drawing out in USB port of initialisation equipment, in inserting, initialisation device automatically to proceed initializing to USB equipment; in drawing out, automatically to proceed clearance operation in need, and waiting next USB equipment inserting, otherwise directly waiting next USB equipment inserting. The present invention does not need manual intervention and hard ware, thereby saving time, reducing cost and error possibility, also capable of utilizing multithreading technology to proceed initialize operation to plurality of USB equipment, greatly raising work efficiency.

Description

A kind of method of USB device auto-initiation and device
Technical field
The present invention relates to a kind ofly USB device be carried out initialized method and device, specifically a kind of method and apparatus that USB device is carried out auto-initiation.
Background technology
USB is the abbreviation of English Universal Serial Bus, and Chinese implication is " USB (universal serial bus) ", and it is a kind of interfacing that is applied in computer realm.In recent years, along with popularizing of the computing machine of a large amount of support USB interface, the USB technology has entered into the practical stage, use the equipment of USB interface also to grow with each passing day, for example digital camera, scanner, joystick, keyboard, mouse, printer, memory device, vision facilities etc., product---the USB token that also has USB technology and smart card techniques to combine in addition.
These USB device are being dispatched from the factory or before sales all will pass through certain initialization, write certain data and information, and operating system can be discerned, and its software kit can be operated them.Initialization operation comprises creates required data structure, the file storage structure of software, makes up hardware information, as model, sequence number, the information of dispatching from the factory, and the management software etc. of downloading self hardware inside.
Existing initial method generally all is to write specific initializers, reception click or keyboard knock under the situation of computing machine USB mouth insertion USB device, there is certain external event to take place, software begins to carry out the initialization flow process then, pull out USB device then, repeat above operation.Such initial method is not long at initialization flow process spended time, the quantity of initialization USB device is too not big, task is to satisfy the demand when not being too urgent, but when wanting initialized USB device a lot of, just be difficult to reach gratifying effect, its work efficiency is low, time, human and material resources, financial resources all are a kind of wastes, do not make full use of the resource of computing machine.
Summary of the invention
Complex operation, long, the ineffective problem of spended time in order to solve in the prior art to the USB device initialization, the invention provides a kind of method and apparatus of USB device auto-initiation, it can replace manual method automatically USB device to be carried out initialization process, simple to operate, high efficiency.
The method of USB device auto-initiation of the present invention, its implementation is: judge that automatically USB device in the insertion of the USB of initialization apparatus mouth with pull out, carries out initialization automatically when inserting, wait for the insertion of next USB device pulling out the back.
Described method realizes by following steps:
Steps A: start;
Step B: the monitoring USB device is in the insertion of USB mouth;
Step C: when monitoring the USB device insertion, carry out the initialization flow process;
Step D: pulling out of monitoring USB device, after USB device is pulled out, carry out step B.
Described method realizes by following steps:
Steps A: start;
Steps A 1: detect on the USB mouth whether be connected with USB device;
Steps A 2:, carry out the initialization flow process if be connected with USB device on the USB mouth; If do not connect USB device on the USB mouth, carry out step B;
Steps A 3: pulling out of monitoring USB device, after USB device is pulled out, carry out step B;
Step B: the monitoring USB device is in the insertion of USB mouth;
Step C: when monitoring the USB device insertion, carry out the initialization flow process;
Step D: pulling out of monitoring USB device, after USB device is pulled out, carry out step B.
Described monitoring USB device is inserted and is extracted by the PC/SC interface and realize.
Described monitoring USB device is inserted and equipment control (Device Management) interface and the message mechanism that provide by Windows operating system is provided is realized.
Described monitoring USB device is inserted and is extracted by calling and the privately owned interface that provides is provided realizes.
The device of USB device auto-initiation of the present invention comprises supervising device and apparatus for initializing, and whether described supervising device is used to monitor has USB device to insert and pull out on the USB mouth; Described apparatus for initializing is used for the USB device initialization.
The device of USB device auto-initiation of the present invention also comprises pick-up unit, is used to detect the current USB device that whether is connected with on the USB mouth.
The beneficial effect that the present invention produces is:
1, saved the time: judge automatically and carry out initialization operation by software, can't help and manually to control, reduced the possibility of makeing mistakes.Owing to saved the manual intervention time, so upward saved much the time than the method for prior art.
2, saved resource: because most of computing machine is supported a plurality of USB mouths, so can being set, multithreading carries out initial work, monitor the plug incident of USB mouth as much as possible, can a plurality of USB device of parallel initialization, reduce the quantity of initialization personnel and initialization apparatus comparatively speaking, and made full use of computer resource.
3, reduced cost: owing to do not need manual intervention, therefore can not be equipped with the needed instrument of manual intervention, as mouse, keyboard etc. have reduced cost.In addition, the equipment that initialization is used both can be ordinary PC, also can be the special equipment of making that only has function of initializing, had so just further reduced cost.
Description of drawings
The present invention is further described below in conjunction with drawings and Examples.
Fig. 1 is the structural representation of the device of USB device auto-initiation of the present invention;
Fig. 2 is the process flow diagram of the method for USB device auto-initiation of the present invention.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments, but not as the present invention is limited.
The present invention is suitable for all equipment that use USB interface, for example mouse, keyboard, digital camera, USBKey etc., USB device is inserted the USB mouth, initialization apparatus detects the insertion of USB device, USB device is carried out initialization operation automatically, finish and wait for pulling out of USB device after the initialization, pull out the insertion that initialization apparatus behind the USB continues the next USB device of monitoring.
Specify with the example that is initialized as below USB Key:
USB Key (USB lock), also be USB Token (USB token), it is the form that key or cryptographic hardware (as IC-card and various crypto chip) is packaged into the USB joint, by inserting USB interface of computer, use USB communications protocol and computing machine to carry out communication, reach data interaction and computation purpose.USB Key must pass through initialization, and by software on computers is installed, reaches the purpose of data and software protection and personal identification.
Embodiment one:
Set up the initialization apparatus of being made up of pick-up unit 101, supervising device 102 and apparatus for initializing 103 shown in Figure 1, initialization apparatus is provided with the USB mouth, its method that USB device is carried out auto-initiation as shown in Figure 2:
Step 201: start initialization apparatus;
Step 202: pick-up unit 101 detects on the current USB mouth whether be inserted with USB Key, if having, and execution in step 204; If no, execution in step 203;
Step 203: supervising device 102 is monitored the USB mouth by the PC/SC interface, can utilize SCardListReaders, SCardLocateCard, smart card com interface under interfaces such as SCardGetStatusChange or the Windows operating system is monitored, when on monitoring the USB mouth, having USB Key to insert, execution in step 204;
Step 204: 103 couples of USB Key of apparatus for initializing carry out initialization;
Step 205: supervising device 102 monitoring USB Key pull out, and carry out steps 203 after monitoring the pulling out of USB Key.
Embodiment two:
Set up the initialization apparatus of being made up of pick-up unit 101, supervising device 102 and apparatus for initializing 103 shown in Figure 1, initialization apparatus is provided with the USB mouth, its method that USB device is carried out auto-initiation as shown in Figure 2:
Step 201: start initialization apparatus;
Step 202: pick-up unit 101 detects on the current USB mouth whether be inserted with USB Key, if having, and execution in step 204; If no, execution in step 203;
Step 203: the equipment control interface that supervising device 102 provides by Windows operating system is monitored and is obtained the USB device attribute and comes the USB Key of appointment is detected to USB device, can use the RegisterDeviceNotification function to register the device type that receives the plug notice from operating system, use the SetupDiGetClassDevsEx function to obtain the USB Key information of on the USB of initialization apparatus mouth, having inserted, use the windows messaging treatment mechanism to handle the plug that WM_DEVICECHANGE message is monitored USB Key.When on monitoring the USB mouth, having USB Key to insert, execution in step 204;
Step 204: 103 couples of USB Key of apparatus for initializing carry out initialization;
Step 205: supervising device 102 monitoring USB Key pull out, and carry out steps 203 after monitoring the pulling out of USB Key.
Embodiment three:
Set up the initialization apparatus of being made up of pick-up unit 101, supervising device 102 and apparatus for initializing 103 shown in Figure 1, initialization apparatus is provided with the USB mouth, its method that USB device is carried out auto-initiation as shown in Figure 2:
Step 201: start initialization apparatus;
Step 202: pick-up unit 101 detects on the current USB mouth whether be inserted with USB Key, if having, and execution in step 204; If no, execution in step 203;
Step 203: supervising device 102 is monitored by the privately owned interface of the driving that use card reader manufacturer provides.When on monitoring the USB mouth, having USB Key to insert, execution in step 204;
Step 204: 103 couples of USB Key of apparatus for initializing carry out initialization;
Step 205: supervising device 102 monitoring USB Key pull out, and carry out steps 203 after monitoring the pulling out of USB Key.
In above-mentioned three embodiment, the startup method of initialization apparatus can be the start-up by hand initialize routine, also can be this program of moving automatically when computer starting, but does not limit to this two kinds of methods.Above-mentioned three employed method for supervising of embodiment can use or use wherein one or both simultaneously by multithreading, can also use other method, if can monitor USB device on the USB mouth insertion and pull out.In addition, execution in step 202 and directly the USB mouth being monitored not in actual applications, and then can carry out a series of cleaning operations if necessary after pulling out the intact USB device of firm initialization is as discharging the resource used etc.The present invention is the limit erroneous disposal route not, can directly withdraw from this program or prompting user when makeing mistakes and whether continue monitoring or withdraw from this flow process, also can use other error handling methods.In whole flow process, can add more humane interface, as wrong, the frequency of failure, back prompting insertion etc. was pulled out, is pulled out in prompting after initialization was finished, also can use special USB extender (as a kind of hardware of expanding a plurality of USB mouths, by the energising of control expansion USB mouth, the effect that outage reaches the simulation plug, can insert a plurality of USB device once) and a plurality of USB device of multithreading initialization simultaneously, to increase work efficiency.

Claims (8)

1, a kind of method of USB device auto-initiation is characterized in that: judge that automatically USB device in the insertion of the USB of initialization apparatus mouth with pull out, carries out initialization automatically when inserting, wait for the insertion of next USB device pulling out the back.
2, the method for USB device auto-initiation according to claim 1 is characterized in that: described method realizes by following steps:
Steps A: start;
Step B: the monitoring USB device is in the insertion of USB mouth;
Step C: when monitoring the USB device insertion, carry out the initialization flow process;
Step D: pulling out of monitoring USB device, after USB device is pulled out, carry out step B.
3, the method for USB device auto-initiation according to claim 1 and 2 is characterized in that: described method realizes by following steps:
Steps A: start;
Steps A 1: detect on the USB mouth whether be connected with USB device;
Steps A 2:, carry out the initialization flow process if be connected with USB device on the USB mouth; If do not connect USB device on the USB mouth, carry out step B;
Steps A 3: pulling out of monitoring USB device, after USB device is pulled out, carry out step B;
Step B: the monitoring USB device is in the insertion of USB mouth;
Step C: when monitoring the USB device insertion, carry out the initialization flow process;
Step D: pulling out of monitoring USB device, after USB device is pulled out, carry out step B.
4, the method for USB device auto-initiation according to claim 1 is characterized in that: described monitoring USB device is inserted and is extracted by the PC/SC interface and realize.
5, the method for USB device auto-initiation according to claim 1 is characterized in that: described monitoring USB device is inserted and the equipment control interface and the message mechanism that provide by Windows operating system is provided is realized.
6, the method for USB device auto-initiation according to claim 1 is characterized in that: described monitoring USB device is inserted and is extracted by calling and the privately owned interface that provides is provided realizes.
7, a kind of device of USB device auto-initiation is characterized in that: described device comprises:
Whether supervising device: being used to monitor has USB device to insert and pull out on the USB mouth;
Apparatus for initializing: be used for the USB device initialization.
8, the device of USB device auto-initiation according to claim 7 is characterized in that: described device also comprises pick-up unit, and described pick-up unit is used to detect the current USB device that whether is connected with on the USB mouth.
CNB2006100832094A 2006-05-30 2006-05-30 USB device automatic initialization method and device Active CN100386751C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100832094A CN100386751C (en) 2006-05-30 2006-05-30 USB device automatic initialization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100832094A CN100386751C (en) 2006-05-30 2006-05-30 USB device automatic initialization method and device

Publications (2)

Publication Number Publication Date
CN1851679A true CN1851679A (en) 2006-10-25
CN100386751C CN100386751C (en) 2008-05-07

Family

ID=37133158

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100832094A Active CN100386751C (en) 2006-05-30 2006-05-30 USB device automatic initialization method and device

Country Status (1)

Country Link
CN (1) CN100386751C (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1976279B (en) * 2006-12-04 2010-10-06 北京飞天诚信科技有限公司 Automatic monitoring and cleaning intelligent key system and working method thereof
CN102333015A (en) * 2011-10-25 2012-01-25 山西省电力公司大同供电分公司 Method for monitoring computer information network
CN102968325A (en) * 2012-12-04 2013-03-13 北京深思洛克软件技术股份有限公司 USB (Universal Serial Bus) equipment and method and device for automatically initializing same
CN104484196A (en) * 2014-11-28 2015-04-01 上海动联信息技术股份有限公司 Production system and method for automatically finishing USB KEY equipment firmware initialization

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100395664B1 (en) * 2001-08-20 2003-08-25 엠텍비젼 주식회사 Universal serial bus device and initializing mehtod of the device
CN1303542C (en) * 2003-10-24 2007-03-07 英业达股份有限公司 Plug-and-play method for USB equipment under linux operation system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1976279B (en) * 2006-12-04 2010-10-06 北京飞天诚信科技有限公司 Automatic monitoring and cleaning intelligent key system and working method thereof
CN102333015A (en) * 2011-10-25 2012-01-25 山西省电力公司大同供电分公司 Method for monitoring computer information network
CN102968325A (en) * 2012-12-04 2013-03-13 北京深思洛克软件技术股份有限公司 USB (Universal Serial Bus) equipment and method and device for automatically initializing same
CN102968325B (en) * 2012-12-04 2016-12-21 北京深思数盾科技股份有限公司 A kind of USB device and the method and apparatus of auto-initiation thereof
CN104484196A (en) * 2014-11-28 2015-04-01 上海动联信息技术股份有限公司 Production system and method for automatically finishing USB KEY equipment firmware initialization
CN104484196B (en) * 2014-11-28 2018-01-02 上海动联信息技术股份有限公司 A kind of production system and method for being automatically performed the initialization of USBKEY equipment firmwares

Also Published As

Publication number Publication date
CN100386751C (en) 2008-05-07

Similar Documents

Publication Publication Date Title
CN101060436A (en) A fault analyzing method and device for communication equipment
CN1151449C (en) System and method allowing server remote access to assets information in computer system
CN1251670A (en) Method and system for enabling nondisruptive live insertion and removal of feature cards in computer system
US20090113435A1 (en) Integrated backup with calendar
CN1754150A (en) System and apparatus for eliminating user interaction during hardware configuration at system boot
CN1447224A (en) Method of optimizing use of memory in computer applied program
CN1264082A (en) Low-power mode computer with simple powder supply
CN1993676A (en) Method and apparatus for discovering hardware in a data processing system
CN1353831A (en) Method and device for monitoring creation and destruction of child processes within application executing in computer system
CN1752942A (en) Monitoring diagnosis device of computer main board failure
CN1968168A (en) Blade server positioning method and system
CN1851679A (en) USB device automatic initialization method and device
CN1949169A (en) TV software upgrading method
CN110291759A (en) A kind of management method and system of task
CN101051269A (en) Intelligent platform management interface firmware architecture and method of building the same
CN101051242A (en) Power supply control method and device for computer system
CN1327191A (en) Method for identifying local period module in erent sequence
CN1317846C (en) Method of realizing internal external network physical partition and its device
CN1744595A (en) Web-based financial self-help service system and its control method
CN1130860C (en) Automatic modem testing method
CN1512337A (en) Method for computer starting and multiple operation system switching
CN1372189A (en) Method for instant raising CPU frequency
CN1369802A (en) Method for recording and automatically restoring flow state
CN1262943C (en) Method for automatically changing start sequence of computer
CN1848093A (en) Method for debugging high configuration and power supply interface module in basic inputting and outputting system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: FEITIAN CHENGXIN TECHNOLOGIES CO., LTD.

Free format text: FORMER NAME: BEIJING FEITIAN CHENGXIN SCIENCE + TECHNOLOGY CO. LTD.

CP03 Change of name, title or address

Address after: 100085 Beijing city Haidian District Xueqing Road No. 9 Ebizal building B block 17 layer

Patentee after: Feitian Technologies Co.,Ltd.

Address before: 100083, Haidian District, Xueyuan Road, No. 40 research, 7 floor, 5 floor, Beijing

Patentee before: FEITIAN TECHNOLOGIES Co.,Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 17th floor, building B, Huizhi building, No.9, Xueqing Road, Haidian District, Beijing 100085

Patentee after: Feitian Technologies Co.,Ltd.

Country or region after: China

Address before: 100085 17th floor, block B, Huizhi building, No.9 Xueqing Road, Haidian District, Beijing

Patentee before: Feitian Technologies Co.,Ltd.

Country or region before: China