CN108337739B - Method and device for establishing wireless debugging connection and data processing method - Google Patents

Method and device for establishing wireless debugging connection and data processing method Download PDF

Info

Publication number
CN108337739B
CN108337739B CN201810089433.7A CN201810089433A CN108337739B CN 108337739 B CN108337739 B CN 108337739B CN 201810089433 A CN201810089433 A CN 201810089433A CN 108337739 B CN108337739 B CN 108337739B
Authority
CN
China
Prior art keywords
target
identification information
database record
network address
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810089433.7A
Other languages
Chinese (zh)
Other versions
CN108337739A (en
Inventor
张恒健
吴健
张继洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sunmi Technology Group Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sunmi Technology Group Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN201810089433.7A priority Critical patent/CN108337739B/en
Publication of CN108337739A publication Critical patent/CN108337739A/en
Application granted granted Critical
Publication of CN108337739B publication Critical patent/CN108337739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and a device for establishing wireless debugging connection and a data processing method. Wherein, the method comprises the following steps: under the condition that target equipment is accessed to a wireless network, acquiring target identification information of the target equipment from a preset database record, wherein the database record comprises identification information of connected equipment; acquiring a target network address corresponding to the target identification information; and establishing wireless debugging connection with the target equipment through the target network address. The invention solves the technical problems of complex debugging process and poor flexibility caused by the fact that the related technology needs to rely on the USB to establish connection with the intelligent mobile terminal and debug the intelligent mobile terminal.

Description

Method and device for establishing wireless debugging connection and data processing method
Technical Field
The invention relates to the field of internet control, in particular to a method and a device for establishing wireless debugging connection and a data processing method.
Background
When debugging the smart mobile terminal, the smart mobile terminal needs to be connected to a Personal Computer (PC), and then a debugger debugs the smart mobile terminal through the PC. In the prior art, the connection between the intelligent mobile terminal and the PC mainly depends on a USB (Universal Serial Bus) to establish connection with the intelligent mobile terminal and debug the intelligent mobile terminal, so that the mobile terminal can be controlled.
However, this has the following problems: the limit of the number of the USB connectors of the PC and the limit of the length and the quality of the USB debugging line lead to the fact that a plurality of intelligent mobile terminals cannot be connected to one PC to work together, and meanwhile, the debugging working range is limited to work in the area within the range of the length of the USB debugging line, so that the debugging process is complex and the flexibility is poor.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for establishing wireless debugging connection and a data processing method, which are used for at least solving the technical problems of complex debugging process and poor flexibility caused by the fact that the related technology needs to establish connection with an intelligent mobile terminal by means of a USB and debug the intelligent mobile terminal.
According to an aspect of the embodiments of the present invention, there is provided a method for establishing a wireless debug connection, including: under the condition that target equipment is accessed to a wireless network, acquiring target identification information of the target equipment from a preset database record, wherein the database record comprises identification information of connected equipment; acquiring a target network address corresponding to the target identification information; and establishing wireless debugging connection with the target equipment through the target network address.
Optionally, before obtaining the target identification information of the target device from a preset database record, the method further includes: establishing the database record, including: establishing a connection with the target device; automatically reading the target identification information of the target device, or receiving the target identification information input by a user to generate the database record.
Optionally, the method further comprises: acquiring a first network address of the target equipment; judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; and if the first network address and the target equipment are in the same local area network, storing the first network address into the database record.
Optionally, the establishing a connection with the target device includes: and establishing a Universal Serial Bus (USB) connection or a Wi-Fi connection with the target equipment.
Optionally, before obtaining the target identification information of the target device from a preset database record, the method further includes: detecting whether the target device accesses a wireless network, including: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; and if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network.
Optionally, the obtaining of the target network address corresponding to the target identification information includes: and updating the database record according to the routing table to obtain the target network address.
Optionally, the database record further comprises a device name; the identification information of the device includes at least one of: physical address, hardware serial number.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for establishing a wireless debug connection, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring target identification information of target equipment from a preset database record under the condition that the target equipment is accessed to a wireless network, and the database record comprises the identification information of the connected equipment; the processing unit is used for acquiring a target network address corresponding to the target identification information; and the connection unit is used for establishing wireless debugging connection with the target equipment through the target network address.
Optionally, the apparatus for establishing a wireless debug connection further includes: a generating unit configured to establish the database record, wherein the generating unit includes: the connection module is used for establishing connection with the target equipment; a first obtaining module, configured to automatically read the target identification information of the target device, or receive the target identification information input by a user, so as to generate the database record.
Optionally, the generating unit further includes: the second acquisition module is used for acquiring the first network address of the target equipment; the first judging module is used for judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; and the generating module is used for storing the first network address into the database record if the first network address and the target device are in the same local area network.
Optionally, the apparatus further comprises: a detecting unit, configured to detect whether the target device accesses a wireless network, where the detecting unit performs the following steps to detect whether the target device accesses the wireless network: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; and if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network.
Optionally, the processing unit includes: and the updating module is used for updating the database record according to the routing table so as to obtain the target network address.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the above method for establishing a wireless debug connection.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes the method for establishing a wireless debug connection.
According to another aspect of the embodiments of the present invention, there is also provided a computer terminal, including: a processor; and a memory coupled to the processor for providing instructions to the processor for processing the following processing steps: under the condition that target equipment is detected to be accessed to a wireless network, target identification information of the target equipment is obtained from a preset database record, wherein the database record comprises identification information of the connected equipment; acquiring a target network address corresponding to the target identification information; and establishing wireless debugging connection with the target equipment through the target network address.
According to another aspect of the embodiments of the present invention, there is also provided a data processing method, including: establishing connection with target equipment; acquiring target identification information and a first network address of the target equipment; judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; and if the target device and the target device are in the same local area network, generating a database record, wherein the database record comprises the target identification information and the first network address.
In the embodiment of the invention, under the condition that the target equipment is accessed to the wireless network, the target identification information of the target equipment is obtained from a preset database record, wherein the database record comprises the identification information of the connected equipment; acquiring a target network address corresponding to the target identification information; the wireless debugging method comprises the steps of establishing wireless debugging connection with target equipment through a target network address, setting a database record containing identification information of the connected equipment, acquiring the target identification information through the target identification information in the database record under the condition that the target equipment is detected to be accessed into a wireless network, and then establishing wireless debugging connection with the target equipment, so that the purpose of establishing wireless debugging connection without repeatedly performing wired connection is achieved, the technical effects of reducing debugging complexity and improving flexibility are achieved, and the technical problems that the debugging process is complex and the flexibility is poor due to the fact that related technologies need to rely on a USB to establish connection with an intelligent mobile terminal and debug the intelligent mobile terminal are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an alternative computer terminal according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating an alternative method of establishing a wireless debug connection according to an embodiment of the present invention;
fig. 3(a) is a schematic flow chart of another alternative method for establishing a wireless debug connection according to an embodiment of the present invention;
fig. 3(b) is a flowchart illustrating an alternative method for establishing a wireless debug connection according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an alternative apparatus for establishing a wireless debug connection according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another alternative apparatus for establishing a wireless debug connection according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an alternative processing unit according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another alternative computer terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
network address: the IP address is a uniform address format provided by an IP protocol, and a logical address is distributed to each network and each host on the Internet;
physical address: i.e., a MAC address, which represents an identifier of each station on the internet, expressed as a hexadecimal number, for a total of six bytes (48 bits). The first three bytes are codes (upper 24 bits) assigned by the registration authority RA of the IEEE to different manufacturers, and are also referred to as "organized Unique identifiers" (organized Unique Identifier), and the last three bytes (lower 24 bits) are assigned by the manufacturers themselves to the produced adapter interfaces, and are referred to as extended identifiers (uniqueness). One address block may generate 224 different addresses. The MAC address is actually the adapter address or adapter identifier EUI-48.
Example 1
There is also provided, in accordance with an embodiment of the present invention, an embodiment of a method of establishing a wireless debug connection, it being noted that the steps illustrated in the flowchart of the accompanying figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Fig. 1 shows a hardware block diagram of a computer terminal (or mobile device) for implementing a method of establishing a wireless debug connection. As shown in fig. 1, the computer terminal 10 (or mobile device 10) may include one or more (shown as 102a, 102b, … …, 102 n) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors 102 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuit may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computer terminal 10 (or mobile device). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the method for establishing a wireless debug connection in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the vulnerability detection method of the application program. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
It should be noted here that in some alternative embodiments, the computer device (or mobile device) shown in fig. 1 described above may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in the computer device (or mobile device) described above.
In the above operating environment, the present application provides a method for establishing a wireless debug connection as shown in fig. 2. Fig. 2 is a flowchart of a method for establishing a wireless debug connection according to a first embodiment of the present invention.
Step S202, under the condition that the target device is accessed to the wireless network, the target identification information of the target device is obtained from the preset database record.
In step S202, the database record includes identification information of connected devices, where one identification information uniquely corresponds to one device, and the database record may specifically include a device name, an IP address, an MAC address, and a hardware serial number; the main body of the method for establishing the wireless debug connection according to the embodiment may be the computer terminal; the target device may be a device that has established a connection with a computer terminal.
Before obtaining the target identification information of the target device from the preset database record, the method for establishing the wireless debug connection according to this embodiment may further include: detecting whether a target device accesses a wireless network, comprising: comparing the database record with a routing table to find whether the routing table contains target identification information or not, wherein the routing table is arranged in a router; if the routing table contains target identification information, determining that the target equipment is accessed to the wireless network; and if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network.
That is, when the target device needs to be debugged, the target device needs to be accessed to the same local area network as the computer terminal (the local area network may be any local area network, and is not limited to the local area network accessed during the first connection, as long as the computer terminal and the target device are both accessed to the same local area network). The computer terminal locally stores a routing table (equivalent to the database record), compares the routing table with the routing table in the router at intervals, and if the routing table in the router is found to be changed, the computer terminal knows that the equipment is accessed into the router.
It should be added that, this embodiment may automatically detect whether the target device is accessed to the wireless network, or the user may manually select and control the target device to access to the wireless network, which all fall within the protection scope of this embodiment.
In this embodiment, the database record may be automatically generated by the computer terminal, or may be manually input by the user and stored in the computer terminal.
Optionally, before obtaining the target identification information of the target device from the preset database record, the method further includes: establishing a database record, comprising:
step S10, a connection is established with the target device.
In the above step S10, the establishing a first connection with the target device, where the establishing a connection with the target device includes: a USB connection or a Wi-Fi connection is established with the target device.
Step S12, automatically reading the target identification information of the target device, or receiving the target identification information input by the user, to generate a database record.
In step S12, after establishing a connection with the target device, the target identification information (MAC address and/or hardware serial number) of the target device may be automatically read, or the target identification information input by the user may be received, so as to generate the database record.
In step S14, a first network address of the target device is obtained.
In step S14, the present IP address (i.e., the first network address) of the target device may also be obtained.
Step S16, determining whether the first network address and the subnet mask of the local area network where the first network address and the first network address are located are in the same local area network as the target device.
In the above step S16, an and operation is performed on the first network address and the subnet mask of the lan where the computer terminal is located, so as to determine whether the computer terminal and the target device are in the same lan.
The subnet mask can be used to determine whether the IP addresses of any two devices belong to the same subnet, that is, after the AND operation is performed on the IP addresses of the two devices AND the subnet mask, if the two devices are in the same subnet, it is determined that the two devices are in the same subnet.
Step S18, if the device is in the same lan as the target device, the first network address is stored in the database record.
In step S18, if the devices are in the same lan, the information (i.e., the target identification information and the first network address) is saved, and after this operation, the wireless Wi-Fi connection between the computer terminal and the target device may be performed. And judging that the information is not stored if the computer terminal and the target equipment are not accessed to the same local area network.
Based on the above steps, a database record containing the device name, the device IP address, the device MAC address, and the hardware serial number is generated at the computer terminal.
Step S204, a target network address corresponding to the target identification information is obtained.
In step S204, after the target identification information is obtained from the database record, a target network address corresponding to the target identification information needs to be obtained.
Optionally, the database record is updated according to the routing table to obtain the target network address.
It can be understood that, when the target device accesses the wireless network, the computer terminal queries the routing table in the router, matches a field in the routing table in the router through the previously recorded MAC address, searches for an IP address corresponding to the MAC address, updates the database record in the computer terminal to a new IP address record (i.e., updates the first network address to the target network address) if the MAC address record in the routing table is updated (i.e., the target network address is different from the first network address), and establishes a wireless debug connection with the target device again through the new IP address to perform data transmission.
Step S206, wireless debugging connection is established with the target device through the target network address.
Optionally, the database record further comprises a device name; the identification information of the device includes at least one of: physical address, hardware serial number.
Through the steps, the process of establishing the debugging connection for the second time and later can be optimized, the USB connection operation is not required to be carried out again in the wireless debugging connection for the second time and later, and the wireless debugging connection is established by reading the routing table in the router, so that the access is more convenient.
In the following, taking the target device as an intelligent mobile terminal and the computer terminal as a PC as an example, a method for establishing a wireless debug connection according to this embodiment is described:
the method for establishing the wireless debugging connection comprises two parts: a first connection process as shown in fig. 3(a) and a non-first connection process as shown in fig. 3 (b):
first, as shown in fig. 3(a), the first connection process includes:
step a, the intelligent mobile terminal is inserted into a PC.
And step b, starting the program by the PC.
And c, establishing USB connection.
And d, the PC obtains the MAC address, the IP address and the equipment name of the intelligent mobile terminal.
In the steps from a to d, establishing wireless Wi-Fi or wired USB connection with the intelligent mobile terminal through the PC, and acquiring the MAC address, the IP address and the hardware serial number of the intelligent terminal;
after the PC is connected with the intelligent mobile terminal for the first time, the PC reads the IP address, the MAC address and the hardware serial number of the intelligent mobile terminal, and judges whether the accessed intelligent mobile terminal and the PC are in the same local area network or not through the AND operation of the IP address of the intelligent mobile terminal and the subnet mask of the local area network in which the PC is located, if the accessed intelligent mobile terminal and the PC are in the same local area network, the information is stored, and after the operation, wireless Wi-Fi connection between the PC and the intelligent mobile terminal can be carried out. And judging that the information is not stored if the equipment and the PC do not access the same local area network.
And e, recording information such as the MAC address by the PC.
The information is stored locally in the PC, namely, a database record of the equipment name, the equipment IP address, the equipment MAC address and the hardware serial number is generated at the PC end.
And f, disconnecting the USB connection.
Then, as shown in fig. 3(b), the non-first connection process includes:
and step A, running the program by the PC.
And B, the intelligent mobile terminal accesses the Wi-Fi network.
And step C, the network distributes IP addresses to update the routing table.
And D, the PC obtains the relation between the MAC address and the IP address by inquiring the routing table.
In the above steps a to D, when the smart mobile terminal needs to be debugged, the smart mobile terminal needs to be first accessed to the same local area network as the PC (the local area network may be any local area network, not limited to the local area network accessed during the first connection, as long as the PC and the device are both accessed to the same local area network), that is, the same Wi-Fi as the PC is accessed. After the PC and the intelligent mobile terminal are both accessed to the local area network, the PC carries out routing table query, and queries the MAC address and the IP address of the intelligent mobile terminal accessed to the same Wi-Fi from the routing table. And then updating the database record established in the first connection process, namely updating the IP address corresponding to the same MAC address.
And selecting the IP address of the intelligent mobile terminal according to the updated database, and establishing wireless debugging connection between the PC and the intelligent mobile terminal according to the IP address, namely establishing wireless connection by using ADB (Android Debug Bridge) connect IP.
It should be noted that, since the IP address in the lan accessed each time is not necessarily the same as the previous IP address, that is, the MAC address of the intelligent mobile terminal remains unchanged and the IP address is dynamically allocated when the intelligent mobile terminal accesses the Wi-Fi each time, that is, an IP address is obtained again when the intelligent mobile terminal accesses the Wi-Fi each time, the IP field information of the database at the PC end needs to be updated.
And E, the intelligent mobile terminal allocates an IP address.
And F, establishing wireless connection through the IP address.
And finding out a corresponding IP address through the MAC address, and establishing wireless debugging connection between the PC and the intelligent mobile terminal by using the IP address.
In the subsequent process of establishing the wireless debugging connection, the IP address of the intelligent mobile terminal does not need to be inquired again, the subnet under the same route can be realized, and the connection can be automatically identified and debugged and data transmission can be carried out when the connection is established subsequently only after the connection is established once. The complexity of the connection process is reduced while the USB is prevented from being plugged into the wired connection PC and the intelligent mobile terminal.
The method for establishing the wireless debugging connection is a scheme for solving the contradiction of the debugging space and facilitating development and debugging of the wired connection debugging machine and convenient connection debugging machine in the later period.
When the intelligent mobile terminal is inserted into the USB port of the PC end, the PC starts to judge whether the inserted intelligent mobile terminal and the PC are in the same subnet, if the intelligent mobile terminal and the PC are in the same subnet, the IP address, the MAC address and the hardware serial number of the intelligent mobile terminal of the current intelligent mobile terminal are read, and database records of the field information are formed in the computer. After the USB physical connection is disconnected, the PC searches the IP address of the intelligent mobile terminal to establish wireless debugging connection.
When the intelligent mobile terminal accesses the wireless network, the PC queries a routing table in the router, then matches a field in the routing table in the router through the previously recorded MAC address, searches an IP address corresponding to the MAC address, updates the local record of the PC end database into a new IP address record if the record of the MAC in the routing table is updated, and establishes wireless debugging connection with the intelligent mobile terminal through the new IP address again to transmit data.
The embodiment of the invention also provides a data processing method, which comprises the following steps: establishing connection with target equipment; acquiring target identification information and a first network address of target equipment; judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; and if the target device is in the same local area network as the target device, generating a database record, wherein the database record comprises the target identification information and the first network address.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to an embodiment of the present invention, there is also provided an apparatus for establishing a wireless debug connection, which is used for implementing the above method for establishing a wireless debug connection, and as shown in fig. 4, the apparatus includes:
an obtaining unit 402, configured to obtain target identification information of a target device from a preset database record when the target device accesses a wireless network, where the database record includes identification information of connected devices;
a processing unit 404, configured to obtain a target network address corresponding to the target identification information;
a connection unit 406, configured to establish a wireless debug connection with the target device through the target network address.
It should be noted here that the acquiring unit 402, the processing unit 404 and the connecting unit 406 correspond to steps S202 to S206 in embodiment 1, and the three modules are the same as the corresponding steps in the implementation example and application scenario, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
Optionally, as shown in fig. 5, the apparatus for establishing a wireless debug connection further includes: a generating unit 408, configured to create the database record, where the generating unit 408 includes:
a connection module 502, configured to establish a connection with the target device;
a first obtaining module 504, configured to automatically read the target identification information of the target device, or receive the target identification information input by a user, so as to generate the database record;
a second obtaining module 510, configured to obtain a first network address of the target device;
a first determining module 506, configured to determine whether the first network address and a subnet mask of a local area network where the first network address and the first network address are located are in the same local area network as the target device;
a generating module 508, configured to store the first network address in the database record if the first network address and the target device are in the same local area network.
Optionally, the connection module 502 is configured to perform the following steps to establish a connection with the target device: and establishing a Universal Serial Bus (USB) connection or a Wi-Fi connection with the target equipment.
Optionally, the apparatus for establishing a wireless debug connection further includes: a detecting unit 402, configured to detect whether the target device accesses a wireless network, where the detecting unit 402 is configured to perform the following steps to detect whether the target device accesses the wireless network: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; and if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network.
Optionally, as shown in fig. 6, the processing unit 404 includes:
an updating module 604, configured to update the database record according to the routing table to obtain the target network address.
Optionally, the database record further comprises a device name; the identification information of the device includes at least one of: physical address, hardware serial number.
Example 3
The embodiment of the invention can provide a computer terminal which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced with a terminal device such as a mobile terminal.
Optionally, in this embodiment, the computer terminal may be located in at least one network device of a plurality of network devices of a computer network.
In this embodiment, the computer terminal may execute the program code of the following steps in the method for establishing a wireless debug connection: under the condition that target equipment is accessed to a wireless network, acquiring target identification information of the target equipment from a preset database record, wherein the database record comprises identification information of connected equipment; acquiring a target network address corresponding to the target identification information; and establishing wireless debugging connection with the target equipment through the target network address.
Alternatively, fig. 7 is a block diagram of a computer terminal according to an embodiment of the present invention. As shown in fig. 7, the computer terminal 100 may include: one or more processors (only one shown), memory.
The memory 104 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for establishing a wireless debug connection in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the above-described method for establishing a wireless debug connection. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory located remotely from the processor, which may be connected to the computer terminal 100 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 102 may call the information and applications stored in the memory 104 through the transmission device to perform the following steps: under the condition that target equipment is accessed to a wireless network, acquiring target identification information of the target equipment from a preset database record, wherein the database record comprises identification information of connected equipment; acquiring a target network address corresponding to the target identification information; and establishing wireless debugging connection with the target equipment through the target network address.
Optionally, the processor 102 may further execute program code for: establishing the database record, including: establishing a connection with the target device; automatically reading the target identification information of the target device, or receiving the target identification information input by a user to generate the database record.
Optionally, the processor 102 may further execute program code for: acquiring a first network address of the target equipment; judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; and if the first network address and the target equipment are in the same local area network, storing the first network address into the database record.
Optionally, the processor 102 may further execute program code for: and establishing a Universal Serial Bus (USB) connection or a Wi-Fi connection with the target equipment.
Optionally, the processor 102 may further execute program code for: detecting whether the target device accesses a wireless network, including: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; and if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network.
Optionally, the processor 102 may further execute program code for: and updating the database record according to the routing table to obtain the target network address.
The embodiment of the invention provides a scheme for establishing wireless debugging connection. Through the target identification information in the database record, the target identification information is obtained and then the wireless debugging connection is established with the target equipment, the purpose of establishing the wireless debugging connection without repeatedly performing wired connection is achieved, the technical effects of reducing the debugging complexity and improving the flexibility are achieved, and the technical problems that the debugging process is complex and the flexibility is poor due to the fact that the related technology needs to rely on a USB to establish connection with an intelligent mobile terminal and debug the related technology are solved.
It can be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration, and the computer terminal may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 7 is a diagram illustrating a structure of the electronic device. For example, the computer terminal 100 may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 4
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium may be configured to store program codes executed by the method for establishing a wireless debug connection provided in the first embodiment.
Optionally, in this embodiment, the storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: under the condition that target equipment is accessed to a wireless network, acquiring target identification information of the target equipment from a preset database record, wherein the database record comprises identification information of connected equipment; acquiring a target network address corresponding to the target identification information; and establishing wireless debugging connection with the target equipment through the target network address.
Optionally, in this embodiment, the storage medium may be further configured to store program code for performing the following steps: establishing the database record, including: establishing a connection with the target device; automatically reading the target identification information of the target device, or receiving the target identification information input by a user to generate the database record.
Optionally, in this embodiment, the storage medium may be further configured to store program code for performing the following steps: acquiring a first network address of the target equipment; judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; and if the first network address and the target equipment are in the same local area network, storing the first network address into the database record.
Optionally, in this embodiment, the storage medium may be further configured to store program code for performing the following steps: and establishing a Universal Serial Bus (USB) connection or a Wi-Fi connection with the target equipment.
Optionally, in this embodiment, the storage medium may be further configured to store program code for performing the following steps: detecting whether the target device accesses a wireless network, including: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; and if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network.
Optionally, in this embodiment, the storage medium may be further configured to store program code for performing the following steps: and updating the database record according to the routing table to obtain the target network address.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A method of establishing a wireless debug connection, comprising:
under the condition that target equipment is accessed to a wireless network, acquiring target identification information of the target equipment from a preset database record, wherein the database record comprises identification information of connected equipment;
acquiring a target network address corresponding to the target identification information;
establishing wireless debugging connection with the target equipment through the target network address;
before the target identification information of the target device is acquired from a preset database record, the method further includes: detecting whether the target device accesses a wireless network, including: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network;
wherein the method further comprises: acquiring a first network address of the target equipment; judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; if the first network address and the target device are in the same local area network, storing the first network address into the database record;
AND the subnet mask is used for judging whether the IP addresses of any two devices belong to the same subnet, wherein after the respective IP addresses of the two devices are AND-operated with the subnet mask, if the obtained results are the same, the two devices are in the same subnet.
2. The method of claim 1, wherein before obtaining the target identification information of the target device from a preset database record, the method further comprises: establishing the database record, including:
establishing a connection with the target device;
automatically reading the target identification information of the target device, or receiving the target identification information input by a user to generate the database record.
3. The method of claim 2, wherein establishing the connection with the target device comprises:
and establishing a Universal Serial Bus (USB) connection or a Wi-Fi connection with the target equipment.
4. The method of claim 1, wherein obtaining the target network address corresponding to the target identification information comprises:
and updating the database record according to the routing table to obtain the target network address.
5. The method of any of claims 1 to 4, wherein the database record further comprises a device name; the identification information of the device includes at least one of: physical address, hardware serial number.
6. An apparatus for establishing a wireless debug connection, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring target identification information of target equipment from a preset database record under the condition that the target equipment is accessed to a wireless network, and the database record comprises the identification information of the connected equipment;
the processing unit is used for acquiring a target network address corresponding to the target identification information;
the connection unit is used for establishing wireless debugging connection with the target equipment through the target network address;
a detecting unit, configured to detect whether the target device accesses a wireless network, where the detecting unit performs the following steps to detect whether the target device accesses the wireless network: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network;
wherein, the generating unit is used for establishing the database record, and the generating unit further comprises: the second acquisition module is used for acquiring the first network address of the target equipment; the first judging module is used for judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; the generating module is used for storing the first network address into the database record if the first network address and the target device are in the same local area network;
AND the subnet mask is used for judging whether the IP addresses of any two devices belong to the same subnet, wherein after the respective IP addresses of the two devices are AND-operated with the subnet mask, if the obtained results are the same, the two devices are in the same subnet.
7. The apparatus of claim 6, further comprising: the generation unit includes:
the connection module is used for establishing connection with the target equipment;
a first obtaining module, configured to automatically read the target identification information of the target device, or receive the target identification information input by a user, so as to generate the database record.
8. The apparatus of claim 6, wherein the processing unit comprises:
and the updating module is used for updating the database record according to the routing table so as to obtain the target network address.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the method for establishing wireless debug connection according to any one of claims 1 to 5.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to perform the method of establishing a wireless debug connection according to any of claims 1 to 5 when running.
11. A computer terminal, comprising:
a processor; and
a memory coupled to the processor for providing instructions to the processor for processing the following processing steps: under the condition that target equipment is accessed to a wireless network, acquiring target identification information of the target equipment from a preset database record, wherein the database record comprises identification information of connected equipment; acquiring a target network address corresponding to the target identification information; establishing wireless debugging connection with the target equipment through the target network address;
before acquiring the target identification information of the target device from a preset database record, detecting whether the target device is accessed to a wireless network, including: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network;
acquiring a first network address of the target equipment; judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not; if the first network address and the target device are in the same local area network, storing the first network address into the database record;
AND the subnet mask is used for judging whether the IP addresses of any two devices belong to the same subnet, wherein after the respective IP addresses of the two devices are AND-operated with the subnet mask, if the obtained results are the same, the two devices are in the same subnet.
12. A data processing method, comprising:
establishing connection with target equipment;
acquiring target identification information and a first network address of the target equipment;
judging whether the first network address and the subnet mask of the local area network where the first network address is located are in the same local area network with the target device or not;
if the target device and the target device are in the same local area network, generating a database record, wherein the database record comprises the target identification information and the first network address;
wherein the method further comprises: detecting whether the target device accesses a wireless network, including: searching whether the routing table contains the target identification information or not by comparing the database record with the routing table, wherein the routing table is arranged in a router; if the routing table contains the target identification information, determining that the target equipment is accessed to the wireless network; if the routing table does not contain the target identification information, determining that the target equipment does not access the wireless network;
AND the subnet mask is used for judging whether the IP addresses of any two devices belong to the same subnet, wherein after the respective IP addresses of the two devices are AND-operated with the subnet mask, if the obtained results are the same, the two devices are in the same subnet.
CN201810089433.7A 2018-01-30 2018-01-30 Method and device for establishing wireless debugging connection and data processing method Active CN108337739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810089433.7A CN108337739B (en) 2018-01-30 2018-01-30 Method and device for establishing wireless debugging connection and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810089433.7A CN108337739B (en) 2018-01-30 2018-01-30 Method and device for establishing wireless debugging connection and data processing method

Publications (2)

Publication Number Publication Date
CN108337739A CN108337739A (en) 2018-07-27
CN108337739B true CN108337739B (en) 2021-09-17

Family

ID=62926226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810089433.7A Active CN108337739B (en) 2018-01-30 2018-01-30 Method and device for establishing wireless debugging connection and data processing method

Country Status (1)

Country Link
CN (1) CN108337739B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388562A (en) * 2018-09-21 2019-02-26 北京辰森世纪科技股份有限公司 Debug method and device, the system, storage medium, electronic device of pos machine
CN111343326A (en) * 2020-04-22 2020-06-26 Oppo广东移动通信有限公司 Method and related device for acquiring test log
CN111626621A (en) * 2020-05-28 2020-09-04 海尔优家智能科技(北京)有限公司 Intelligent equipment production test method and device and electronic device
CN114205847B (en) * 2021-11-29 2024-01-19 上海庆科信息技术有限公司 Method, device, storage medium, equipment and system for testing terminal equipment
CN114489825B (en) * 2022-04-13 2022-09-27 荣耀终端有限公司 Electronic equipment and shutdown method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895875A (en) * 2010-07-29 2010-11-24 杭州华三通信技术有限公司 Method and system of using gateway device to provide differentiated services in wireless network
CN101959181A (en) * 2009-07-20 2011-01-26 中兴通讯股份有限公司 Network architecture cooperated by various wireless networks and method
CN103974375A (en) * 2014-01-17 2014-08-06 北京奇虎科技有限公司 Wireless network access method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149611A1 (en) * 2012-11-26 2014-05-29 Qualcomm Incorporated CHANNEL CONDITION AWARE USB DATA DELIVERY OVER Wi-Fi WITH DIFFERENTIAL TREATMENT ON DISTINCT USB ENDPOINTS

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101959181A (en) * 2009-07-20 2011-01-26 中兴通讯股份有限公司 Network architecture cooperated by various wireless networks and method
CN101895875A (en) * 2010-07-29 2010-11-24 杭州华三通信技术有限公司 Method and system of using gateway device to provide differentiated services in wireless network
CN103974375A (en) * 2014-01-17 2014-08-06 北京奇虎科技有限公司 Wireless network access method, device and system

Also Published As

Publication number Publication date
CN108337739A (en) 2018-07-27

Similar Documents

Publication Publication Date Title
CN108337739B (en) Method and device for establishing wireless debugging connection and data processing method
CN109041140B (en) Method for rapidly switching wireless network, intelligent hardware and terminal equipment
CN111371638A (en) Intelligent equipment testing method and device, server and storage medium
CN108243407B (en) Method for managing network interfaces of multiple wireless module devices and terminal device
CN105376107A (en) Terminal test method and proxy server
CN104883704B (en) A kind of automatic error correction method and device of mobile terminal access point parameters
CN104270204A (en) Testing method and testing equipment for wireless communication module
CN111163469A (en) Network distribution method of intelligent household appliance, wireless module and intelligent household appliance
CN110572365A (en) multi-protocol server management method, system, terminal device and storage medium
EP4177735A1 (en) Novel portable program upgrading method
CN112738019B (en) Method and device for displaying device information, storage medium and electronic device
CN112788576B (en) Equipment offline processing method and system, storage medium and electronic device
CN110071950B (en) Information transmission method, transfer device, terminal, controlled device and storage medium
CN113434462A (en) HDFS data transfer method and device, storage medium and electronic equipment
CN111371919A (en) IP query method and device of Internet of things card and electronic equipment
CN113194045B (en) Data traffic analysis method, device, storage medium and processor
CN114697291A (en) Method, device, server and storage medium for acquiring available IP address field
CN104244172A (en) Information interaction method and device
CN106341861B (en) Method, server and system for identifying wireless access point
CN110858201B (en) Data processing method and system, processor and storage medium
CN113312254A (en) Kernel code testing method and device, storage medium and processor
CN112511441A (en) Message processing method and device
KR20180100605A (en) Data transmission method and host machine
CN110601938A (en) Intelligent household appliance unique identification code writing method, network terminal device and system
CN111309543A (en) Debugging method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 200433 Shanghai city Yangpu District Songhu Road No. 388 building 7, KIC 605

Applicant after: SHANGHAI SHANGMI SCIENCE AND TECHNOLOGY GROUP CO., LTD.

Address before: 200433 Shanghai city Yangpu District Songhu Road No. 388 building 7, KIC 605

Applicant before: Shanghai traders Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant