CN105573883B - Apparatus control method and device - Google Patents
Apparatus control method and device Download PDFInfo
- Publication number
- CN105573883B CN105573883B CN201510920432.9A CN201510920432A CN105573883B CN 105573883 B CN105573883 B CN 105573883B CN 201510920432 A CN201510920432 A CN 201510920432A CN 105573883 B CN105573883 B CN 105573883B
- Authority
- CN
- China
- Prior art keywords
- server
- terminal
- device identification
- communication connection
- node information
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
- G06F11/267—Reconfiguring circuits for testing, e.g. LSSD, partitioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
- G06F11/273—Tester hardware, i.e. output processing circuits
- G06F11/2736—Tester hardware, i.e. output processing circuits using a dedicated service processor for test
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
- Debugging And Monitoring (AREA)
Abstract
The disclosure is directed to a kind of apparatus control method and device, its method includes:When monitoring between terminal and server in exceptional communication connection, the device identification of the terminal is obtained;The device node information being mapped in advance according to the device identification acquisition terminal on the server;According to the device node information, the proper communication connection between the terminal and the server is activated.So manufacturer to USB device using server when carrying out batch testing, when occurring exceptional communication connection between USB device and server, proper communication connection therebetween can quickly be re-established, avoid interrupting the test to USB device caused by connecting extremely, and then avoid influenceing being normally carried out for the mass test of USB device.
Description
Technical field
This disclosure relates to field of computer technology, more particularly to a kind of apparatus control method and device.
Background technology
It is the mobile terminal of representative by user's extensive use using mobile phone with the continuous development of technology.In order to meet mobile phone
Performance requirement, equipment vendors, which need to treat the mobile phone that dispatches from the factory, to be tested.In mass test process is carried out to mobile phone, quilt
Surveying mobile phone is needed to connect by data wire and server foundation with server, and automatic test script, and handle are run by server
The script is sent to each testing mobile phone and tested incessantly.
However, when server and tested mobile phone are chronically at connection status, it may appear that tested mobile phone disconnects with server
The phenomenon of connection.Because server is after the connection with tested mobile phone is disconnected, the tested mobile phone disconnected can not be connected automatically to,
Cause server can not continue the mobile phone that test is disconnected, influence being normally carried out for mobile phone mass test.
The content of the invention
To overcome problem present in correlation technique, the disclosure provides a kind of apparatus control method and device.
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of apparatus control method, including:
When monitoring between terminal and server in exceptional communication connection, the device identification of the terminal is obtained;
The device node information being mapped in advance according to the device identification acquisition terminal on the server;
According to the device node information, the proper communication connection between the terminal and the server is activated.
Connected by re-establishing the proper communication between the USB device and server.So manufacturer is utilizing server
, can quickly again when occurring exceptional communication connection between USB device and server when carrying out batch testing to USB device
Proper communication connection therebetween is established, avoids interrupting the test to USB device caused by connecting extremely, and then avoid influenceing
The mass test of USB device is normally carried out.
Alternatively, wire communication is established by general-purpose serial bus USB between the terminal and the server to connect.
Alternatively, the device identification for obtaining the terminal, including:
Utilize the port numbers for debugging USB of the bridge ADB detections in exceptional communication connection status;
Obtain the device identification corresponding with the port numbers.
Because each USB interface connects a mobile phone, therefore, by obtaining the USB for being in exceptional communication with mobile phone and being connected
The port numbers of interface, device identification corresponding with the port numbers can be obtained, it is known that be that mobile phone 200 and server 100
Divided by exceptional communication connection.
Alternatively, the equipment section being mapped in advance according to the device identification acquisition terminal on the server
Point information, including:
The command-line tool lsusb carried using system on the server, is checked and is mapped in advance on the server
All devices mark;
The device identification of the terminal is matched with all devices mark, determines that the device identification of the terminal exists
Corresponding device node information on the server.
When communication connection between mobile phone and server is in abnormality, then server can get and service
Device is in the device identification of the mobile phone of exceptional communication connection, and then can be searched in device identification table relative with the device identification
The device node information answered.
Alternatively, the proper communication activated between the terminal and the server connects, including:
The USB interface being connected to using the equipment control function IOCTL replacements terminal on the server;
The proper communication connection established between the terminal and the server.
The I/O passages in equipment control function IOCTL management servers can be utilized, mobile phone is reset and is connected on server
It is USB interface so that server can detect the mobile phone again, so that it may re-establish between mobile phone 200 and server 100
Proper communication connects.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of plant control unit, including:
Device identification acquisition module, for when monitoring between terminal and server in exceptional communication connection, obtaining
The device identification of the terminal;
Device node data obtaining module, the clothes are mapped in advance for obtaining the terminal according to the device identification
The device node information being engaged on device;
Active module, for according to the device node information, activating normal between the terminal and the server
Communication connection.
Alternatively, wire communication is established by general-purpose serial bus USB between the terminal and the server to connect.
Alternatively, the device identification acquisition module, including:
Port numbers detection sub-module, for utilizing the port for debugging USB of the bridge ADB detections in exceptional communication connection status
Number;
Device identification acquisition submodule, for obtaining the device identification corresponding with the port numbers.
Alternatively, the device node data obtaining module, including:
Submodule is checked in device identification, for the command-line tool lsusb carried using system on the server, is checked
The all devices mark being mapped in advance on the server;
Device node information determination sub-module, for by the device identification of the terminal and all devices mark
Match somebody with somebody, determine the device identification of the terminal corresponding device node information on the server.
Alternatively, the active module, including:
Interface resets submodule, and the server is connected to for resetting the terminal using equipment control function IOCTL
On USB interface;
Setting up submodule is communicated to connect, for establishing the connection of the proper communication between the terminal and the server.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of server, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
When monitoring between terminal and server in exceptional communication connection, the device identification of the terminal is obtained;
The device node information being mapped in advance according to the device identification acquisition terminal on the server;
According to the device node information, the proper communication connection between the terminal and the server is activated.
The technical scheme provided by this disclosed embodiment can include the following benefits:
The apparatus control method and device that the disclosure provides, it is in different monitoring to be connected to the USB device on server
Device identification that can be according to the USB device during normal communication connection status and corresponding device node information, re-establish this
Proper communication connection between USB device and server.So manufacturer is carrying out batch testing using server to USB device
When, when occurring exceptional communication connection between USB device and server, it can quickly re-establish proper communication therebetween
Connection, avoid interrupting the test to USB device caused by connecting extremely, and then avoid influenceing the mass test of USB device
It is normally carried out.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not
The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the present invention
Example, and for explaining principle of the invention together with specification.
Fig. 1 is a kind of application scenarios schematic diagram according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of apparatus control method according to an exemplary embodiment;
Fig. 3 is the flow chart of step S210 in Fig. 2;
Fig. 4 is the flow chart of step S220 in Fig. 2;
Fig. 5 is the flow chart of step S230 in Fig. 2;
Fig. 6 is a kind of schematic diagram of plant control unit according to an exemplary embodiment;
Fig. 7 is the schematic diagram of device identification acquisition module in Fig. 6;
Fig. 8 is the schematic diagram of device node data obtaining module in Fig. 6;
Fig. 9 is the schematic diagram of active module in Fig. 6;
Figure 10 is a kind of structural representation of server according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appended
The example of the consistent apparatus and method of some aspects being described in detail in claims, of the invention.
Fig. 1 is the application scenarios schematic diagram that the disclosure provides according to an embodiment.As shown in figure 1, many times it is required for
When testing mobile phone 200, it whether there is some problems to detect mobile phone 200.For example, before mobile phone 200 dispatches from the factory, typically
It is required for testing mobile phone 200.
When testing mobile phone 200, it is necessary to which batch is connected into server 100 by data wire by mobile phone 200
On USB (Universal Serial Bus, USB) interface on, then mobile phone 200 is entered on server 100
Row test.However, when server 100 is in long-time connection status with tested mobile phone 200, it may appear that some tested hands
Machine 200 and the situation of the communication disruption of server 100, and interrupt once occurring, server 100 can not just continue to enter mobile phone 200
Row test, at this moment generally requires and takes artificial mode to plug the data wire that tested mobile phone 200 is connected with server 100 again,
The proper communication between the tested mobile phone 200 of interruption and server 100 can be just re-established, and then is continued to being tested mobile phone
200 are tested.
Therefore, in batch carries out test process to mobile phone 200, once some mobile phones 200 therein and server 100
Disconnect communication connection, it is necessary to expend substantial amounts of human cost and go to investigate, then will be switched off the mobile phone 200 of connection by inserting again
The mode pulled out is attached with server 100 again so that the efficiency of test job becomes very low, and is often servicing
The damage that plug is likely to result in USB interface is carried out on device 100.
In order to solve the above-mentioned technical problem, the embodiment of the present disclosure provide firstly a kind of apparatus control method, such as Fig. 2 institutes
Show, this method may include steps of:
In step S210, when monitoring between terminal and server in exceptional communication connection, setting for terminal is obtained
Standby mark.
With reference to above-described embodiment in Fig. 1, illustrated by mobile phone 200 of terminal, the connection of exceptional communication here, can be with
It is logical between mobile phone 200 and server 100 although referring to that mobile phone 200 is still connected on server 100 by data wire
Believe already off, mobile phone 200 can not be communicated by data wire with server 100.
In the embodiment that the disclosure provides, illustrated by taking server test Android mobile phone as an example, Google can be passed through
Command-line tool ADB (Android Debug Bridge, Android debugging bridge) each mobile phones 200 of monitoring of company's exploitation and service
The connection status of device 100, once exception occurs for the communication connection of certain mobile phone 200 and server 100, it can be monitored by ADB.
When mobile phone 200 normally communicates with server 100, server 100 can get the equipment mark of mobile phone 200
Know, for server 100, the mobile phone 200 being connected on server 100 equivalent to the USB device being mapped on server 100,
When mobile phone 200 is mapped in server 100 simultaneously, server 100 can be generated corresponding to 200 1 device node information of mobile phone, should
Device node information corresponds to the device identification of mobile phone 200.
In step S220, the terminal device node information of mapping on the server in advance is obtained according to device identification.
Once the communication connection status of a certain mobile phone 200 and server 100 occurs abnormal, then ADB can identify this
The device identification of mobile phone 200, the device identification can be the sequence numbers of mobile phone 200, and such as International identification code can be with unique identification
The identity of mobile phone 200., can be with after ADB gets the device identification for the mobile phone 200 being connected with the exceptional communication of server 100
The device node information of corresponding advance mapping on the server is obtained according to the device identification.
In step S230, according to device node information, the proper communication connection between activated terminals and server.
It is in the mobile phone 200 that exceptional communication is connected getting with server 100 and is mapped in setting on server 100 in advance
After slave node information, the can of server 100 is reset between the mobile phone 200 and server 100 according to the device node information
Communication connection, reach Activate Phone between 200 and server 100 proper communication connection purpose.It can so avoid also
Need by artificial mode.
Connected in addition, establishing wire communication by USB between mobile phone 200 and server 100.
The apparatus control method that the disclosure provides, exceptional communication is in monitoring to be connected to the USB device on server
Device identification that can be according to the USB device during connection status and corresponding device node information, re-establish the USB device
Proper communication between server is connected.So manufacturer to USB device using server when carrying out batch testing, in USB
When occurring exceptional communication connection between equipment and server, proper communication connection therebetween can be quickly re-established, is kept away
Exempt to interrupt the test to USB device caused by connecting extremely, and then avoid influenceing normally entering for the mass test of USB device
OK.
In another embodiment of the present disclosure, as the refinement of Fig. 2 methods, as shown in figure 3, step S210 can include:
In step S211, the port numbers for debugging USB of the bridge ADB detections in exceptional communication connection status are utilized.
With reference to Fig. 1, multiple USB interfaces can be provided with server 100, each USB interface corresponds to a port
Number.Server 100 can be in exceptional communication connection status by which USB on ADB detection services device 100 and mobile phone 200,
When having detected that USB interface is in exceptional communication connection status with mobile phone 200, server 100 can get this using ADB
The port numbers of USB interface.
In step S212, the device identification corresponding with port numbers is obtained.
Because each USB interface connects a mobile phone 200, therefore, exceptional communication is in mobile phone 200 by acquisition and is connected
USB interface port numbers, device identification corresponding with the port numbers can be obtained, it is known that be that mobile phone 200 and service
Device 100 divided by exceptional communication connection.
In another embodiment of the present disclosure, as the refinement of Fig. 2 methods, as shown in figure 4, step S220 can be included such as
Lower flow:
In step S221, the command-line tool lsusb that is carried using system on server is checked and is mapped in service in advance
All devices mark on device.
Because when mobile phone 200 is connected to server 100 and establishes proper communication connection, each mobile phone 200 can be mapped to clothes
It is engaged in corresponding to a device identification on device 100.The command-line tool lsusb that system carries on server 100 can be utilized to check to reflect
The all devices mark penetrated on server 100.Exemplary, server 100 can have these device identifications equipment mark
Know in table, in the device identification table, corresponding one be mapped on server 100 of device identification of each mobile phone 200
Device node information, server is facilitated to search the device node letter corresponding with device identification in the device identification table at any time
Breath.
In step S222, the device identification of terminal is matched with all devices mark, determines the device identification of terminal
Corresponding device node information on the server.
When communication connection between mobile phone 200 and server 100 is in abnormality, then server 100 can obtain
The device identification that the mobile phone 200 that exceptional communication is connected is in server 100 is got, and then can be searched in device identification table
The device node information corresponding with the device identification.
In another embodiment of the present disclosure, as the refinement of Fig. 2 methods, as shown in figure 5, step S230 can also include
Following flow:
In step S231, reset terminal using equipment control function IOCTL and be connected to USB interface on server.
Equipment control function IOCTL is to I/O (input/output, the input/output terminal of equipment in device driver
Mouthful) function that is managed of passage.It is so-called that I/O passages are managed, exactly some characteristics of equipment are controlled, such as
The Transmission bit rate of serial ports, rotating speed of motor etc..Its number of parameters is as follows:int ioctl(int fd,int
cmd,…);Wherein fd is exactly that user program opens the file indications returned during equipment using open functions, and cmd is exactly user
For program to the control command of equipment, to ellipsis later, that is some supplementary parameters, general most one, is with or without
It is related to cmd meaning.Ioctl functions are an attribute components in file structure, that is if your driving journey
Sequence provides the support to ioctl, and user can just use the I/O passages of ioctl function control devices in user program.
Therefore, the I/O passages in equipment control function IOCTL management servers can be utilized, mobile phone 200 is reset and is connected to
It is USB interface on server 100 so that server 100 can detect the mobile phone 200 again.
In step S232, the proper communication established between terminal and server connects.
By above-mentioned steps, after server 100 detects mobile phone 200, so that it may re-establish mobile phone 200 and server
Proper communication connection between 100.
The apparatus control method that the disclosure provides, exceptional communication is in monitoring to be connected to the USB device on server
Device identification that can be according to the USB device during connection status and corresponding device node information, re-establish the USB device
Proper communication between server is connected.So manufacturer to USB device using server when carrying out batch testing, in USB
When occurring exceptional communication connection between equipment and server, proper communication connection therebetween can be quickly re-established, is kept away
Exempt to interrupt the test to USB device caused by connecting extremely, and then avoid influenceing normally entering for the mass test of USB device
OK.
Furthermore it is possible to operated by using the related tool on server according to above-described embodiment, such as:ADB、
Lsusb and equipment control function IOCTL etc. are handled.
The description of embodiment of the method more than, it is apparent to those skilled in the art that the disclosure can
Realized by the mode of software plus required general hardware platform, naturally it is also possible to by hardware, but in many cases the former
It is more preferably embodiment.Based on such understanding, the technical scheme of the disclosure substantially makes tribute to prior art in other words
The part offered can be embodied in the form of software product, and the computer software product is stored in a storage medium, bag
Some instructions are included to so that a computer equipment (can be personal computer, server, or network equipment etc.) performs
The all or part of step of each embodiment methods described of the disclosure.And foregoing storage medium includes:Read-only storage
(ROM), random access memory (RAM), magnetic disc or CD etc. are various can be with the medium of store program codes.
In addition, as the realization to the various embodiments described above, the embodiment of the present disclosure additionally provides a kind of plant control unit, should
Device is located in server, as shown in fig. 6, the device includes:Device identification acquisition module 10, device node data obtaining module
20 and active module 30, wherein,
Device identification acquisition module 10 is configured as when monitoring between terminal and server in exceptional communication connection,
Obtain the device identification of the terminal;
With reference to above-described embodiment in Fig. 1, illustrated by mobile phone 200 of terminal, the connection of exceptional communication here, can be with
It is logical between mobile phone 200 and server 100 although referring to that mobile phone 200 is still connected on server 100 by data wire
Believe already off, mobile phone 200 can not be communicated by data wire with server 100.
When mobile phone 200 normally communicates with server 100, server 100 can get the equipment mark of mobile phone 200
Know, for server 100, the mobile phone 200 being connected on server 100 equivalent to the USB device being mapped on server 100,
When mobile phone 200 is mapped in server 100 simultaneously, server 100 can be generated corresponding to 200 1 device node information of mobile phone, should
Device node information corresponds to the device identification of mobile phone 200.
Device node data obtaining module 20 is configured as being mapped in advance according to the device identification acquisition terminal
Device node information on the server;
Once the communication connection status of a certain mobile phone 200 and server 100 occurs abnormal, then ADB can identify this
The device identification of mobile phone 200, the device identification can be the sequence numbers of mobile phone 200, and such as International identification code can be with unique identification
The identity of mobile phone 200., can be with after ADB gets the device identification for the mobile phone 200 being connected with the exceptional communication of server 100
The device node information of corresponding advance mapping on the server is obtained according to the device identification.
Active module 30 is configured as, according to the device node information, activating between the terminal and the server
Proper communication connects.
It is in the mobile phone 200 that exceptional communication is connected getting with server 100 and is mapped in setting on server 100 in advance
After slave node information, the can of server 100 is reset between the mobile phone 200 and server 100 according to the device node information
Communication connection, reach Activate Phone between 200 and server 100 proper communication connection purpose.It can so avoid also
Need by artificial mode.
Wherein, wire communication is established by general-purpose serial bus USB between the terminal and the server to connect.
The plant control unit that the disclosure provides, exceptional communication is in monitoring to be connected to the USB device on server
Device identification that can be according to the USB device during connection status and corresponding device node information, re-establish the USB device
Proper communication between server is connected.So manufacturer to USB device using server when carrying out batch testing, in USB
When occurring exceptional communication connection between equipment and server, proper communication connection therebetween can be quickly re-established, is kept away
Exempt to interrupt the test to USB device caused by connecting extremely, and then avoid influenceing normally entering for the mass test of USB device
OK.
In the another embodiment of the disclosure, based on Fig. 6, as shown in fig. 7, the device identification acquisition module 10, including:End
Slogan detection sub-module 11 and device identification acquisition submodule 12, wherein,
Port numbers detection sub-module 11 is configured to, with debugging USB of the bridge ADB detections in exceptional communication connection status
Port numbers;
With reference to Fig. 1, multiple USB interfaces can be provided with server 100, each USB interface corresponds to a port
Number.Server 100 can be in exceptional communication connection status by which USB on ADB detection services device 100 and mobile phone 200,
When having detected that USB interface is in exceptional communication connection status with mobile phone 200, server 100 can get this using ADB
The port numbers of USB interface.
Device identification acquisition submodule 12 is configured as obtaining the device identification corresponding with the port numbers.
Because each USB interface connects a mobile phone 200, therefore, exceptional communication is in mobile phone 200 by acquisition and is connected
USB interface port numbers, device identification corresponding with the port numbers can be obtained, it is known that be that mobile phone 200 and service
Device 100 divided by exceptional communication connection.
In the another embodiment of the disclosure, based on Fig. 6, as shown in figure 8, the device node data obtaining module 20, bag
Include:Submodule 21 and device node information determination sub-module 22 are checked in device identification, wherein,
Device identification checks that submodule 21 is configured to, with the command-line tool that system carries on the server
Lsusb, check all devices mark being mapped in advance on the server;
Because when mobile phone 200 is connected to server 100 and establishes proper communication connection, each mobile phone 200 can be mapped to clothes
It is engaged in corresponding to a device identification on device 100.The command-line tool lsusb that system carries on server 100 can be utilized to check to reflect
The all devices mark penetrated on server 100.Exemplary, server 100 can have these device identifications equipment mark
Know in table, in the device identification table, corresponding one be mapped on server 100 of device identification of each mobile phone 200
Device node information, server is facilitated to search the device node letter corresponding with device identification in the device identification table at any time
Breath.
Device node information determination sub-module 22 is configured as the device identification of the terminal and all devices mark
Know matching, determine the device identification of the terminal corresponding device node information on the server.
When communication connection between mobile phone 200 and server 100 is in abnormality, then server 100 can obtain
The device identification that the mobile phone 200 that exceptional communication is connected is in server 100 is got, and then can be searched in device identification table
The device node information corresponding with the device identification.
In the another embodiment of the disclosure, based on Fig. 6, as shown in figure 9, the active module 30, including:Interface resets son
Module 31 and communication connection setting up submodule 32, wherein,
Interface replacement submodule 31 is configured to, with the equipment control function IOCTL replacements terminal and is connected to the clothes
The USB interface being engaged on device;
Equipment control function IOCTL is to I/O (input/output, the input/output terminal of equipment in device driver
Mouthful) function that is managed of passage.It is so-called that I/O passages are managed, exactly some characteristics of equipment are controlled, such as
The Transmission bit rate of serial ports, rotating speed of motor etc..Its number of parameters is as follows:int ioctl(int fd,int
cmd,…);Wherein fd is exactly that user program opens the file indications returned during equipment using open functions, and cmd is exactly user
For program to the control command of equipment, to ellipsis later, that is some supplementary parameters, general most one, is with or without
It is related to cmd meaning.Ioctl functions are an attribute components in file structure, that is if your driving journey
Sequence provides the support to ioctl, and user can just use the I/O passages of ioctl function control devices in user program.
Therefore, the I/O passages in equipment control function IOCTL management servers can be utilized, mobile phone 200 is reset and is connected to
It is USB interface on server 100 so that server 100 can detect the mobile phone 200 again.
The proper communication that communication connection setting up submodule 32 is configured as establishing between the terminal and the server connects
Connect.
By above-mentioned steps, after server 100 detects mobile phone 200, so that it may re-establish mobile phone 200 and server
Proper communication connection between 100.
The plant control unit that the disclosure provides, exceptional communication is in monitoring to be connected to the USB device on server
Device identification that can be according to the USB device during connection status and corresponding device node information, re-establish the USB device
Proper communication between server is connected.So manufacturer to USB device using server when carrying out batch testing, in USB
When occurring exceptional communication connection between equipment and server, proper communication connection therebetween can be quickly re-established, is kept away
Exempt to interrupt the test to USB device caused by connecting extremely, and then avoid influenceing normally entering for the mass test of USB device
OK.
Furthermore it is possible to operated by using the related tool on server according to above-described embodiment, such as:ADB、
Lsusb and equipment control function IOCTL etc. are handled.
Figure 10 is a kind of structural representation of device 1000 for equipment control according to an exemplary embodiment.
For example, device 1000 may be provided in a server.Reference picture 10, device 1000 include processing component 1022, and its is further
, can be by processing component for storing including one or more processors, and as the memory resource representated by memory 1032
The instruction of 1022 execution, such as application program.The application program stored in memory 1032 can include one or one with
On each correspond to the module of one group of instruction.
Device 1000 can also include a power supply module 1026 and be configured as the power management of performs device 1000, one
Wired or wireless network interface 1050 is configured as device 1000 being connected to network, and input and output (I/O) interface
1058.Device 1000 can be operated based on the operating system for being stored in memory 1032, such as Windows ServerTM, Mac
OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processor of server
During execution so that server is able to carry out a kind of apparatus control method, and methods described includes:
When monitoring between terminal and server in exceptional communication connection, the device identification of the terminal is obtained;
The device node information being mapped in advance according to the device identification acquisition terminal on the server;
According to the device node information, the proper communication connection between the terminal and the server is activated.
It is understood that the present invention can be used in numerous general or special purpose computing system environments or configuration.Such as:It is individual
People's computer, server computer, handheld device or portable set, laptop device, multicomputer system, based on microprocessor
The system of device, set top box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer including to take up an official post
DCE of what system or equipment etc..
The disclosure can be described in the general context of computer executable instructions, such as program
Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type
Part, data structure etc..The present invention can also be put into practice in a distributed computing environment, in these DCEs, by
Task is performed and connected remote processing devices by communication network.In a distributed computing environment, program module can be with
In the local and remote computer-readable storage medium including storage device.
It should be noted that herein, the relational terms of such as " first " and " second " or the like are used merely to one
Individual entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operate it
Between any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Cover including for nonexcludability, so that process, method, article or equipment including a series of elements not only include those
Key element, but also the other element including being not expressly set out, or also include for this process, method, article or set
Standby intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Other identical element in the process including the key element, method, article or equipment also be present.
Those skilled in the art will readily occur to the present invention its after considering specification and putting into practice invention disclosed herein
Its embodiment.The application be intended to the present invention any modification, purposes or adaptations, these modifications, purposes or
Person's adaptations follow the general principle of the present invention and including the undocumented common knowledges in the art of the disclosure
Or conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be appreciated that the invention is not limited in the precision architecture for being described above and being shown in the drawings, and
And various modifications and changes can be being carried out without departing from the scope.The scope of the present invention is only limited by appended claim.
Claims (11)
- A kind of 1. apparatus control method, it is characterised in that including:When monitoring between terminal and server in exceptional communication connection, the device identification of the terminal is obtained;The device node information being mapped in advance according to the device identification acquisition terminal on the server;According to the device node information, the proper communication connection between the terminal and the server is activated.
- 2. apparatus control method according to claim 1, it is characterised in that pass through between the terminal and the server General-purpose serial bus USB establishes wire communication connection.
- 3. apparatus control method according to claim 1 or 2, it is characterised in that the equipment mark for obtaining the terminal Know, including:Utilize the port numbers for debugging USB of the bridge ADB detections in exceptional communication connection status;Obtain the device identification corresponding with the port numbers.
- 4. apparatus control method according to claim 1 or 2, it is characterised in that described to be obtained according to the device identification The terminal is mapped in the device node information on the server in advance, including:The command-line tool lsusb carried using system on the server, check the institute being mapped in advance on the server There is device identification;The device identification of the terminal is matched with all devices mark, determines the device identification of the terminal described Corresponding device node information on server.
- 5. apparatus control method according to claim 1 or 2, it is characterised in that the activation terminal and the clothes Proper communication connection between business device, including:The USB interface being connected to using the equipment control function IOCTL replacements terminal on the server;The proper communication connection established between the terminal and the server.
- A kind of 6. plant control unit, it is characterised in that including:Device identification acquisition module, for when monitoring between terminal and server in exceptional communication connection, described in acquisition The device identification of terminal;Device node data obtaining module, the server is mapped in advance for obtaining the terminal according to the device identification On device node information;Active module, for according to the device node information, activating the proper communication between the terminal and the server Connection.
- 7. plant control unit according to claim 6, it is characterised in that pass through between the terminal and the server General-purpose serial bus USB establishes wire communication connection.
- 8. the plant control unit according to claim 6 or 7, it is characterised in that the device identification acquisition module, bag Include:Port numbers detection sub-module, for utilizing the port numbers for debugging USB of the bridge ADB detections in exceptional communication connection status;Device identification acquisition submodule, for obtaining the device identification corresponding with the port numbers.
- 9. the plant control unit according to claim 6 or 7, it is characterised in that the device node data obtaining module, Including:Submodule is checked in device identification, for the command-line tool lsusb carried using system on the server, is checked in advance The all devices mark being mapped on the server;Device node information determination sub-module, for the device identification of the terminal to be matched with all devices mark, really Make the device identification of the terminal corresponding device node information on the server.
- 10. the plant control unit according to claim 6 or 7, it is characterised in that the active module, including:Interface resets submodule, is connected to for resetting the terminal using equipment control function IOCTL on the server USB interface;Setting up submodule is communicated to connect, for establishing the connection of the proper communication between the terminal and the server.
- A kind of 11. server, it is characterised in that including:Processor;For storing the memory of processor-executable instruction;Wherein, the processor is configured as:When monitoring between terminal and server in exceptional communication connection, the device identification of the terminal is obtained;The device node information being mapped in advance according to the device identification acquisition terminal on the server;According to the device node information, the proper communication connection between the terminal and the server is activated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510920432.9A CN105573883B (en) | 2015-12-11 | 2015-12-11 | Apparatus control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510920432.9A CN105573883B (en) | 2015-12-11 | 2015-12-11 | Apparatus control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105573883A CN105573883A (en) | 2016-05-11 |
CN105573883B true CN105573883B (en) | 2018-02-06 |
Family
ID=55884049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510920432.9A Active CN105573883B (en) | 2015-12-11 | 2015-12-11 | Apparatus control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105573883B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112135297B (en) * | 2020-09-22 | 2024-05-07 | 平安科技(深圳)有限公司 | Communication method, center server, equipment and medium of Internet of things |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104331363A (en) * | 2014-10-17 | 2015-02-04 | 上海斐讯数据通信技术有限公司 | Automatic testing method for Android device |
CN104461897A (en) * | 2014-12-18 | 2015-03-25 | 网易(杭州)网络有限公司 | Application program test method and device |
CN104978248A (en) * | 2014-10-15 | 2015-10-14 | 武汉安天信息技术有限责任公司 | Method and system for remotely managing mobile terminal APP on basis of ADB |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2012347524B2 (en) * | 2011-12-07 | 2017-12-21 | 3M Innovative Properties Company | Synthetic granulating gauze for use with reduced-pressure treatment systems |
-
2015
- 2015-12-11 CN CN201510920432.9A patent/CN105573883B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978248A (en) * | 2014-10-15 | 2015-10-14 | 武汉安天信息技术有限责任公司 | Method and system for remotely managing mobile terminal APP on basis of ADB |
CN104331363A (en) * | 2014-10-17 | 2015-02-04 | 上海斐讯数据通信技术有限公司 | Automatic testing method for Android device |
CN104461897A (en) * | 2014-12-18 | 2015-03-25 | 网易(杭州)网络有限公司 | Application program test method and device |
Also Published As
Publication number | Publication date |
---|---|
CN105573883A (en) | 2016-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10296443B2 (en) | Automatically predicting faults that caused software failures using a Markov logic network | |
CN108845930B (en) | Interface operation test method and device, storage medium and electronic device | |
US8745590B2 (en) | Testing an application | |
CN110908909B (en) | Automatic test method, device, storage medium and equipment | |
US11762979B2 (en) | Management of login information affected by a data breach | |
CN104737134A (en) | System and method for operating system agnostic hardware validation | |
CN109901881B (en) | Plug-in loading method and device of application program, computer equipment and storage medium | |
CN104850499A (en) | Automatic test method and device for base band software | |
CN113157854B (en) | API sensitive data leakage detection method and system | |
JP2013254451A (en) | Monitoring device, monitoring method and monitoring program | |
CN110222510A (en) | A kind of leak detection method, device and computer system | |
CN111258913A (en) | Automatic algorithm testing method and device, computer system and readable storage medium | |
CN115827111A (en) | Method and device for adjusting server startup items, storage medium and electronic device | |
CN107368339B (en) | Container entrance program operation method, system, device and storage medium | |
CN105955838A (en) | System halt reason check method and device | |
CN113849356B (en) | Equipment testing method and device, electronic equipment and storage medium | |
CN105573883B (en) | Apparatus control method and device | |
CN111400167A (en) | Redfish service compliance verification method, device, equipment and medium | |
CN112118159B (en) | Network testing method, device, equipment and computer readable storage medium | |
CN112235300B (en) | Cloud virtual network vulnerability detection method, system, device and electronic equipment | |
CN107357562A (en) | A kind of information fill method, device and client | |
CN110880990A (en) | Configuration checking method and device for big data cluster component and computing equipment | |
CN105653412A (en) | Fingerprint device compatibility detection method and terminal | |
CN109376048A (en) | A kind of test method and equipment of touch screen | |
CN106708558B (en) | Method and device for closing application program |
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 |