CN112822710B - Working method for capturing wireless communication data by multiple devices with single wireless network card - Google Patents

Working method for capturing wireless communication data by multiple devices with single wireless network card Download PDF

Info

Publication number
CN112822710B
CN112822710B CN202011642107.8A CN202011642107A CN112822710B CN 112822710 B CN112822710 B CN 112822710B CN 202011642107 A CN202011642107 A CN 202011642107A CN 112822710 B CN112822710 B CN 112822710B
Authority
CN
China
Prior art keywords
wireless network
network card
monitoring
channel
equipment
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
CN202011642107.8A
Other languages
Chinese (zh)
Other versions
CN112822710A (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.)
Sichuan Yingdesaike Technology Co ltd
Original Assignee
Sichuan Yingdesaike 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 Sichuan Yingdesaike Technology Co ltd filed Critical Sichuan Yingdesaike Technology Co ltd
Priority to CN202011642107.8A priority Critical patent/CN112822710B/en
Publication of CN112822710A publication Critical patent/CN112822710A/en
Application granted granted Critical
Publication of CN112822710B publication Critical patent/CN112822710B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/52Allocation or scheduling criteria for wireless resources based on load

Landscapes

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

Abstract

The invention provides a working method for a plurality of devices with a single wireless network card to capture wireless communication data, which comprises the following steps: setting an initial monitoring working mode of a wireless network card of each device as a monitoring working mode 1, setting the device to which the wireless network card belongs as a reference device and adjusting the wireless network card monitoring working mode to a monitoring working mode 2 when a wireless hotspot exists on a monitored Wi-Fi channel, and synchronizing/broadcasting the fixed monitoring specified Wi-Fi channel and the operation load of the reference device to other devices; and the other equipment judges whether the monitoring working mode of the wireless network card of the equipment needs to be adjusted to be a monitoring working mode 2 according to the monitoring working mode of the wireless network card of the equipment, the monitored Wi-Fi channel and the running load of the equipment. According to the invention, through the coordination and coordination of the wireless network cards of the multiple devices, not only is the circulation monitoring of the Wi-Fi channel ensured, but also the wireless communication data capturing the Wi-Fi channel where the wireless hotspot is located is ensured not to lose packet as much as possible.

Description

Working method for carrying out wireless communication data capture on multiple devices with single wireless network card
Technical Field
The invention relates to the field of communication, in particular to a working method for carrying out wireless communication data capture on multiple devices with a single wireless network card.
Background
The working frequency bands of Wi-Fi are divided into 2.4GHz and 5 GHz. The working frequency of the 2.4G frequency band is 2.402-2.483GHz, and is divided into 14 channels, and China (excluding Taiwan province) uses the first 13 channels; the operating frequency of the 5G band is 5.170-5.835GHz, and is divided into 24 channels, and 13 channels are used in china (excluding hong kong, australia, taiwan). Currently, the mainstream wireless Wi-Fi network equipment uses 802.11a/b/g/n/ac protocol, and generally supports 13 channels regardless of 802.11b/g or 802.11a/b/g/n/ac, namely, 26 available channels in total. A Channel, also called a Channel, a frequency band, is a data signal transmission Channel that uses radio signals (electromagnetic waves) as a transmission carrier. The channel overlapping can cause mutual interference among wireless routes, further influences wireless transmission quality, and the automatic channel selection function enables a wireless hotspot to automatically set an optimal working channel according to the surrounding wireless environment, thereby effectively avoiding same frequency interference/competition. A wireless network (wireless hotspot, wireless network card) may operate on multiple channels. Various wireless network devices within the coverage area of a wireless signal should try to use different channels to avoid interference between the signals. Therefore, in an actual working environment, the wireless channel used by the wireless hotspot is unpredictable, and therefore, the wireless channel used by the wireless network card accessing the wireless hotspot is also unpredictable.
To monitor which wireless hotspots exist in the environment, a polling method for the Wi-Fi channel is generally adopted for monitoring. Due to business needs, in a specific working scene, wireless communication data on a wireless channel used by a certain detected wireless hotspot needs to be captured without losing packets for a long time besides the wireless hotspot existing in a working place needs to be continuously monitored.
Currently, only a single wireless network card is usually included in the devices. The method can ensure that wireless hotspots exist in a workplace can be continuously monitored, but because the wireless network card continuously switches channels, wireless communication data on other channels can be lost when the wireless network card is switched to a certain channel, equipment with only one wireless network card cannot keep seamless monitoring on an uncertain wireless channel, and the requirement of grabbing the wireless communication data on the wireless channel used by a certain wireless hotspot without losing packets for a long time cannot be met.
In summary, in one working environment, although two or more same devices with a single wireless network card are deployed, the devices cannot cooperate with each other because of no interaction mechanism, or do not cooperate with each other in wireless monitoring and capturing wireless communication data despite of an interaction mechanism, and the requirement of capturing wireless communication data on a wireless channel used by a certain wireless hotspot without losing packets for a long time cannot be met.
Disclosure of Invention
The invention aims to provide a working method for grabbing wireless communication data by a plurality of devices with a single wireless network card, which aims to solve the problem that the wireless communication data on a wireless channel used by a certain wireless hotspot cannot be grabbed for a long time without losing packets at present.
The invention provides a working method for a plurality of devices with a single wireless network card to capture wireless communication data, wherein the plurality of devices with the single wireless network card are in the same working environment, and each device is provided with the single wireless network card, and the working method comprises the following steps:
step S1, each device sets the initial monitoring working mode of its own wireless network card as monitoring working mode 1; the monitoring working mode of the wireless network card of each piece of equipment is as follows: the monitoring working mode 1 is to uninterruptedly cut frequency, scan and monitor all Wi-Fi channels; the monitoring work mode 2 is that the designated Wi-Fi channel is fixedly monitored and the designated Wi-Fi channel is subjected to packet capturing work; the wireless network card of at least one device in all the devices works in a monitoring working mode 1;
step S2, once the wireless network card of any one device finds that at least one wireless hotspot exists on the monitored Wi-Fi channel, the device to which the wireless network card belongs is set as a reference device, the monitoring working mode of the wireless network card of the reference device is adjusted to be a monitoring working mode 2, and then the wireless network card of the reference device is fixedly monitored on the specified Wi-Fi channel and the device information of the reference device is synchronized/broadcasted to other devices in the same working environment; the equipment information comprises an operation load and an equipment number;
step S3, after receiving the Wi-Fi channel specified by the fixed monitoring of the wireless network card of the reference device and the device information of the reference device, each of the other devices determines whether the monitoring mode of the wireless network card of the device itself needs to be adjusted to the monitoring mode 2 according to the monitoring mode of the wireless network card of the device itself, the monitored Wi-Fi channel, and the device information of the device itself.
Further, the step S3 includes the following sub-steps:
step S31, after receiving the Wi-Fi channel and the reference equipment information which are fixed and monitored by the wireless network card of the reference equipment, each other equipment firstly checks the monitoring working mode of the wireless network card of the self equipment;
step S32, when the monitoring working mode of the wireless network card of the self device is the monitoring working mode 1, the monitoring working mode of the wireless network card is kept unchanged; when the monitoring working mode of the wireless network card of the self equipment is the monitoring working mode 2, checking whether the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self equipment is the same as the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the reference equipment;
step S33, if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self device is the same as the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the received reference device, comparing whether the running load of the self device is the same as the running load of the received reference device, and continuing to step S34; if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self equipment is different from the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the received reference equipment, the wireless network card of the self equipment keeps the monitoring working mode unchanged;
step S34, if the operation load of the self device is different from the received operation load of the reference device, comparing whether the operation load of the self device is better than the operation load of the reference device, when the operation load of the self device is not better than the operation load of the reference device, adjusting the monitoring working mode of the wireless network card of the self device to be the monitoring working mode 1, and when the operation load of the self device is better than the operation load of the reference device, adjusting the monitoring working mode of the wireless network card of the reference device to be the monitoring working mode 1; if the running load of the self equipment is the same as the running load of the received reference equipment, continuously comparing the equipment numbers of the equipment of the wireless network card to judge whether the monitoring working mode of the wireless network card of the self equipment needs to be kept as a monitoring working mode 2;
and step S35, when the device to which the wireless network card in the monitoring working mode 1 belongs finds that a new wireless hotspot exists on the monitored Wi-Fi channel, returning to step S2 to continue execution.
Further, the operation load of the device includes CPU load and hardware resource consumption.
Further, in step S34, the specific content of continuing to compare the serial numbers of the devices to which the wireless network card belongs to determine whether the monitoring operation mode of the wireless network card of the device itself needs to be kept as the monitoring operation mode 2 is: and the monitoring working mode of the wireless network card corresponding to the equipment with the smaller equipment number in the two pieces of equipment is kept unchanged, and the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment is adjusted to be the monitoring working mode 1.
Further, in step S34, the specific content of continuing to compare the device number of the device to which the wireless network card belongs to determine whether the monitoring operation mode of the wireless network card of the device itself needs to be kept as the monitoring operation mode 2 is: and keeping the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment unchanged, and adjusting the monitoring working mode of the wireless network card corresponding to the equipment with the smaller equipment number in the two pieces of equipment to be the monitoring working mode 1.
Further, if only the wireless network card of one device is left in all the devices to operate in the monitoring operation mode 1, the wireless network card monitoring operation mode of the device remains unchanged, and the newly found Wi-Fi channel message of at least one wireless hotspot is broadcasted/synchronized to the other devices.
Further, when the device to which the wireless network card in the monitoring mode 2 belongs receives other Wi-Fi channels which need to be fixedly monitored and subjected to packet capturing and are sent by the device to which the wireless network card in the monitoring mode 1 belongs, a time-sharing processing mechanism is started for the device to which the wireless network card in the monitoring mode 2 belongs, the Wi-Fi channels are added into a long-time non-packet-loss capturing channel list of the device to which the wireless network card in the monitoring mode 2 belongs, and the monitored Wi-Fi channels and the running load are broadcasted/synchronized to other devices.
Further, the specific content of the time-sharing processing starting mechanism is as follows: and while maintaining the packet capturing processing of the wireless network card, the equipment to which the wireless network card belongs switches the Wi-Fi channel once at intervals of T1 until the sequential traversal of the Wi-Fi channels in the packet capturing channel list is completed without packet loss for a long time, and then the traversal is restarted.
Further, the working method for the plurality of devices with a single wireless network card to capture the wireless communication data further comprises the following steps:
and S4, when the wireless hotspot on the designated Wi-Fi channel which is fixedly monitored disappears and the time that no wireless hotspot exists on the Wi-Fi channel exceeds the preset time T2, adjusting the monitoring working mode of the wireless network card which is fixedly monitored on the designated Wi-Fi channel to be the monitoring working mode 1.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
1. according to the invention, through coordination and coordination among the single wireless network cards of the multiple devices, not only is the circulation monitoring of the Wi-Fi channel ensured, but also the wireless communication data which are used for capturing the Wi-Fi channel where the wireless hotspot is located for a long time as much as possible is ensured not to lose packets;
2. the invention ensures the optimal selection of resource utilization among devices through an election mechanism based on the operation load, namely, the wireless communication data is grabbed and selected from the devices with the minimum load and the maximum residual resources;
3. the invention combines the election mechanism of the number of the equipment, so that the monitoring working modes of the two equipment can be rapidly configured when the running loads of the two equipment are completely the same.
4. The invention further ensures that the wireless communication data does not lose packet through a time-sharing processing mechanism.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope, and it is obvious for those skilled in the art that other related drawings can be obtained according to these drawings without inventive efforts.
Fig. 1 is a flowchart of a working method for performing wireless communication data capture by multiple devices having a single wireless network card according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating step S3 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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.
Examples
As shown in fig. 1, in this embodiment, a working method for performing wireless communication data capture by multiple devices with a single wireless network card is provided, where the multiple devices with a single wireless network card are in the same working environment, and each device is provided with a single wireless network card, in this embodiment, the numbers of the multiple devices in the same working environment are Dev _1, Dev _2, and. The working method comprises the following steps:
s1, each device sets the initial monitoring mode of its own wireless network card as monitoring mode 1; in this embodiment, the monitoring operation modes of the wireless network card of each device are divided into the following two types:
the monitoring work mode 1 is to uninterruptedly cut frequency, scan and monitor all Wi-Fi channels; in the embodiment, all the wireless network cards of all the devices quickly scan all the Wi-Fi channels at a time interval of 200ms staying on each Wi-Fi channel; the Wi-Fi has 26 channels, and the scanning period of each wireless network card is set to be 5.2 s;
the monitoring work mode 2 is that the designated Wi-Fi channel is fixedly monitored and the designated Wi-Fi channel is subjected to packet capturing work;
in addition, the wireless network card of at least one device in all the devices works in a monitoring working mode 1 so as to ensure that at least one wireless network card uninterruptedly switches frequency to scan all Wi-Fi channels required to be monitored;
s2, once a wireless network card Wi-Fi _ i (i belongs to [1, n ]) of any one device Dev _ i finds that at least one wireless hotspot exists on a monitored Wi-Fi channel _ j (j belongs to [1,26 ]), the device Dev _ i of the wireless network card Wi-Fi _ i is set as a reference device and the monitoring working mode of the wireless network card of the reference device is adjusted to be a monitoring working mode 2, namely the wireless network card Wi-Fi _ i is monitored on a specified Wi-Fi channel _ j by a fixed Wi, then packet grabbing processing aiming at the wireless network card Wi-Fi _ i is started, and long-time non-packet loss grabbing of wireless communication data on the Wi-Fi channel _ j used by the wireless hotspot is realized by using the wireless network card Wi-Fi _ i; then, the wireless network card Wi-Fi _ i of the reference equipment is fixedly monitored, the specified Wi-Fi channel _ j is appointed, and the equipment information of the reference equipment Dev _ i is synchronized/broadcasted to other equipment in the same working environment; the equipment information comprises an operation load and an equipment number; in this embodiment, a wireless network card Wi-Fi _ i (i e [1, n ]) of any device Dev _ i finds a Wi-Fi channel having at least one wireless hotspot and captures a channel list for storage by not losing packets for a long time.
S3, after receiving the Wi-Fi channel _ j designated by the fixed monitoring of the wireless network card Wi-Fi _ i of the reference device and the device information of the reference device Dev _ i, each of the other devices judges whether the monitoring mode of the wireless network card of the device needs to be adjusted to be the monitoring mode 2 according to the monitoring mode of the wireless network card of the device, the monitored Wi-Fi channel and the device information of the device. Referring to fig. 2, the step S3 includes the following sub-steps:
step S31, after each other device receives the fixed monitoring of the designated Wi-Fi channel _ j of the wireless network card Wi-Fi _ i of the reference device and the device information of the reference device Dev _ i, the monitoring working mode of the wireless network card of the device is checked;
step S32, when the monitoring working mode of the wireless network card of the self device is the monitoring working mode 1, the monitoring working mode of the wireless network card is kept unchanged; when the monitoring working mode of the wireless network card of the self equipment is the monitoring working mode 2, checking whether the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self equipment is the same as the Wi-Fi channel _ j appointed by the fixed monitoring of the wireless network card of the received reference equipment Dev _ i;
step S33, if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self device is the same as the Wi-Fi channel appointed by the fixed monitoring of the wireless network card Wi-Fi _ i of the received reference device, comparing whether the running load of the self device is the same as the running load of the received reference device Dev _ i, and continuing to step S34; if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self equipment is different from the Wi-Fi channel _ j appointed by the fixed monitoring of the wireless network card Wi-Fi _ i of the received reference equipment, the wireless network card of the self equipment keeps the monitoring working mode unchanged;
step S34, if the operation load of the self device is different from the received operation load of the reference device Dev _ i, comparing whether the operation load of the self device is better than the operation load of the reference device Dev _ i, when the operation load of the self device is not better than the operation load of the reference device Dev _ i, adjusting the monitoring operation mode of the wireless network card of the self device to the monitoring operation mode 1, and when the operation load of the self device is better than the operation load of the reference device Dev _ i, adjusting the monitoring operation mode of the wireless network card Wi-Fi _ i of the reference device to the monitoring operation mode 1; if the running load of the self device is the same as the running load of the received reference device Dev _ i, continuously comparing the device numbers of the devices belonging to the wireless network card to judge whether the monitoring working mode of the wireless network card of the self device needs to be kept as a monitoring working mode 2;
and step S35, when the device to which the wireless network card in the monitoring working mode 1 belongs finds that a new wireless hotspot exists on the monitored Wi-Fi channel, returning to the step S2 to continue execution.
In one embodiment, the operational load of the device includes CPU load and hardware resource consumption. That is, the comparison of whether the operation load of the own device is better than the operation load of the reference device Dev _ i in step S34 means whether the CPU load and the hardware resource consumption situation of the own device are better than those of the reference device:
(1) when the CPU load of the own device is lower and the available hardware resources are more than that of the reference device Dev _ i, it indicates that the operation load of the own device is better than that of the reference device Dev _ i;
(2) when the CPU load of the self device is higher and the available hardware resources are less than that of the reference device Dev _ i, it indicates that the operation load of the reference device Dev _ i is not better than that of the self device;
(3) when the CPU load and hardware resource consumption of the own device and the reference device Dev _ i are the same, it indicates that the operating load of the own device and the reference device Dev _ i is the same.
That is to say, in this embodiment, the wireless network cards of two devices are allocated according to the CPU load and the available hardware resources in the actual working condition, generally, the wireless network card that operates in the monitoring working mode 2 needs a higher CPU load and more hardware resources, and therefore, the wireless network card that operates in the monitoring working mode 2 on a device with a lower CPU load and more available hardware resources is preferably used in this embodiment. Therefore, through an election mechanism based on the operation load, the optimal selection of resource utilization among the devices is guaranteed, namely the wireless communication data is grabbed and selected to be carried out on the device with the minimum operation load and the maximum residual hardware resources.
In some embodiments, in step S34, the specific content that the monitoring operation mode of the wireless network card of the own device needs to be maintained as the monitoring operation mode 2 by continuously comparing the device numbers of the devices of the wireless network card may be as follows:
(1) keeping the monitoring working mode of the wireless network card corresponding to the equipment with smaller equipment number in the two pieces of equipment unchanged, and adjusting the monitoring working mode of the wireless network card corresponding to the equipment with larger equipment number in the two pieces of equipment to be a monitoring working mode 1;
(2) the monitoring working mode of the wireless network card corresponding to the device with the larger device number in the two devices is kept unchanged, and the monitoring working mode of the wireless network card corresponding to the device with the smaller device number in the two devices is adjusted to be the monitoring working mode 1.
The two modes are determined according to the numbering condition of the equipment in practical application, and the monitoring working modes of the two equipment can be rapidly configured when the running loads of the two equipment are completely the same through equipment numbering.
In some embodiments, if only one wireless network card of the remaining devices in all the devices operates in the monitoring operation mode 1, the wireless network card monitoring operation mode of the device remains unchanged, and the newly found Wi-Fi channel message of at least one wireless hotspot is broadcasted/synchronized to the rest of the devices.
When the device to which the wireless network card belongs in the monitoring working mode 2 receives other new Wi-Fi channels which need to be fixedly monitored and subjected to packet grabbing and are sent by the device to which the wireless network card belongs in the monitoring working mode 1, a time-sharing processing mechanism is started for the device to which the wireless network card belongs in the monitoring working mode 2, the Wi-Fi channels are added into a long-time packet-loss-free grabbing channel list of the device to which the wireless network card belongs in the monitoring working mode 2, and the monitored Wi-Fi channels and running loads are broadcasted/synchronized to other devices.
And setting one of the devices which are in the monitoring working mode 2 and to which the wireless network card for fixedly monitoring the new Wi-Fi channel is added as a new reference device, and comparing the Wi-Fi channel and the running load which are fixedly monitored by the new reference device with each other by the other devices to determine whether the device quits the fixed monitoring of the new Wi-Fi channel, wherein the device which does not quit the fixed monitoring of the new Wi-Fi channel continues to execute a time-sharing processing mechanism. The specific process of pairwise comparison between the Wi-Fi channel and the operation load which are fixedly monitored by the other equipment and received by the new reference equipment is the same as the steps 2 and 3.
If the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self equipment is different from the channel appointed by the fixed monitoring of the wireless network card of the received new reference equipment, keeping the channel appointed by the fixed monitoring of the wireless network card of the self equipment unchanged. If the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self equipment is the same as the channel appointed by the fixed monitoring of the wireless network card of the received new reference equipment, comparing whether the running load of the self equipment is the same as the running load of the received new reference equipment, if the running load of the self equipment is different from the running load of the received reference equipment, comparing whether the running load of the self equipment is superior to the running load of the new reference equipment, quitting the fixed monitoring of the new Wi-Fi channel by the self equipment when the running load of the self equipment is not superior to the running load of the new reference equipment, and quitting the fixed monitoring of the new Wi-Fi channel by the new reference equipment when the running load of the self equipment is superior to the running load of the new reference equipment; and when the running load of the self equipment is the same as that of the new reference equipment, comparing the numbers of the self equipment and the new reference equipment to judge whether the equipment needs to quit the fixed monitoring of the new Wi-Fi channel. The specific content of the time-sharing processing mechanism is as follows:
and while maintaining the packet capturing processing of the wireless network card, switching the Wi-Fi channels once every T1 (preferably, the value range of T1 is 15-30 min) until the Wi-Fi channels in the packet-loss-free capturing channel list traverse in sequence for a long time, and then restarting the traversal.
Compared with the monitoring working mode 1, the channel switching speed of the time-sharing processing mechanism is very slow, and wireless communication data can be ensured to have no packet loss within 15-30 minutes at least. Therefore, the invention further ensures that the wireless communication data does not lose the packet through the time-sharing processing mechanism.
In some embodiments, the method for performing wireless communication data capture by multiple devices with a single wireless network card further includes the following steps:
and S4, when the wireless hotspot on the designated Wi-Fi channel disappears and the time that no wireless hotspot exists on the Wi-Fi channel exceeds the preset time T2 (preferably, the value range of T2 is 5-10 min), adjusting the monitoring working mode of the wireless network card of the designated Wi-Fi channel to be the monitoring working mode 1. Broadcasting or synchronizing the Wi-Fi channel which is fixedly monitored to other equipment, comparing the Wi-Fi channel which is fixedly monitored and received by the equipment which belongs to the wireless network card in the monitoring working mode 1 with a long-time non-packet-loss grabbing channel list of the self equipment, and if the Wi-Fi channel which is fixedly monitored exists, rejecting the Wi-Fi channel which is fixedly monitored. If the Wi-Fi channel with at least one wireless hotspot is stored in the long-time packet loss-free grabbing channel list, when the wireless hotspot on the Wi-Fi channel _ j which is fixedly monitored is judged to disappear and no wireless hotspot exists on the Wi-Fi channel _ j, the Wi-Fi channel _ j is removed from the long-time packet loss-free grabbing channel list. The step prevents the situation that the wireless hotspot on the fixed monitoring appointed Wi-Fi channel temporarily disappears due to reasons such as bad signals by setting the preset time T2, so that the effect of capturing the wireless communication data of the Wi-Fi channel where the wireless hotspot is located without losing packets is achieved.
According to the content, the wireless network cards of the multiple devices are coordinated, so that the circulating monitoring of the Wi-Fi channel is guaranteed, and the wireless communication data of the Wi-Fi channel where the wireless hot spot is located is grabbed as much as possible without losing packets.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A working method for a plurality of devices with a single wireless network card to capture wireless communication data is provided, wherein the plurality of devices with the single wireless network card are in the same working environment and each device is provided with the single wireless network card, and the working method is characterized by comprising the following steps:
step S1, each device sets the initial monitoring mode of its own wireless network card as monitoring mode 1; the monitoring mode of the wireless network card of each device is divided into: the monitoring working mode 1 is to uninterruptedly cut frequency, scan and monitor all Wi-Fi channels; the monitoring working mode 2 is that the designated Wi-Fi channel is fixedly monitored and the designated Wi-Fi channel is subjected to packet grabbing work; the wireless network card of at least one device in all the devices works in a monitoring working mode 1;
step S2, once the wireless network card of any one device finds that at least one wireless hotspot exists on the monitored Wi-Fi channel, the device to which the wireless network card belongs is set as a reference device, the monitoring working mode of the wireless network card of the reference device is adjusted to be a monitoring working mode 2, and then the wireless network card of the reference device is fixedly monitored on the specified Wi-Fi channel and the device information of the reference device is synchronized/broadcasted to other devices in the same working environment; the equipment information comprises an operation load and an equipment number;
step S3, after receiving the Wi-Fi channel specified by the fixed monitoring of the wireless network card of the reference device and the device information of the reference device, each of the other devices determines whether the monitoring mode of the wireless network card of the device itself needs to be maintained as the monitoring mode 2 according to the monitoring mode of the wireless network card of the device itself, the monitored Wi-Fi channel, and the device information of the device itself.
2. The method for performing wireless communication data capturing operation on multiple devices with a single wireless network card according to claim 1, wherein the step S3 includes the following sub-steps:
step S31, after each of the other devices receives the Wi-Fi channel and the reference device information which are fixed and monitored by the wireless network card of the reference device, the monitoring working mode of the wireless network card of the device is checked;
step S32, when the monitoring working mode of the wireless network card of the self device is the monitoring working mode 1, the monitoring working mode of the wireless network card is kept unchanged; when the monitoring working mode of the wireless network card of the self equipment is the monitoring working mode 2, checking whether the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self equipment is the same as the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the reference equipment;
step S33, if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self device is the same as the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the received reference device, comparing whether the running load of the self device is the same as the running load of the received reference device, and continuing to step S34; if the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the self equipment is different from the Wi-Fi channel appointed by the fixed monitoring of the wireless network card of the received reference equipment, the wireless network card of the self equipment keeps the monitoring working mode unchanged;
step S34, if the operation load of the self device is different from the received operation load of the reference device, comparing whether the operation load of the self device is better than the operation load of the reference device, when the operation load of the self device is not better than the operation load of the reference device, adjusting the monitoring working mode of the wireless network card of the self device to be the monitoring working mode 1, and when the operation load of the self device is better than the operation load of the reference device, adjusting the monitoring working mode of the wireless network card of the reference device to be the monitoring working mode 1; if the running load of the self equipment is the same as the running load of the received reference equipment, continuously comparing the equipment number of the equipment of the wireless network card to judge whether the monitoring working mode of the wireless network card of the self equipment needs to be kept as a monitoring working mode 2;
and step S35, when the device to which the wireless network card in the monitoring working mode 1 belongs finds that a new wireless hotspot exists on the monitored Wi-Fi channel, returning to step S2 to continue execution.
3. The method as claimed in claim 2, wherein the operating loads of the devices include CPU load and hardware resource consumption.
4. The method for capturing wireless communication data by multiple devices having a single wireless network card according to claim 2, wherein the specific content that the number of the device to which the wireless network card belongs is continuously compared to determine whether the monitoring operation mode of the wireless network card of the device itself needs to be maintained as the monitoring operation mode 2 in step S34 is as follows: and the monitoring working mode of the wireless network card corresponding to the equipment with the smaller equipment number in the two pieces of equipment is kept unchanged, and the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment is adjusted to be the monitoring working mode 1.
5. The method of claim 2, wherein in step S34, the specific content of continuing to compare the device numbers of the devices to which the wireless network card belongs to determine whether the monitoring operation mode of the wireless network card of the device itself needs to be kept as the monitoring operation mode 2 is: and keeping the monitoring working mode of the wireless network card corresponding to the equipment with the larger equipment number in the two pieces of equipment unchanged, and adjusting the monitoring working mode of the wireless network card corresponding to the equipment with the smaller equipment number in the two pieces of equipment to be the monitoring working mode 1.
6. The method as claimed in claim 1, wherein if only one of the wireless network cards of the remaining devices is in the monitoring mode 1, the monitoring mode of the wireless network card of the remaining device remains unchanged, and the newly discovered Wi-Fi channel message of the at least one wireless hotspot is broadcasted/synchronized to the remaining devices.
7. The method as claimed in claim 6, wherein when the device to which the wireless network card belongs in the monitoring mode 2 receives another Wi-Fi channel that needs to be monitored fixedly and processed for packet capturing and is sent by the device to which the wireless network card belongs in the monitoring mode 1, the device to which the wireless network card belongs in the monitoring mode 2 starts a time-sharing processing mechanism, adds the Wi-Fi channel to the long-time non-packet-loss capturing channel list of the device to which the wireless network card belongs in the monitoring mode 2, and broadcasts/synchronizes the monitored Wi-Fi channel and the operating load to the other devices.
8. The method of claim 7, wherein the time-sharing processing mechanism is started by using the following specific content: and while keeping the packet capturing processing of the wireless network card, switching the Wi-Fi channel by the equipment of the wireless network card at intervals of T1 until the Wi-Fi channels in the packet-loss-free capturing channel list are traversed in sequence for a long time, and then restarting traversing.
9. The method for operating the grabbing of the wireless communication data by the multiple devices with the single wireless network card according to any one of claims 1 to 8, wherein the operating method further comprises the following steps:
s4, when the wireless hotspot on the fixed monitoring appointed Wi-Fi channel disappears and the time that no wireless hotspot exists on the Wi-Fi channel exceeds the preset time T2, the monitoring working mode of the wireless network card of the fixed monitoring appointed Wi-Fi channel is adjusted to be the monitoring working mode 1.
CN202011642107.8A 2020-12-31 2020-12-31 Working method for capturing wireless communication data by multiple devices with single wireless network card Active CN112822710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011642107.8A CN112822710B (en) 2020-12-31 2020-12-31 Working method for capturing wireless communication data by multiple devices with single wireless network card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011642107.8A CN112822710B (en) 2020-12-31 2020-12-31 Working method for capturing wireless communication data by multiple devices with single wireless network card

Publications (2)

Publication Number Publication Date
CN112822710A CN112822710A (en) 2021-05-18
CN112822710B true CN112822710B (en) 2022-07-22

Family

ID=75858229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011642107.8A Active CN112822710B (en) 2020-12-31 2020-12-31 Working method for capturing wireless communication data by multiple devices with single wireless network card

Country Status (1)

Country Link
CN (1) CN112822710B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686813A (en) * 2013-12-20 2014-03-26 上海斐讯数据通信技术有限公司 Device and method for testing automatic switching stability of wireless AP (access point) channels
CN104349339A (en) * 2013-07-26 2015-02-11 中国科学院信息工程研究所 Collection device of mobile intelligent terminal Wi-Fi signal data package, method thereof and system thereof
CN104469914A (en) * 2014-12-10 2015-03-25 宇龙计算机通信科技(深圳)有限公司 Channel detection method and system, base station and terminal
CN104703210A (en) * 2015-03-23 2015-06-10 北京邮电大学 Method of interference rejection and information transmission in heterogeneous network
CN105392180A (en) * 2015-10-20 2016-03-09 广东欧珀移动通信有限公司 Intelligent equipment networking method and device, and system
CN105764117A (en) * 2016-04-12 2016-07-13 广东欧珀移动通信有限公司 Method and device for accessing network
WO2016119302A1 (en) * 2015-01-28 2016-08-04 宇龙计算机通信科技(深圳)有限公司 Channel detection method, channel detection system, base station, and terminal
CN111873824A (en) * 2020-08-12 2020-11-03 福州市长乐区欧斯威电子科技有限公司 Electric vehicle charging device capable of preventing vehicle from being dragged

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101869292B1 (en) * 2014-02-27 2018-07-20 삼성전자주식회사 Method for setting communication channel of device, method for setting communication channel between a plurality of devices, and device
US9219986B2 (en) * 2014-04-22 2015-12-22 Cisco Technology, Inc. Client device location using synchronized wireless receivers
US9973969B2 (en) * 2015-09-25 2018-05-15 Qualcomm Incorporated Dynamic frequency selection channel scan optimizations
US10291755B2 (en) * 2017-07-14 2019-05-14 Silicon Laboratories Inc. Systems and methods for adaptive scanning and/or advertising
US20190037460A1 (en) * 2017-07-27 2019-01-31 Qualcomm Incorporated Methods and systems for channel switching in a wireless communication system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104349339A (en) * 2013-07-26 2015-02-11 中国科学院信息工程研究所 Collection device of mobile intelligent terminal Wi-Fi signal data package, method thereof and system thereof
CN103686813A (en) * 2013-12-20 2014-03-26 上海斐讯数据通信技术有限公司 Device and method for testing automatic switching stability of wireless AP (access point) channels
CN104469914A (en) * 2014-12-10 2015-03-25 宇龙计算机通信科技(深圳)有限公司 Channel detection method and system, base station and terminal
WO2016119302A1 (en) * 2015-01-28 2016-08-04 宇龙计算机通信科技(深圳)有限公司 Channel detection method, channel detection system, base station, and terminal
CN104703210A (en) * 2015-03-23 2015-06-10 北京邮电大学 Method of interference rejection and information transmission in heterogeneous network
CN105392180A (en) * 2015-10-20 2016-03-09 广东欧珀移动通信有限公司 Intelligent equipment networking method and device, and system
CN105764117A (en) * 2016-04-12 2016-07-13 广东欧珀移动通信有限公司 Method and device for accessing network
CN111873824A (en) * 2020-08-12 2020-11-03 福州市长乐区欧斯威电子科技有限公司 Electric vehicle charging device capable of preventing vehicle from being dragged

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LAA信道检测机制研究与仿真;邓一伟等;《移动通信》;20151130(第22期);全文 *
无线网络协作MAC机制;李云等;《软件学报》;20101105(第01期);全文 *

Also Published As

Publication number Publication date
CN112822710A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
KR101838842B1 (en) An access node, a communication device, respective method performed thereby for carrier hopping
DE112013002851B4 (en) RF chain management in a carrier aggregation capable wireless communication device
JP6812631B2 (en) Spectral resource allocation method and equipment for complete spectrum sharing
CN110636569A (en) Cell reselection method, reselection parameter sending method, terminal and network equipment
CN108541022B (en) Method and device for realizing network load balance
DE102015201432B4 (en) Methods and devices for communication in unlicensed radio frequency bands by mobile wireless devices
JP5622311B2 (en) Frequency sharing type cognitive radio communication system and method, cognitive radio base station
WO2014177037A1 (en) Method, system and device for cell reselection
CN113382448B (en) Adjacent cell selection method under shared network, terminal equipment and communication system
CN112822710B (en) Working method for capturing wireless communication data by multiple devices with single wireless network card
CN108156609B (en) Cell merging and splitting method, device and base station
WO2024017123A1 (en) Cell selection method and apparatus, and terminal device and readable storage medium
CN112822709B (en) Working method for carrying out wireless communication data capture on multiple devices with multiple wireless network cards
US20230224788A1 (en) Cell selection and reselection method, apparatus, terminal, and readable storage medium
WO2023125234A1 (en) Cell selection or reselection method and apparatus, terminal, and readable storage medium
CN103152801B (en) The method and apparatus being connected is set up with wireless access device
CN112822708B (en) Method and equipment for capturing wireless communication data by using multiple wireless network cards
CN114339964B (en) Connection establishment method, device, equipment and storage medium
JP2024518516A (en) METHOD FOR DETERMINING MEASUREMENT GAP, TERMINAL AND NETWORK SIDE DEVICE
CN114125968A (en) Method and device for switching wireless access point of wireless terminal
US11153761B2 (en) Spectrum management for coexistence of heterogeneous wireless technologies
US11510210B2 (en) Flexible radio assignment for multi-link capable access points
CN114339950B (en) Configuration method and device, terminal and network side equipment
CN113708861B (en) UE baseband combining prediction method, system, equipment and storage medium
EP4262283A1 (en) Communication 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
GR01 Patent grant
GR01 Patent grant