CN104079453A - Enumeration method and device for debugging equipment - Google Patents
Enumeration method and device for debugging equipment Download PDFInfo
- Publication number
- CN104079453A CN104079453A CN201410320120.XA CN201410320120A CN104079453A CN 104079453 A CN104079453 A CN 104079453A CN 201410320120 A CN201410320120 A CN 201410320120A CN 104079453 A CN104079453 A CN 104079453A
- Authority
- CN
- China
- Prior art keywords
- tested end
- command
- information
- commissioning device
- test lead
- 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
Links
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses an enumeration method and device for debugging equipment. The enumeration method for the debugging equipment comprises the steps that when a testing terminal is connected with a tested terminal, the tested terminal receives instruct information from the testing terminal, wherein the instruct information is the information for indicating that the tested terminal enumerates the debugging equipment in the tested terminal; the tested terminal generates a loading order according to the instruction information, wherein the loading order is an order for loading the debugging equipment; the tested terminal drives the debugging equipment to enumerate the debugging equipment according to the loading order. According to the method and the device, the problem that in the prior art, when a terminal can not be started completely, the debugging equipment in the terminal can not be enumerated can be solved, and when the terminal can not be started completely, the debugging equipment in terminal equipment can still be enumerated.
Description
Technical field
The present invention relates to product development and field tests, in particular to a kind of enumeration methodology and device of commissioning device.
Background technology
When terminal breaks down, conventionally need to debug terminal.For example, the fault of Android mobile phone is debugged.When terminal is tested, generally can check the commissioning device in terminal, and by commissioning device, terminal be tested.For example, the debugging bridge in Android system (Android debug bridge, referred to as ADB), by debugging bridge, capture log, obtain cellphone information, file operation etc., by obtaining the file of these terminals, check the fault of terminal, for example, check that whether mobile phone is by root mistake.No matter in the development process of terminal, or in testing process, all need by commissioning device, terminal to be detected.Demand is pointed out that, ADB is as a commissioning device, under terminal initial state, generally can not enumerate ADB equipment, after sale or the user who wants to open ADB can carry out corresponding operating to system by system interface and enumerates ADB equipment, such as Android system interface is set in [the USB debugging] chosen in [developer's option] open ADB equipment.But, if because some are abnormal, the mobile phone of crossing such as user root, did some special operations, or hardware fault causes Android system not start, so just do not have the method operation of getting at interface to enumerate ADB equipment, and now need to carry out problem analysis with ADB.Running at present the unique method of this problem is exactly again download system, but can cause like this scene of problem destroyed, thereby makes to cause knowing the reason leading to system abnormity.
For in prior art when terminal can not start completely, cannot enumerate the problem of the commissioning device in terminal, effective solution is not yet proposed at present.
Summary of the invention
Main purpose of the present invention is to provide a kind of enumeration methodology and device of commissioning device, to solve in prior art when terminal can not start completely, cannot enumerate the problem of the commissioning device in terminal.
To achieve these goals, according to an aspect of the present invention, provide a kind of enumeration methodology of commissioning device.According to the enumeration methodology of commissioning device of the present invention, comprise: when test lead is connected with tested end, described tested termination is received the command information from described test lead, wherein, described command information is for indicating described tested end to enumerate the information of commissioning device in described tested end; Described tested end generates loading command according to described command information, and wherein, described loading command is for loading the order of described commissioning device; And described tested end drives described commissioning device to enumerate described commissioning device according to described loading command.
Further, described tested end comprises according to described command information generation loading command: the kernel spacing in the operating system of described tested end is monitored described command information; After described kernel spacing listens to described command information, the user's space in described operating system sends described command information; And described user's space generates described loading command according to described command information, wherein, described user's space sends to described kernel spacing by described loading command.
Further, described tested end drives described commissioning device to comprise to enumerate described commissioning device according to described loading command: described kernel spacing receives described loading command; Described kernel spacing drives described commissioning device according to described loading command, and wherein, after driving described commissioning device, described tested end is enumerated described commissioning device.
Further, when test lead is connected with tested end, the command information that described tested termination is received from described test lead comprises: by USB, connect described test lead and described tested end; Detect in described tested end and whether have USB device; If detect in described tested end and there is USB device, receive predetermined instruction information, wherein, the form of described predetermined instruction information is the form of the communication protocol between described test lead and described tested end, the instruction that described predetermined instruction information is enumerated described USB device for the described tested end of indication.
Further, if detected in described tested end, there is USB device, receive predetermined instruction information and comprise: whether the USB device that judgement detects is mass storage; And if the USB device detecting is described mass storage, receive the scsi command from described test lead, wherein, described scsi command is used to indicate described tested end and enumerates described USB device.
Further, if detected in described tested end, there is USB device, receive predetermined instruction information and comprise: receive the USB request bag sending by index order, wherein, described USB request bag is used to indicate described tested end and enumerates described USB device.
Further, the command information that described tested termination is received from described test lead comprises: described tested end detects keyboard-coding information, predetermined action information or predetermined image information; And after described keyboard-coding information, described predetermined action information or described predetermined image information being detected, resolved detection to the command information that carries of information.
Further, the command information that described tested termination is received from described test lead comprises: described tested end receives the described command information from described test lead by radio channel.
To achieve these goals, according to a further aspect in the invention, provide a kind of device of enumerating of commissioning device.According to the device of enumerating of commissioning device of the present invention, comprise: receiving element, for when test lead is connected with tested end, reception is from the command information of described test lead, and wherein, described command information is for indicating described tested end to enumerate the information of commissioning device in described tested end; Generation unit, for generating loading command according to described command information, wherein, described loading command is for loading the order of described commissioning device; And driver element, for drive described commissioning device to enumerate described commissioning device according to described loading command.
Further, described generation unit comprises: monitor module, for the kernel spacing of the operating system by described tested end, monitor described command information; Sending module, for after described kernel spacing listens to described command information, the user's space in described operating system sends described command information; And generation module, for generating described loading command by described user's space according to described command information, wherein, described user's space sends to described kernel spacing by described loading command.
Further, described driver element comprises: the first receiver module, for receiving described loading command by described kernel spacing; Driver module, for driving described commissioning device by described kernel spacing according to described loading command, wherein, after driving described commissioning device, described tested end is enumerated described commissioning device.
Further, described receiving element comprises: link block, for connect described test lead and described tested end by USB; Detection module, for detection of whether having USB device in described tested end; The second receiver module, for when described tested end being detected and there is USB device, receive predetermined instruction information, wherein, the form of described predetermined instruction information is the form of the communication protocol between described test lead and described tested end, the instruction that described predetermined instruction information is enumerated described USB device for the described tested end of indication.
By the present invention, adopt when test lead is connected with tested end, tested termination is received the command information from test lead, and wherein, command information is for indicating tested end to enumerate the information of commissioning device in tested end; Tested end generates loading command according to command information, and wherein, loading command is for loading the order of commissioning device; And tested end drives commissioning device to enumerate the method for commissioning device according to loading command, terminal solved in prior art when can not start, cannot enumerate the problem of the commissioning device in terminal, and then reached when terminal can not start completely, enumerate the effect of the commissioning device in terminal.
Accompanying drawing explanation
The accompanying drawing that forms the application's a part is used to provide a further understanding of the present invention, and schematic description and description of the present invention is used for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is according to the flow chart of the enumeration methodology of the commissioning device of the embodiment of the present invention;
Fig. 2 is the flow chart of the enumeration methodology of commissioning device according to the preferred embodiment of the invention;
Fig. 3 is the flow chart of the enumeration methodology of the commissioning device of another preferred embodiment according to the present invention;
Fig. 4 is the schematic diagram of enumerating device according to the commissioning device of the embodiment of the present invention; And
Fig. 5 is the schematic diagram of enumerating device of commissioning device according to the preferred embodiment of the invention.
Embodiment
It should be noted that, in the situation that not conflicting, embodiment and the feature in embodiment in the application can combine mutually.Describe below with reference to the accompanying drawings and in conjunction with the embodiments the present invention in detail.
In order to make those skilled in the art person understand better the present invention program, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, should belong to the scope of protection of the invention.
Explanation of nouns:
ADB: i.e. Android debug bridge, plays the effect of debugging bridge.By adb, can debug Android program, be a kind of testing tool.ADB is an instrument in Android system, with this instrument, can manage Android simulator or real Android equipment by direct control, its major function has: the order line of operational outfit, the port mapping of management simulation device or equipment, between computer and equipment, upload/download file, local apk software is mounted to simulator or android equipment etc.
Kernel spacing: in operating system, part kernel software is independent of common applications, operates on higher privilege level, and they reside on protected memory headroom, has all authorities of access hardware devices, is kernel spacing.
User's space: in operating system, the application program that operates in user's space can only be seen the part system resource that allows them to use, and can not use some specific systemic-function, directly access kernel space and hardware device.User's space and kernel spacing are placed under this asymmetric access mechanism and have good fail safe, can effectively prevent spying upon of malicious user.
MTP:media transfer protocol, media transmission protocol, is the expansion based on PTP (picture transfer protocol) agreement, is mainly used in transmission medium file.
RNDIS:remote network driver interface specification, i.e. remote NDIS, telecommunication network drives interface specification.Based on USB, realizing RNDIS is in fact exactly TCP/IP over USB, is exactly in USB device, to move TCP/IP, allows USB as a network interface card.
The embodiment of the present invention provides a kind of enumeration methodology of commissioning device.
Android platform adopts linux operating system to do kernel, in a lot of situations, although Android equipment can not be started shooting, linux kernel still can start, and the USB drive part of Android adopts USB Drive Structure in linux substantially, so as long as Linux is activated, USB so wherein drives and also can work, the situation based on such, at Android equipment, do not start shooting, also commissioning device can be enumerated,, when terminal can not start completely, also the commissioning device in terminal can be enumerated.
Fig. 1 is according to the flow chart of the enumeration methodology of the commissioning device of the embodiment of the present invention.As shown in the figure, the enumeration methodology of this commissioning device comprises the steps:
Step S102, when test lead is connected with tested end, tested termination is received the command information from test lead, and wherein, command information is for indicating tested end to enumerate the information of commissioning device in tested end.
The terminal that needs are tested is connected with the computer of testing, be that test lead is connected with tested end, by test lead, check in tested end whether have commissioning device to be enumerated, if can check that has commissioning device in tested end, but this commissioning device cannot be enumerated, test lead sends command information to tested end, and correspondingly, tested termination is received the command information from test lead.
For example, test lead is the computer of windows system, tested end is the mobile phone of Android system, at computer and mobile phone during in connection status, by the equipment manager in windows system, can check in mobile phone whether have commissioning device to be enumerated, if viewed in mobile phone, there is the commissioning device that can be enumerated, to mobile phone, send the information that mobile phone is enumerated this commissioning device that is used to indicate, to mobile phone, send command information.
Step S104, tested end generates loading command according to command information, and wherein, loading command is for loading the order of commissioning device.
Tested termination is received command information, and generates loading command according to command information, to carry out the loading of commissioning device by loading command, finally makes commissioning device be enumerated.
Step S106, tested end drives commissioning device to enumerate commissioning device according to loading command.
Tested end drives commissioning device according to loading command, thereby commissioning device can be enumerated, and test lead can operate the commissioning device enumerating.For example, after enumerating commissioning device, test lead can complete by commissioning device and capture log, obtain cellphone information and obtain the actions such as operation file, thus extremely analyzing tested end.
Pass through above-described embodiment, when tested end cannot be started shooting, as long as when test lead is connected with tested end, at test lead, can view the commissioning device that this tested end can be enumerated, can be by receiving the command information from test lead, indicate tested end to drive commissioning device, so that commissioning device is enumerated, thereby when tested end causes starting shooting because of fault, also can enumerate the commissioning device in tested end, and then by the commissioning device enumerating, the problem of tested end be carried out to analysis and solve.
Fig. 2 is the flow chart of the enumeration methodology of commissioning device according to the preferred embodiment of the invention.As shown in the figure, the enumeration methodology of this commissioning device comprises the steps:
Step S202, when test lead is connected with tested end, tested termination is received the command information from test lead, and wherein, command information is for indicating tested end to enumerate the information of commissioning device in tested end.
Step S204, the kernel spacing in the operating system of tested end is monitored command information.
Kernel spacing in the operating system of tested end is monitored command information, by kernel spacing, detects the command information whether having from test lead.
Step S206, after kernel spacing listens to command information, the user's space in operating system sends command information.
After kernel spacing listens to command information, to user's space, send command information.For example, in Android system, utilize netlink socket as the communication interface of user's space and kernel spacing, by netlink socket, to user's space, send command information.
Step S208, user's space generates loading command according to command information, and wherein, user's space sends to kernel spacing by loading command.
User's space generates loading command according to command information, and user's space sends to kernel spacing by loading command.
Step S210, tested end drives commissioning device to enumerate commissioning device according to loading command.
Above-mentioned steps S202 is identical with step S106 with the step S102 shown in Fig. 1 respectively with step S210, repeats no more herein.
By above-described embodiment, by kernel spacing, receive command information, and command information is sent to user's space, user's space generates loading command according to command information, and the loading command of generation is sent to kernel spacing, and by kernel spacing, drive commissioning device, commissioning device is enumerated.Because kernel spacing and user's space are used for respectively processing application program and the common applications of higher-rights, by kernel spacing, can receive the command information from test lead, and make user's space generate loading command, again the loading command of generation is sent to kernel spacing, thereby both guaranteed that tested end can receive command information in time, can also in the situation that guaranteeing tested end safety, enumerate commissioning device.
Further, tested end drives commissioning device to comprise to enumerate commissioning device according to loading command: kernel spacing receives loading command.Kernel spacing drives commissioning device according to loading command, and wherein, after driving commissioning device, tested end is enumerated commissioning device.
After kernel spacing receives the loading command from user's space, according to loading command, drive commissioning device, after commissioning device is driven, tested end is enumerated this commissioning device.Commissioning device for example, at kernel spacing, according to loading command, drives commissioning device, so that can be enumerated.
Preferably, for the ease of enumerating commissioning device, when test lead is connected with tested end, the command information that tested termination is received from test lead comprises: by USB connecting test end and tested end.Detect and in tested end, whether have USB device.If detected in tested end, have USB device, receive predetermined instruction information, wherein, the form of predetermined instruction information is the form of the communication protocol between test lead and tested end, the instruction that predetermined instruction information is enumerated USB device for the tested end of indication.
After by USB connecting test end and tested end, can enumerate commissioning device by following two kinds of modes.
Mode one:
When tested end cannot be started shooting, if detected in tested end, there is USB device, receive predetermined instruction information and comprise: whether the USB device that judgement detects is mass storage.If the USB device detecting is mass storage, receive the scsi command from test lead, wherein, scsi command is used to indicate tested end and enumerates USB device.
Mass storage is mass storage equipment, after test lead is connected by USB with tested end, if after having USB device in definite tested end, judge whether this USB device is mass storage, and receives the scsi command from test lead.Wherein, in order to make tested end can identify command information, the command format of this scsi command is identical with the command format of conventional SCSI, but the content of order is different from existing scsi command, the form of scsi command of enumerating USB device due to tested end is identical with existing scsi command, and content is different from existing scsi command, can avoid scsi command and other scsi commands that this tested termination is received to distinguish, in order to avoid obscure.
Mode two:
At tested end, cannot start shooting, and when this tested end can not be enumerated mass storage, just can not utilize mode one to carry out having enumerated of commissioning device, so, if detected in tested end, there is USB device, receive predetermined instruction information and comprise: whether the USB device that judgement detects is that media delivery equipment or telecommunication network drive interface equipment.And if the USB device detecting is that media delivery equipment or telecommunication network drive interface equipment and other any one USB device, receive the USB request bag sending by index order, wherein, USB request bag is used to indicate tested end and enumerates USB device.
When the equipment of being responsible for carrying out carrying out between computer and terminal file operation in detected end is not mass storage, by test side, detects these files that carry out file operation and enumerate USB device.For example, be responsible for carrying out computer and interrupt between carry out file operation equipment be that media delivery equipment or telecommunication network drive interface equipment.Wherein, media delivery equipment is MTP, and it is rndis that telecommunication network drives interface equipment, when the USB device that judgement monitors is MTP, Rndis or other USB device, the USB request bag that reception sends by index order, wherein, this USB request bag is used to refer to tested end and enumerates USB device.Wherein, index order is the order in computer.
In the above-described embodiments, tested end drives commissioning device by receiving command information, thereby makes the commissioning device can be at tested end during the state in being not activated, and also can enumerate commissioning device.Thereby solved in prior art when terminal can not start, cannot enumerate the problem of the commissioning device in terminal, and then reached when terminal can not start, also can enumerate the commissioning device in terminal, recycling commissioning device continues debugging and case study to terminal.
Preferably, in the above-described embodiments, the command information that tested termination is received from test lead comprises: tested end detects keyboard-coding information, predetermined action information or predetermined image information.And after keyboard-coding information, predetermined action information or predetermined image information being detected, resolved detection to the command information that carries of information.
Tested end is except driving commissioning device by reception scsi command and USB request bag, can also obtain command information by detecting keyboard-coding information, predetermined action information or predetermined image information etc., by the information that these are detected, resolve and can obtain command information, and drive commissioning device according to command information, thereby realized under the state not starting at tested end, also can enumerate commissioning device.
Keyboard-coding information can by physical keyboard, dummy keyboard even external connection keyboard receive, predetermined action can receive by displacement transducer or the gravity sensor arranging in tested end, and predetermined image information can be drawn predetermined image by touch screen and be received.The case coded message receiving can be string number, letter or the combination of the two, can also be that long-time button and short time button combine immediately, the predetermined action information receiving can be to draw 8 fonts with mobile phone, and the predetermined image information receiving can be circular, square or meet the lines of certain rule.
Known by above-described embodiment, the mode that tested termination is received command information is not limited to scsi command and USB request bag, can also be keyboard-coding information, predetermined action information and predetermined image information etc., it should be noted that, in the situation that tested end does not start, the sensor of tested end can also be worked, and can adopt the mode of operation that transducer is corresponding to receive command information.
Preferably, the command information that tested termination is received from test lead comprises: tested end receives the command information from test lead by the mode of radio channel.For example, tested end receives the command information from test lead by any one mode in wifi, bluetooth passage or other radio channel.
When test lead is connected with tested end, can receive the command information from test lead by any one mode in wifi, bluetooth passage or other radio channel, be not limited to receive the command information from test lead by USB.And it is identical with the data processing means receiving after command information by USB by generating the data processing means of loading command etc. after the reception command informations such as wifi, therefore, connecting test end and tested end by other means, and can be identical with the connected mode of USB in test lead and the mode of tested end transmission data, when damaging, the interface of USB can adopt other connected modes to carry out transmission and the processing of data so, thereby guarantee when tested end cannot start, when some connecting interface being set cannot normally working, also can enumerate the commissioning device in tested end, and then by the commissioning device enumerating, the problem of tested end is carried out to analysis and solve.
Below in conjunction with Fig. 3, the enumeration methodology of the commissioning device of the embodiment of the present invention is described.
The application program of test lead sends command information, the kernel spacing of tested end receives command information, and command information is sent to user's space, user's space generates loading command and sends to driver module, driver module drives commissioning device according to loading command, so that commissioning device can be enumerated.
The embodiment of the present invention also provides a kind of device of enumerating of commissioning device.
Fig. 4 is the schematic diagram of enumerating device according to the commissioning device of the embodiment of the present invention.As shown in the figure, the device of enumerating of this commissioning device comprises: receiving element 10, generation unit 20 and driver element 30.
Receiving element 10, for when test lead is connected with tested end, receives the command information from test lead, and wherein, command information is for indicating tested end to enumerate the information of commissioning device in tested end.
The terminal that needs are tested is connected with the computer of testing, be that test lead is connected with tested end, by test lead, check in tested end whether have commissioning device to be enumerated, if can check that has commissioning device in tested end, but this commissioning device cannot be enumerated, test lead sends command information to tested end, and correspondingly, tested termination is received the command information from test lead.
For example, test lead is the computer of windows system, tested end is the mobile phone of Android system, at computer and mobile phone during in connection status, by the equipment manager in windows system, can check in mobile phone whether have commissioning device to be enumerated, if viewed in mobile phone, there is the commissioning device that can be enumerated, to mobile phone, send the information that mobile phone is enumerated this commissioning device that is used to indicate, to mobile phone, send command information.
Generation unit 20 is for generating loading command according to command information, and wherein, loading command is for loading the order of commissioning device.
Tested termination is received command information, and generates loading command according to command information, to carry out the loading of commissioning device by loading command, finally makes commissioning device be enumerated.
Driver element 30 is for driving commissioning device to enumerate commissioning device according to loading command.
Tested end drives commissioning device according to loading command, thereby commissioning device can be enumerated, and test lead can operate the commissioning device enumerating.For example, after enumerating commissioning device, test lead can complete by commissioning device and capture log, obtain cellphone information and obtain the actions such as operation file, thus extremely analyzing tested end.
Pass through above-described embodiment, when tested end cannot be started shooting, as long as when test lead is connected with tested end, at test lead, can view the commissioning device that this tested end can be enumerated, can be by receiving the command information from test lead, indicate tested end to drive commissioning device, so that commissioning device is enumerated, thereby when tested end causes starting shooting because of fault, also can enumerate the commissioning device in tested end, and then by the commissioning device enumerating, the problem of tested end be carried out to analysis and solve.
Fig. 5 is the schematic diagram of enumerating device of commissioning device according to the preferred embodiment of the invention.As shown in the figure, the device of enumerating of this commissioning device comprises: receiving element 10, generation unit 20 and driver element 30, and wherein, the effect embodiment illustrated in fig. 4 of receiving element 10, generation unit 20 and acting on of driver element 30 is identical, repeat no more, generation unit 20 comprises:
Monitor module 201 and monitor command information for the kernel spacing of the operating system by tested end.
Kernel spacing in the operating system of tested end is monitored command information, by kernel spacing, detects the command information whether having from test lead.
Sending module 202 is for after kernel spacing listens to command information, and the user's space in operating system sends command information.
After kernel spacing listens to command information, to user's space, send command information.For example, in Android system, utilize netlink socket as the communication interface of user's space and kernel spacing, by netlink socket, to user's space, send command information.
Generation module 203 is for generating loading command by user's space according to command information, and wherein, user's space sends to kernel spacing by loading command.
User's space generates loading command according to command information, and user's space sends to kernel spacing by loading command.
By above-described embodiment, by kernel spacing, receive command information, and command information is sent to user's space, user's space generates loading command according to command information, and the loading command of generation is sent to kernel spacing, and by kernel spacing, drive commissioning device, commissioning device is enumerated.Because kernel spacing and user's space are used for respectively processing application program and the common applications of higher-rights, by kernel spacing, can receive the command information from test lead, and make user's space generate loading command, again the loading command of generation is sent to kernel spacing, thereby both guaranteed that tested end can receive command information in time, can also in the situation that guaranteeing tested end safety, enumerate commissioning device.
Further, driver element comprises: the first receiver module, and for receiving loading command by kernel spacing.Driver module, for driving commissioning device by kernel spacing according to loading command, wherein, after driving commissioning device, tested end is enumerated commissioning device.
After kernel spacing receives the loading command from user's space, according to loading command, drive commissioning device, after commissioning device is driven, tested end is enumerated this commissioning device.Commissioning device for example, at kernel spacing, according to loading command, drives commissioning device, so that can be enumerated.
Preferably, for the ease of enumerating commissioning device, receiving element comprises: link block, and for passing through USB connecting test end and tested end.Detection module, for detection of whether there being USB device in tested end.The second receiver module, for when tested end being detected and there is USB device, receive predetermined instruction information, wherein, the form of predetermined instruction information is the form of the communication protocol between test lead and tested end, the instruction that predetermined instruction information is enumerated USB device for the tested end of indication.
After by USB connecting test end and tested end, can enumerate commissioning device by following two kinds of modes.
Mode one:
When tested end cannot be started shooting, if detected in tested end, there is USB device, receive predetermined instruction information and comprise: whether the USB device that judgement detects is mass storage.If the USB device detecting is mass storage, receive the scsi command from test lead, wherein, scsi command is used to indicate tested end and enumerates USB device.
Mass storage is mass storage equipment, after test lead is connected by USB with tested end, if after having USB device in definite tested end, judge whether this USB device is mass storage, and receives the scsi command from test lead.Wherein, in order to make tested end can identify command information, the command format of this scsi command is identical with the command format of conventional SCSI, but the content of order is different from existing scsi command, the form of scsi command of enumerating USB device due to tested end is identical with existing scsi command, and content is different from existing scsi command, can avoid scsi command and other scsi commands that this tested termination is received to distinguish, in order to avoid it is abnormal to cause MassStorage function to occur.
Mode two:
When tested end cannot be started shooting, and when this tested end can not be enumerated mass storage, just can not utilize mode one to carry out having enumerated of commissioning device, so, if detected in tested end, there is USB device, receive predetermined instruction information and comprise: whether the USB device that judgement detects is that media delivery equipment or telecommunication network drive interface equipment.And if the USB device detecting is that media delivery equipment or telecommunication network drive interface equipment, receive the USB request bag sending by index order, wherein, USB request bag is used to indicate tested end and enumerates USB device.
When the equipment of being responsible for carrying out carrying out between computer and terminal file operation in detected end is not mass storage, by test side, detects these files that carry out file operation and enumerate USB device.For example, be responsible for carrying out computer and interrupt between carry out file operation equipment be that media delivery equipment or telecommunication network drive interface equipment.Wherein, media delivery equipment is MTP, and it is rndis that telecommunication network drives interface equipment, when the USB device that judgement monitors is MTP, rndis or any USB device, the USB request bag that reception sends by index order, wherein, this USB request bag is used to refer to tested end and enumerates USB device.Wherein, index order is the USB request order in computer.
In the above-described embodiments, tested end drives commissioning device by receiving command information, thereby makes the commissioning device can be at tested end during the state in being not activated, and also can enumerate commissioning device.Thereby solved in prior art when terminal can not start, cannot enumerate the problem of the commissioning device in terminal, and then reached when terminal can not start, also can enumerate the commissioning device in terminal, recycling commissioning device continues debugging and case study to terminal.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.
Claims (12)
1. an enumeration methodology for commissioning device, is characterized in that, comprising:
When test lead is connected with tested end, described tested termination is received the command information from described test lead, and wherein, described command information is for indicating described tested end to enumerate the information of commissioning device in described tested end;
Described tested end generates loading command according to described command information, and wherein, described loading command is for loading the order of described commissioning device; And
Described tested end drives described commissioning device to enumerate described commissioning device according to described loading command.
2. enumeration methodology according to claim 1, is characterized in that, described tested end generates loading command according to described command information and comprises:
Kernel spacing in the operating system of described tested end is monitored described command information;
After described kernel spacing listens to described command information, the user's space in described operating system sends described command information; And
Described user's space generates described loading command according to described command information, and wherein, described user's space sends to described kernel spacing by described loading command.
3. enumeration methodology according to claim 2, is characterized in that, described tested end drives described commissioning device to comprise to enumerate described commissioning device according to described loading command:
Described kernel spacing receives described loading command;
Described kernel spacing drives described commissioning device according to described loading command, and wherein, after driving described commissioning device, described tested end is enumerated described commissioning device.
4. enumeration methodology according to claim 1, is characterized in that, when test lead is connected with tested end, the command information that described tested termination is received from described test lead comprises:
By USB, connect described test lead and described tested end;
Detect in described tested end and whether have USB device;
If detect in described tested end and there is USB device, receive predetermined instruction information, wherein, the form of described predetermined instruction information is the form of the communication protocol between described test lead and described tested end, the instruction that described predetermined instruction information is enumerated described USB device for the described tested end of indication.
5. enumeration methodology according to claim 4, is characterized in that, if detected in described tested end, has USB device, receives predetermined instruction information and comprises:
Whether the USB device that judgement detects is mass storage; And
If the USB device detecting is described mass storage, receive the scsi command from described test lead, wherein, described scsi command is used to indicate described tested end and enumerates described USB device.
6. enumeration methodology according to claim 4, is characterized in that, if detected in described tested end, has USB device, receives predetermined instruction information and comprises:
The USB request bag that reception sends by index order, wherein, described USB request bag is used to indicate described tested end and enumerates described USB device.
7. enumeration methodology according to claim 1, is characterized in that, the command information that described tested termination is received from described test lead comprises:
Described tested end detects keyboard-coding information, predetermined action information or predetermined image information; And
After described keyboard-coding information, described predetermined action information or described predetermined image information being detected, resolved detection to the command information that carries of information.
8. enumeration methodology according to claim 1, is characterized in that, the command information that described tested termination is received from described test lead comprises:
Described tested end receives the described command information from described test lead by the mode of radio channel.
Commissioning device enumerate a device, it is characterized in that, comprising:
Receiving element, for when test lead is connected with tested end, receives the command information from described test lead, and wherein, described command information is for indicating described tested end to enumerate the information of commissioning device in described tested end;
Generation unit, for generating loading command according to described command information, wherein, described loading command is for loading the order of described commissioning device; And
Driver element, for driving described commissioning device to enumerate described commissioning device according to described loading command.
10. the device of enumerating according to claim 9, is characterized in that, described generation unit comprises:
Monitor module, for the kernel spacing of the operating system by described tested end, monitor described command information;
Sending module, for after described kernel spacing listens to described command information, the user's space in described operating system sends described command information; And
Generation module, for generating described loading command by described user's space according to described command information, wherein, described user's space sends to described kernel spacing by described loading command.
11. devices of enumerating according to claim 10, is characterized in that, described driver element comprises:
The first receiver module, for receiving described loading command by described kernel spacing;
Driver module, for driving described commissioning device by described kernel spacing according to described loading command, wherein, after driving described commissioning device, described tested end is enumerated described commissioning device.
12. devices of enumerating according to claim 9, is characterized in that, described receiving element comprises:
Link block, for connecting described test lead and described tested end by USB;
Detection module, for detection of whether having USB device in described tested end;
The second receiver module, for when described tested end being detected and there is USB device, receive predetermined instruction information, wherein, the form of described predetermined instruction information is the form of the communication protocol between described test lead and described tested end, the instruction that described predetermined instruction information is enumerated described USB device for the described tested end of indication.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410320120.XA CN104079453B (en) | 2014-07-07 | 2014-07-07 | The enumeration methodology and device of commissioning device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410320120.XA CN104079453B (en) | 2014-07-07 | 2014-07-07 | The enumeration methodology and device of commissioning device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104079453A true CN104079453A (en) | 2014-10-01 |
CN104079453B CN104079453B (en) | 2018-05-18 |
Family
ID=51600508
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410320120.XA Expired - Fee Related CN104079453B (en) | 2014-07-07 | 2014-07-07 | The enumeration methodology and device of commissioning device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104079453B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104991846A (en) * | 2015-07-01 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | Working mode switching system and method for mobile terminal |
WO2019061343A1 (en) * | 2017-09-29 | 2019-04-04 | 深圳传音通讯有限公司 | Method and apparatus for detecting device of smart terminal |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102131308A (en) * | 2010-01-18 | 2011-07-20 | 盛大计算机(上海)有限公司 | Method for operating Android mobile phone file system at PC (Personal Computer) terminal |
CN102662924A (en) * | 2012-03-14 | 2012-09-12 | 福州瑞芯微电子有限公司 | Method for solving incompatibility problem in character set transmission from PC to Android system based on hybrid coding |
CN103246586B (en) * | 2013-04-19 | 2014-12-10 | 福州瑞芯微电子有限公司 | Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform |
CN103559126B (en) * | 2013-10-25 | 2016-08-24 | 深圳市欧珀通信软件有限公司 | A kind of test the method for software version, device and computer terminal |
-
2014
- 2014-07-07 CN CN201410320120.XA patent/CN104079453B/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104991846A (en) * | 2015-07-01 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | Working mode switching system and method for mobile terminal |
CN104991846B (en) * | 2015-07-01 | 2018-03-02 | 上海斐讯数据通信技术有限公司 | The switching system and method for a kind of working mode of mobile terminal |
WO2019061343A1 (en) * | 2017-09-29 | 2019-04-04 | 深圳传音通讯有限公司 | Method and apparatus for detecting device of smart terminal |
Also Published As
Publication number | Publication date |
---|---|
CN104079453B (en) | 2018-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103246586B (en) | Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform | |
CN108364670B (en) | Read-write pressure testing method, device, equipment and storage medium | |
CN104021060A (en) | BMC serial port debugging system and method | |
CN108170494B (en) | Application program starting method and starting system for intelligent terminal | |
KR100985749B1 (en) | Automatic-testing system and method for embedded system software and test scenario composing method | |
CN110188013A (en) | A kind of log read-write capability test method, device and electronic equipment and storage medium | |
CN107643903B (en) | Method and device for automatically entering BIOS configuration interface by server | |
CN103092648B (en) | A kind of image upgrade method, system and subscriber equipment and personal computer | |
CN114090360B (en) | Server debugging device, method and medium thereof, and server debugger | |
CN110289039A (en) | A kind of adjustment method and device of eMMC | |
CN104079453A (en) | Enumeration method and device for debugging equipment | |
CN107122305B (en) | Software testing device and method | |
CN104750537A (en) | Test case execution method and device | |
US20090216517A1 (en) | Dedicated simulator for testing a usb host solution | |
CN117193125A (en) | Processing system and method for fault data of vehicle-mounted display screen, electronic equipment and medium | |
CN104914764A (en) | Remote experiment system | |
CN116110214A (en) | Remote controller testing method and system and electronic equipment thereof | |
CN112148537A (en) | Bus monitoring device and method, storage medium, and electronic device | |
CN109558324A (en) | A kind of detection method and equipment | |
CN103870368A (en) | SAS (Serial Attached SCSI (small computer system interface)) expander testing system and method | |
WO2016119258A1 (en) | Bluetooth module, system and method for monitoring running state information of industrial control board | |
CN108664366B (en) | Data transmission method and device and server | |
TWI641247B (en) | Method for processing messages | |
CN115292108A (en) | Portable device for communication module test and communication module test method | |
CN104823174A (en) | Re-enumeration of USB 3.0 compatible devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180518 Termination date: 20210707 |
|
CF01 | Termination of patent right due to non-payment of annual fee |