CN113472611A - Method and device for acquiring WiFi signal strength and readable storage medium - Google Patents

Method and device for acquiring WiFi signal strength and readable storage medium Download PDF

Info

Publication number
CN113472611A
CN113472611A CN202110843669.7A CN202110843669A CN113472611A CN 113472611 A CN113472611 A CN 113472611A CN 202110843669 A CN202110843669 A CN 202110843669A CN 113472611 A CN113472611 A CN 113472611A
Authority
CN
China
Prior art keywords
wifi
antenna
wifi network
connection
acquiring
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.)
Pending
Application number
CN202110843669.7A
Other languages
Chinese (zh)
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.)
Dongguan Jinruixian Digital Technology Co ltd
Original Assignee
Dongguan Jinruixian Digital Technology 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 Dongguan Jinruixian Digital Technology Co ltd filed Critical Dongguan Jinruixian Digital Technology Co ltd
Priority to CN202110843669.7A priority Critical patent/CN113472611A/en
Publication of CN113472611A publication Critical patent/CN113472611A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/08Access point devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application is applicable to the technical field of network communication, and provides a method, a device and a readable storage medium for acquiring WiFi signal strength, wherein the method comprises the following steps: acquiring a test instruction; responding to the test instruction, executing a connection command to connect to a WiFi network corresponding to the target SSID through the WiFi module, and acquiring state information of the WiFi network, wherein the connection command comprises the target SSID, and the state information comprises a signal strength value; executing the state acquiring command, and generating a state file, wherein the state file comprises connection state information and state information of the WiFi network, and the connection state information is used for describing the connection state of the WiFi module and the WiFi network; and if the connection state is successful, acquiring the signal intensity value of the WiFi network from the state file. The method can be quickly connected with the WiFi network with the appointed SSID, so that the connection time is greatly shortened, and the test efficiency is improved.

Description

Method and device for acquiring WiFi signal strength and readable storage medium
Technical Field
The present application belongs to the field of network communication technologies, and in particular, to a method and an apparatus for obtaining WiFi signal strength, an electronic device, and a readable storage medium.
Background
At present, the mode of testing the wifi module on the production line is for adopting the mode of full scanning wifi equipment, with wifi equipment on every side all scan once, seek the wifi equipment that appointed ssid corresponds from all search results again, reacquire the status information of this wifi equipment, this can make test time overlength and inefficiency to seriously drag the production progress of slow production line.
Disclosure of Invention
The embodiment of the application provides a method and a device for acquiring WiFi signal strength, electronic equipment and a readable storage medium, and can solve the problems of long test time and low efficiency.
In a first aspect, an embodiment of the present application provides a method for acquiring WiFi signal strength, including:
acquiring a test instruction;
responding to the test instruction, executing a connection command to connect to a WiFi network corresponding to a target SSID through a WiFi module, and acquiring state information of the WiFi network, wherein the connection command comprises the target SSID, and the state information comprises a signal strength value; executing a status acquisition command, and generating a status file, wherein the status file comprises connection status information and status information of the WiFi network, and the connection status information is used for describing the connection status of the WiFi module and the WiFi network;
and if the connection state is successful, acquiring the signal intensity value of the WiFi network from the state file.
In a possible implementation manner of the first aspect, the obtaining the status information of the WiFi network includes:
acquiring a WiFi signal of a first path of antenna by controlling a register of the WiFi module;
obtaining state information of the first antenna according to the WiFi signal of the first antenna;
acquiring a WiFi signal of a second antenna by controlling the register;
obtaining state information of the second antenna according to the WiFi signal of the second antenna;
the state information of the WiFi network comprises the state information of the first antenna and the state information of the second antenna;
the signal strength value of the WiFi network comprises the signal strength of the first antenna and the signal strength of the second antenna.
In a possible implementation manner of the first aspect, the obtaining a signal strength value of the WiFi network from the status file includes:
executing an analysis command, and generating a data file, wherein the data file comprises a signal intensity value of the WiFi network;
and executing a calling command, and acquiring the signal intensity value of the WiFi network from the data file.
Optionally, after generating the state file, the method further includes:
and if the connection state is failure, entering a step of executing a state acquisition command.
Optionally, after the step of executing the acquire status command is entered, the method further includes:
and if the connection state is judged to be failed, executing a connection quitting command if the number of times reaches a preset number.
Optionally, after obtaining the signal strength value of the WiFi network from the status file, the method further includes:
and uploading the signal intensity value of the WiFi network to an upper computer.
In a second aspect, an embodiment of the present application provides an apparatus for acquiring WiFi signal strength, including:
the acquisition unit is used for acquiring a test instruction;
the execution unit is used for responding to the test instruction, executing a connection command, connecting to a WiFi network corresponding to a target SSID through a WiFi module, and acquiring state information of the WiFi network, wherein the connection command comprises the target SSID, and the state information comprises a signal intensity value; executing a status acquisition command, and generating a status file, wherein the status file comprises connection status information and status information of the WiFi network, and the connection status information is used for describing the connection status of the WiFi module and the WiFi network;
and if the connection state is successful, acquiring the signal intensity value of the WiFi network from the state file.
Optionally, the execution unit is specifically configured to:
acquiring a WiFi signal of a first path of antenna by controlling a register of the WiFi module;
obtaining state information of the first antenna according to the WiFi signal of the first antenna;
acquiring a WiFi signal of a second antenna by controlling the register;
obtaining state information of the second antenna according to the WiFi signal of the second antenna;
the state information of the WiFi network comprises the state information of the first antenna and the state information of the second antenna;
the signal strength value of the WiFi network comprises the signal strength of the first antenna and the signal strength of the second antenna.
Optionally, the execution unit is specifically configured to execute an analysis command, and generate a data file, where the data file includes the signal strength value of the WiFi network;
and executing a calling command, and acquiring the signal intensity value of the WiFi network from the data file.
Optionally, the execution unit is further configured to enter a step of executing the acquire status command if the connection status is failure.
Optionally, the execution unit is further configured to execute the connection quitting command if the number of times that the connection state is determined to be the failure reaches a preset number of times.
Optionally, the apparatus further comprises a transmission unit;
and the transmission unit is used for uploading the signal intensity value of the WiFi network to an upper computer.
In a third aspect, an embodiment of the present application provides an electronic device, including: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method according to any of the first aspects when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method according to any one of the first aspects.
In a fifth aspect, embodiments of the present application provide a computer program product, which, when run on an electronic device, causes the electronic device to perform the method of any one of the above first aspects.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that:
according to the embodiment of the application, the WiFi module is connected to the WiFi network corresponding to the target SSID through executing the connection command, and the state information of the WiFi network is obtained, wherein the connection command comprises the target SSID; the method can be quickly connected with the WiFi network with the appointed SSID, so that the connection time is greatly shortened, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for acquiring WiFi signal strength according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for acquiring WiFi signal strength according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of an apparatus for acquiring WiFi signal strength according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Fig. 1 is a flowchart illustrating, by way of example and not limitation, a method for acquiring WiFi signal strength according to an embodiment of the present application, where the method is performed by an electronic device. As shown in fig. 1, the method includes:
s101: and acquiring a test instruction.
The test instructions are stored in the electronic device. And the upper computer sends a test starting instruction to the electronic equipment, and the electronic equipment starts testing after receiving the instruction to acquire the test instruction.
S102: responding to the test instruction, executing a connection command to connect to a WiFi network corresponding to the target SSID through a WiFi module, and acquiring state information of the WiFi network;
the connection command includes a target SSID (Service Set Identifier) and the status information includes a signal strength value. Correspondingly, the connection command is a script command with a target SSID.
The WiFi module is a WiFi module to be tested, and WiFi equipment for providing a WiFi network corresponding to the target SSID is arranged around the WiFi module.
Specifically, the WiFi signal of the first antenna is obtained by controlling a register of the WiFi module.
Obtaining state information of the first antenna according to the WiFi signal of the first antenna;
acquiring a WiFi signal of a second antenna through a control register;
obtaining state information of the second antenna according to the WiFi signal of the second antenna;
the state information of the WiFi network comprises the state information of the first antenna and the state information of the second antenna;
the signal strength value of the WiFi network comprises the signal strength of the first antenna and the signal strength of the second antenna.
The first antenna and the second antenna can be switched accurately by controlling the register, the situation that the wrong signal strength is obtained is avoided, the time for detecting the WiFi module is shortened, and the time is shortened from original 8 seconds to 4 seconds; and through the signal strength who acquires first way antenna and the signal strength of second way antenna, it is different as the signal strength of whole antennas with the signal strength that prior art only snatched an antenna, can judge which way antenna goes wrong when the antenna goes wrong, for example: the antenna is not plugged in.
S103: and executing the state acquiring command, and generating a state file, wherein the state file comprises connection state information and the state information of the WiFi network, and the connection state information is used for describing the connection state of the WiFi module and the WiFi network.
And executing the acquisition state command, wherein the generated state file comprises the signal-to-noise ratio, the MAC address of the target SSID, the connection state information and the signal strength. In order to further shorten the test time, a phy _ rssi _ ant command is executed to filter out other information, and only the connection state information and the signal strength are reserved, so that the connection state information and the signal strength can be quickly acquired in the subsequent steps.
By executing the status command, the information transmitted to the serial port is copied to the status file for storage, and the connection status information and the status information of the WiFi network can be directly read through the status file in the subsequent steps.
S104: and if the connection state is successful, acquiring the signal intensity value of the WiFi network from the state file.
Specifically, if it is recognized that no preset string exists in the state file, the connection state is determined to be successful, and the exit flag in the test command is modified to the first set value, so that the execution state command exits. For example, the predetermined string is Not associated.
Then, executing an analysis command to generate a data file, wherein the data file comprises a signal intensity value of the WiFi network;
and executing the calling command, and acquiring the signal strength value of the WiFi network from the data file. The result after the command is executed is stored in a file mode, and then the character strings in the data file are analyzed, so that the signal intensity value is obtained, and the reliability of the data is ensured.
According to the embodiment of the application, the WiFi module is connected to the WiFi network corresponding to the target SSID through executing the connection command, and the state information of the WiFi network is obtained, wherein the connection command comprises the target SSID; the method can be quickly connected with the WiFi network with the appointed SSID, so that the connection time is greatly shortened, and the test efficiency is improved. By means of the test instruction, the priority level of the test thread is improved, timely response to the test thread is guaranteed, and test time is further shortened.
Fig. 2 is a flowchart illustrating a method for acquiring WiFi signal strength according to another embodiment of the present application, which is by way of example and not limitation. As shown in fig. 2, after the generating the state file, the method further includes:
s201: if the connection state is failure, entering a step of executing the command for obtaining the state.
Specifically, if the preset string is identified in the state file, the connection state is determined to be a failure. Then, the counter is started, the value of the counter is added with 1, and after the delay of 500ms, the acquisition state command is executed. After the connection command is executed, connection is always tried, and after the connection fails, the step of executing the command for acquiring the state is directly carried out, so that the test time can be further shortened.
S202: and if the connection state is judged to be failure, executing the connection quitting command if the number of times reaches the preset number.
Specifically, if the state file generated by executing the acquire state command or the preset string is identified, the value of the counter is added with 1, and the acquire state command continues to be executed after a delay of 500 ms. When the value of the counter reaches the preset times, the exit mark in the test command is directly modified to be the first set value, so that the execution state command exits, and the exit connection command is executed.
Correspondingly, before executing the connection quitting command, executing the analysis command to generate a data file, wherein the data file comprises a signal intensity value of the WiFi network;
and after the quit connection command is executed, executing a calling command, and acquiring the signal intensity value of the WiFi network from the data file.
In this embodiment, if the number of times that the connection status is failure reaches the preset number of times, the connection quitting command is executed, so that the situation that the status acquiring command is executed in a circulating manner all the time is avoided, and the test time is increased.
In another embodiment, after obtaining the signal strength value of the WiFi network from the status file, the method further includes:
and uploading the signal intensity value of the WiFi network to an upper computer.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Corresponding to the method in the foregoing embodiment, fig. 3 is a schematic structural diagram of an apparatus for acquiring WiFi signal strength provided in the embodiment of the present application, and for convenience of explanation, only the parts related to the embodiment of the present application are shown.
As shown in fig. 3, the apparatus includes:
an acquisition unit 30 for acquiring a test instruction;
the execution unit 31 is configured to execute a connection command in response to the test instruction, so as to connect to a WiFi network corresponding to the target SSID through the WiFi module, and acquire status information of the WiFi network, where the connection command includes the target SSID, and the status information includes a signal strength value; executing the state acquiring command, and generating a state file, wherein the state file comprises connection state information and state information of the WiFi network, and the connection state information is used for describing the connection state of the WiFi module and the WiFi network;
and if the connection state is successful, acquiring the signal intensity value of the WiFi network from the state file.
Optionally, the execution unit 31 is specifically configured to:
acquiring a WiFi signal of a first path of antenna by controlling a register of a WiFi module;
obtaining state information of the first antenna according to the WiFi signal of the first antenna;
acquiring a WiFi signal of a second antenna through a control register;
obtaining state information of the second antenna according to the WiFi signal of the second antenna;
the state information of the WiFi network comprises the state information of the first antenna and the state information of the second antenna;
the signal strength value of the WiFi network comprises the signal strength of the first antenna and the signal strength of the second antenna.
Optionally, the execution unit 31 is specifically configured to:
executing the analysis command, and generating a data file, wherein the data file comprises a signal intensity value of the WiFi network;
and executing the calling command, and acquiring the signal strength value of the WiFi network from the data file.
In another embodiment, the execution unit 31 is further configured to enter the step of executing the acquire status command if the connection status is failure.
And if the connection state is judged to be failure, executing the connection quitting command if the number of times reaches the preset number.
In another embodiment, the apparatus further comprises a transmission unit;
and the transmission unit is used for uploading the signal intensity value of the WiFi network to an upper computer.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: at least one processor 40 (only one shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, the steps of any of the various method embodiments described above being implemented when the computer program 42 is executed by the processor 40.
The electronic device 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The electronic device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of the electronic device 4, and does not constitute a limitation of the electronic device 4, and may include more or less components than those shown, or combine some of the components, or different components, such as an input-output device, a network access device, etc.
The Processor 40 may be a Central Processing Unit (CPU), and the Processor 40 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may in some embodiments be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
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, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/electronic device, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. 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, devices or units, and may be in an electrical, mechanical 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.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for obtaining WiFi signal strength, comprising:
acquiring a test instruction;
responding to the test instruction, executing a connection command to connect to a WiFi network corresponding to a target SSID through a WiFi module, and acquiring state information of the WiFi network, wherein the connection command comprises the target SSID, and the state information comprises a signal strength value; executing a status acquisition command, and generating a status file, wherein the status file comprises connection status information and status information of the WiFi network, and the connection status information is used for describing the connection status of the WiFi module and the WiFi network;
and if the connection state is successful, acquiring the signal intensity value of the WiFi network from the state file.
2. The method of claim 1, wherein obtaining the status information of the WiFi network comprises:
acquiring a WiFi signal of a first path of antenna by controlling a register of the WiFi module;
obtaining state information of the first antenna according to the WiFi signal of the first antenna;
acquiring a WiFi signal of a second antenna by controlling the register;
obtaining state information of the second antenna according to the WiFi signal of the second antenna;
the state information of the WiFi network comprises the state information of the first antenna and the state information of the second antenna;
the signal strength value of the WiFi network comprises the signal strength of the first antenna and the signal strength of the second antenna.
3. The method of claim 1, wherein obtaining the signal strength value for the WiFi network from the status file comprises:
executing an analysis command, and generating a data file, wherein the data file comprises a signal intensity value of the WiFi network;
and executing a calling command, and acquiring the signal intensity value of the WiFi network from the data file.
4. The method of claim 1, after generating the state file, further comprising:
and if the connection state is failure, entering a step of executing a state acquisition command.
5. The method of claim 4, wherein after entering the step of executing the acquire status command, further comprising:
and if the connection state is judged to be failed, executing a connection quitting command if the number of times reaches a preset number.
6. The method of claim 1, wherein after obtaining the signal strength value for the WiFi network from the status file, further comprising:
and uploading the signal intensity value of the WiFi network to an upper computer.
7. An apparatus for obtaining WiFi signal strength, comprising:
the acquisition unit is used for acquiring a test instruction;
the execution unit is used for responding to the test instruction, executing a connection command, connecting to a WiFi network corresponding to a target SSID through a WiFi module, and acquiring state information of the WiFi network, wherein the connection command comprises the target SSID, and the state information comprises a signal intensity value; executing a status acquisition command, and generating a status file, wherein the status file comprises connection status information and status information of the WiFi network, and the connection status information is used for describing the connection status of the WiFi module and the WiFi network;
and if the connection state is successful, acquiring the signal intensity value of the WiFi network from the state file.
8. The apparatus of claim 7, wherein the execution unit is specifically configured to:
acquiring a WiFi signal of a first path of antenna by controlling a register of the WiFi module;
obtaining state information of the first antenna according to the WiFi signal of the first antenna;
acquiring a WiFi signal of a second antenna by controlling the register;
obtaining state information of the second antenna according to the WiFi signal of the second antenna;
the state information of the WiFi network comprises the state information of the first antenna and the state information of the second antenna;
the signal strength value of the WiFi network comprises the signal strength of the first antenna and the signal strength of the second antenna.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
CN202110843669.7A 2021-07-26 2021-07-26 Method and device for acquiring WiFi signal strength and readable storage medium Pending CN113472611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110843669.7A CN113472611A (en) 2021-07-26 2021-07-26 Method and device for acquiring WiFi signal strength and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110843669.7A CN113472611A (en) 2021-07-26 2021-07-26 Method and device for acquiring WiFi signal strength and readable storage medium

Publications (1)

Publication Number Publication Date
CN113472611A true CN113472611A (en) 2021-10-01

Family

ID=77882413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110843669.7A Pending CN113472611A (en) 2021-07-26 2021-07-26 Method and device for acquiring WiFi signal strength and readable storage medium

Country Status (1)

Country Link
CN (1) CN113472611A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114567916A (en) * 2022-03-01 2022-05-31 德沃康科技集团有限公司 Production test method, device, equipment and medium based on WiFi furniture

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167496A (en) * 2011-12-12 2013-06-19 中国电信股份有限公司 Network access method, system and network access device
CN105263196A (en) * 2015-08-31 2016-01-20 小米科技有限责任公司 Connection state prompting method and device
CN105451299A (en) * 2015-11-04 2016-03-30 北京小鸟听听科技有限公司 Method for controlling WiFi connection and electronic equipment thereof
WO2017092416A1 (en) * 2015-12-02 2017-06-08 乐视控股(北京)有限公司 Method and device for displaying wifi signal strength in wireless routers and wireless router having same
CN107205239A (en) * 2017-05-26 2017-09-26 广东美的厨房电器制造有限公司 A kind of method and detection device for detecting wireless network connection
WO2018040621A1 (en) * 2016-08-29 2018-03-08 深圳市中兴微电子技术有限公司 Hotspot sharing method, terminal, system and computer storage medium
WO2018103441A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Network positioning method and terminal device
CN108810951A (en) * 2018-07-23 2018-11-13 Tcl通力电子(惠州)有限公司 WiFi channels automatic test approach, system, equipment and storage medium
CN208241688U (en) * 2018-04-25 2018-12-14 江苏海事职业技术学院 A kind of embedded home gateway
CN109089327A (en) * 2018-10-23 2018-12-25 Oppo(重庆)智能科技有限公司 wireless network connecting method, device, terminal and storage medium
CN109275090A (en) * 2018-09-28 2019-01-25 Oppo广东移动通信有限公司 Information processing method, device, terminal and storage medium
CN110557305A (en) * 2018-05-31 2019-12-10 中兴通讯股份有限公司 method, equipment and computer readable storage medium for accessing wireless router
CN111541502A (en) * 2020-04-29 2020-08-14 四川虹美智能科技有限公司 System and method for testing WiFi module
CN111711919A (en) * 2020-05-26 2020-09-25 桃芯科技(苏州)有限公司 Method, electronic device, and computer storage medium for controlling antenna timing switching
WO2020227946A1 (en) * 2019-05-14 2020-11-19 Oppo广东移动通信有限公司 Method for switching between access network devices, terminal device, and network device

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167496A (en) * 2011-12-12 2013-06-19 中国电信股份有限公司 Network access method, system and network access device
CN105263196A (en) * 2015-08-31 2016-01-20 小米科技有限责任公司 Connection state prompting method and device
CN105451299A (en) * 2015-11-04 2016-03-30 北京小鸟听听科技有限公司 Method for controlling WiFi connection and electronic equipment thereof
WO2017092416A1 (en) * 2015-12-02 2017-06-08 乐视控股(北京)有限公司 Method and device for displaying wifi signal strength in wireless routers and wireless router having same
WO2018040621A1 (en) * 2016-08-29 2018-03-08 深圳市中兴微电子技术有限公司 Hotspot sharing method, terminal, system and computer storage medium
WO2018103441A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Network positioning method and terminal device
CN107205239A (en) * 2017-05-26 2017-09-26 广东美的厨房电器制造有限公司 A kind of method and detection device for detecting wireless network connection
CN208241688U (en) * 2018-04-25 2018-12-14 江苏海事职业技术学院 A kind of embedded home gateway
CN110557305A (en) * 2018-05-31 2019-12-10 中兴通讯股份有限公司 method, equipment and computer readable storage medium for accessing wireless router
CN108810951A (en) * 2018-07-23 2018-11-13 Tcl通力电子(惠州)有限公司 WiFi channels automatic test approach, system, equipment and storage medium
CN109275090A (en) * 2018-09-28 2019-01-25 Oppo广东移动通信有限公司 Information processing method, device, terminal and storage medium
CN109089327A (en) * 2018-10-23 2018-12-25 Oppo(重庆)智能科技有限公司 wireless network connecting method, device, terminal and storage medium
WO2020227946A1 (en) * 2019-05-14 2020-11-19 Oppo广东移动通信有限公司 Method for switching between access network devices, terminal device, and network device
CN111541502A (en) * 2020-04-29 2020-08-14 四川虹美智能科技有限公司 System and method for testing WiFi module
CN111711919A (en) * 2020-05-26 2020-09-25 桃芯科技(苏州)有限公司 Method, electronic device, and computer storage medium for controlling antenna timing switching

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114567916A (en) * 2022-03-01 2022-05-31 德沃康科技集团有限公司 Production test method, device, equipment and medium based on WiFi furniture

Similar Documents

Publication Publication Date Title
CN109814524B (en) Vehicle diagnosis method, device and system
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN110518990B (en) Calibration method, system and computer readable storage medium for multi-antenna WiFi product
CN113553257B (en) Test method, device, storage medium and electronic equipment
CN109800119A (en) A kind of product function test method and device
CN113672441A (en) Method and device for testing intelligent equipment
CN115184764A (en) Chip testing method and device, electronic equipment and storage medium
CN112445490B (en) File sequence processing method, device, terminal equipment and storage medium
CN113472611A (en) Method and device for acquiring WiFi signal strength and readable storage medium
CN111158987A (en) Health check method and device of micro-service architecture
CN112199272B (en) Intelligent terminal testing method and device, terminal equipment and medium
CN112671878B (en) Block chain information subscription method, device, server and storage medium
CN113341300B (en) Matrix key circuit automatic detection method, device, medium and equipment
CN110880990A (en) Configuration checking method and device for big data cluster component and computing equipment
CN113133041B (en) Method and device for testing vehicle-to-vehicle communication function in dynamic interval train control vehicle
CN113656322B (en) Data processing method, device, electronic equipment and computer storage medium
CN112667498B (en) Server building method, device, computer equipment and readable storage medium
CN113760631B (en) Page loading time length determining method, device, equipment and storage medium
CN114579499A (en) Control method, device, equipment and storage medium of processor communication interface
CN114385493A (en) Performance test method and device, electronic equipment and storage medium
AU2021204623A1 (en) Game state detection and configuration updating method and apparatus, device and storage medium
CN113886164A (en) Bluetooth product testing method and device and electronic equipment
CN110309000B (en) Application update prompting method and terminal equipment
CN114579198B (en) Memory chip starting method and device, computer equipment and storage medium
CN113157596A (en) Automatic testing method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211001

RJ01 Rejection of invention patent application after publication