AP equipment debugging diagnosis method and device based on EAPOL message

By using custom-type EAPOL packets to deliver diagnostic instructions and results in the WPA/WPA2 authentication process of AP devices, the problem of AP device debugging requires one-by-one authentication and hot passwords in the prior art is solved, and active diagnostic debugging without passwords is realized, which improves efficiency and flexibility.

CN119907031AActive Publication Date: 2025-04-29GUANGZHOU TOZED KANGWEI INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510071131.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-04-29
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

In the prior art, debugging multiple AP devices requires authentication and access one by one, and it is necessary to know the hotspot password of each device, which is inefficient and cannot actively diagnose and debug through the STA device.

Method used

The AP device debugging and diagnosis method based on EAPOL packets is adopted, and the WPA/WPA2 authentication process is used to pass diagnostic instructions and results in the four handshake process using custom-type EAPOL packets to realize active diagnosis and debugging of AP devices without passwords.

Benefits of technology

Without entering a hot password or changing the underlying code, you can actively obtain the diagnostic debugging results of the AP device, improving debugging efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119907031A_ABST
    Figure CN119907031A_ABST
Patent Text Reader

Abstract

The invention discloses an EAPOL message-based AP (Access Point) equipment debugging diagnosis method and an EAPOL message-based AP equipment debugging diagnosis device. The method comprises the following steps: when a first association request sent by first STA equipment is received, establishing association with the first STA equipment, and returning a first message to the first STA equipment; when a first EAPOL message returned by the first STA device according to the first message is received within a first preset time, analyzing the first EAPOL message, and obtaining a first MAC address of the first STA device; when a first diagnosis instruction is analyzed and obtained from the first EAPOL message, generating a second EAPOL message according to the first diagnosis instruction; and returning the second EAPOL message to the corresponding STA equipment according to the first MAC address, so that the first STA equipment analyzes the second EAPOL message to obtain a first diagnosis result. According to the method and the device, the AP equipment can be actively debugged and diagnosed without inputting a hotspot password into the AP equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communications, and in particular to an AP device debugging and diagnosis method and device based on EAPOL messages. Background Art

[0002] When debugging multiple AP (Access Point) devices, wireless connection is usually used for debugging.

[0003] In the prior art, technicians are usually required to use STA (Station) equipment to authenticate each AP device’s SSID (Service Set Identifier) ​​and password one by one to access the corresponding AP device, and then log in to the management webpage to view and debug the device. Or, custom data is added to the broadcast beacon frame of the wireless signal so that the AP device can periodically broadcast the device status. The first method mentioned above requires recording a large number of hotspot passwords. When the hotspot password of the AP device is unknown, this method cannot be used to diagnose the AP device, so it is inefficient. The second method relies on the manufacturer of the wireless communication chip to provide the underlying related API interface, and it is highly passive, and it is impossible to actively debug the AP device through STA.

[0004] Therefore, how to actively diagnose and debug AP devices through STA devices without a password is a technical problem that needs to be solved at present. Summary of the invention

[0005] The present application provides an AP device debugging and diagnosis method and apparatus based on EAPOL messages to solve the technical problem of how to actively diagnose and debug an AP device through a STA device without requiring a password.

[0006] In order to solve the above technical problems, in a first aspect, an embodiment of the present application provides an AP device debugging and diagnostic method based on EAPOL messages, which is applied to an AP device. The debugging and diagnostic method adopts a WPA / WPA2 authentication process, including:

[0007] When receiving a first association request sent by a first STA device, establishing an association with the first STA device, and returning a first message to the first STA device;

[0008] When a first EAPOL message returned by the first STA device according to the first message is received within a first preset time, the first EAPOL message is parsed to obtain a first MAC address of the first STA device; the first EAPOL message is an EAPOL message of a first self-defined type;

[0009] When a first diagnostic instruction is obtained by parsing the first EAPOL message, generating a second EAPOL message according to the first diagnostic instruction;

[0010] According to the first MAC address, the second EAPOL message is returned to the corresponding first STA device, so that the first STA device parses the second EAPOL message to obtain a first diagnostic result; the second EAPOL message is an EAPOL message of a first self-defined type.

[0011] Compared with the prior art, the embodiment of the present application has the following beneficial effects: in the standard WPA / WPA2 authentication process between the STA device and the AP device, after the STA device is associated with the AP device, a further four-way handshake authentication process is required to establish a connection between the two devices. In the standard four-way handshake process, after the AP device sends the first message (i.e., Message 1) to the STA device, the STA device should generate Message 2 according to the hotspot password and return Message 2 to the AP device until the complete four-way handshake process is completed. Therefore, in order to avoid using the hotspot password, the Message 2 generated according to the hotspot password is replaced with an EAPOL message of the first custom type, so that the first EAPOL message sent by the first STA device contains a diagnostic instruction. After the first AP device parses and obtains the diagnostic instruction from the first EAPOL message, it automatically executes the diagnostic process and obtains the first diagnostic result, so that the diagnostic debugging result of the first AP device can be actively obtained without the need to enter the tedious hotspot password or change the code from the bottom layer.

[0012] In some embodiments of the first aspect of the present application, the EAPOL message of the first self-defined type includes: first self-defined data and a first preset index value of the EAPOL message of the first self-defined type;

[0013] The first custom data includes: first data content and the type of the first data content; the first data content includes any one of the first diagnostic instruction or the first diagnostic result.

[0014] Compared with the prior art, the above embodiment has the following beneficial effects: by adding a first preset index value with an identification function in the EAPOL message of the first custom type, the first AP device can accurately identify the function of the data carried in the currently received EAPOL message during the second handshake, so that the corresponding first diagnostic instruction can be executed according to the first custom data to generate a diagnostic result, and the diagnostic result of the first AP device can be obtained after establishing a connection communication through a hotspot password.

[0015] In some embodiments of the first aspect of the present application, when the first diagnostic instruction is parsed and obtained from the first EAPOL message, generating a second EAPOL message according to the first diagnostic instruction includes:

[0016] When the first preset index value can be parsed from the first EAPOL message, and the first data content is determined to be the first diagnostic instruction according to the type of the first data content, a diagnostic operation is performed according to the first diagnosis to obtain a first diagnostic result;

[0017] Encapsulate the first diagnosis result into the EAPOL message of the first user-defined type to generate the second EAPOL message.

[0018] Compared with the prior art, the above embodiment has the following beneficial effects: when the first preset index value is parsed from the first EAPOL message, it means that the first EAPOL message is an EAPOL message of the first custom type. At this time, the type of the first data content can be used to determine whether the first data content is a first diagnostic instruction or a first diagnostic result. When the first data content is the first diagnostic instruction, the first AP device can perform a corresponding diagnostic operation according to the first diagnostic instruction to generate a first diagnostic result, encapsulate the first diagnostic result and return it to the first STA device, so that the first STA device can obtain the diagnostic result of the first AP device without establishing a connection communication through a hotspot password.

[0019] In some embodiments of the first aspect of the present application, when no EAPOL message is received for more than a first preset time, the association with the first STA device is disconnected.

[0020] Compared with the prior art, the above embodiment has the following beneficial effects: after the first AP device returns the first message to the first STA device, it will wait for the first STA device to respond and return the EAPOL message within a specified time. If the first AP device does not receive any EAPOL message within the first preset time, it means that the first STA device cannot respond in time, which may mean that there is a problem in the entire connection authentication process and it is necessary to disconnect the association with the first STA device, thereby helping to avoid invalid connection requests that are suspended for a long time and improving the efficiency and security of the network.

[0021] In a second aspect, an embodiment of the present application further provides an AP device debugging and diagnostic method based on an EAPOL message, which is applied to a second STA device. The debugging and diagnostic method adopts a WPA / WPA2 authentication process, including:

[0022] Sending a second association request to a second AP device to be diagnosed;

[0023] When receiving the second message returned by the second AP device according to the second association request, generating a third EAPOL message according to the second diagnostic instruction input by the user, and returning the third EAPOL message to the second AP device; the third EAPOL message is an EAPOL message of a second custom type;

[0024] When receiving a fourth EAPOL message returned by the second AP device according to the third EAPOL message, the fourth EAPOL message is parsed to obtain a second diagnosis result of the second AP device; the fourth EAPOL message is an EAPOL message of a second self-defined type.

[0025] Compared with the prior art, the above embodiment has the following beneficial effects: in order to prevent the second AP device from using the hotspot password, the Message 2 generated according to the hotspot password is replaced with an EAPOL message of a second custom type, so that the second EAPOL message sent by the second STA device includes a diagnostic instruction, and subsequently when the second AP device parses and obtains the diagnostic instruction from the third EAPOL message, it automatically executes the diagnostic process and obtains the second diagnostic result, thereby actively obtaining the diagnostic debugging result of the second AP device without the need to perform tedious hotspot password input or change the code from the bottom layer.

[0026] In some embodiments of the second aspect of the present application, the EAPOL message of the second self-defined type includes: second self-defined data and a second preset index value of the EAPOL message of the second self-defined type;

[0027] The second custom data includes: second data content and the type of the second data content; the second data content includes any one of the second diagnostic instruction or the second diagnostic result.

[0028] Compared with the prior art, the above embodiment has the following beneficial effects: by adding a second preset index value with an identification function in the EAPOL message of the second custom type, the second AP device can accurately identify the function of the data carried in the currently received EAPOL message during the second handshake, so that the corresponding second diagnostic instruction can be executed according to the second custom data to generate a diagnostic result, and the diagnostic result of the second AP device can be obtained after establishing a connection communication through a hotspot password.

[0029] In some embodiments of the second aspect of the present application, parsing the fourth EAPOL message to obtain a second diagnosis result of the second AP device includes:

[0030] When the second preset index value can be parsed from the fourth EAPOL message, and when it is determined that the second data content is the second diagnosis result according to the type of the second data content, the second data content is parsed to obtain the second data content.

[0031] Compared with the prior art, the above embodiment has the following beneficial effects: when the second preset index value is parsed and obtained from the fourth EAPOL message, it means that the fourth EAPOL message is an EAPOL message of a custom type. At this time, if the type of the second data content in the fourth EAPOL message is a diagnostic result, the second data content can be parsed and obtained from the fourth EAPOL message as the second diagnostic result.

[0032] In some embodiments of the second aspect of the present application, generating the third EAPOL message according to the second diagnostic instruction input by the user includes: encapsulating the second diagnostic instruction into the EAPOL message of the second self-defined type to generate the third EAPOL message.

[0033] Compared with the prior art, the above embodiment has the following beneficial effects: by encapsulating the diagnostic instruction into the EAPOL message of the second custom type, a third EAPOL message is generated, so that the second AP device can parse and obtain the diagnostic instruction from the third EAPOL message, automatically execute the diagnostic process, and obtain the second diagnostic result, thereby eliminating the need to enter a tedious hotspot password or change the code from the bottom layer, and can actively obtain the diagnostic debugging result of the second AP device.

[0034] In a third aspect, an embodiment of the present application further provides an AP device debugging and diagnostic device based on an EAPOL message, which is applied to a first AP device, wherein the debugging and diagnostic device adopts a WPA / WPA2 authentication process, including: an association response module, a first EAPOL message receiving module, a diagnostic instruction parsing module, and a diagnostic result sending module;

[0035] The association response module is used to establish an association with the first STA device when receiving a first association request sent by the first STA device, and return a first message to the first STA device;

[0036] The first EAPOL message receiving module is used to parse the first EAPOL message and obtain the first MAC address of the first STA device when receiving the first EAPOL message returned by the first STA device according to the first message within a first preset time; the first EAPOL message is an EAPOL message of a first self-defined type;

[0037] The diagnostic instruction parsing module is configured to generate a second EAPOL message according to the first diagnostic instruction when the first diagnostic instruction is obtained by parsing the first EAPOL message;

[0038] The diagnosis result sending module is used to return the second EAPOL message to the corresponding first STA device according to the first MAC address, so that the first STA device parses the second EAPOL message to obtain a first diagnosis result; the second EAPOL message is an EAPOL message of a first self-defined type.

[0039] In a fourth aspect, an embodiment of the present application further provides an AP device debugging and diagnostic device based on an EAPOL message, which is applied to a second STA device, wherein the debugging and diagnostic device adopts a WPA / WPA2 authentication process, including: an association request sending module, a diagnostic instruction encapsulation module, and a diagnostic result receiving module;

[0040] Wherein, the association request sending module is used to send a second association request to the second AP device to be diagnosed;

[0041] The diagnostic instruction encapsulation module is configured to generate a third EAPOL message according to the second diagnostic instruction input by the user when receiving the second message returned by the second AP device according to the second association request, and return the third EAPOL message to the second AP device; the third EAPOL message is an EAPOL message of a second self-defined type;

[0042] The diagnosis result receiving module is used to parse the fourth EAPOL message and obtain the second diagnosis result of the second AP device when receiving the fourth EAPOL message returned by the second AP device according to the third EAPOL message; the fourth EAPOL message is an EAPOL message of a second self-defined type. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flowchart of an AP device debugging and diagnosis method based on an EAPOL message for a first AP device provided in some embodiments of the present application;

[0044] Figure 2 A flowchart of an AP device debugging and diagnosis method based on an EAPOL message for a second STA device provided in some embodiments of the present application;

[0045] Figure 3 A schematic diagram of an encapsulation structure of an EAPOL message of a user-defined type provided in some embodiments of the present application;

[0046] Figure 4Another flowchart of an AP device debugging and diagnosis method provided in some embodiments of the present application;

[0047] Figure 5 This is a diagram showing an example of a custom type of EAPOL message in Wireshark provided in some embodiments of the present application;

[0048] Figure 6 A schematic diagram of a WPA / WPA2 authentication process provided in some embodiments of the present application;

[0049] Figure 7 A schematic diagram showing the difference between a custom type of EAPOL message provided in some embodiments of the present application and an EAPOL message in a standard four-way handshake authentication process;

[0050] Figure 8 A schematic diagram of the structure of an AP device debugging and diagnosing apparatus based on an EAPOL message for a first AP device provided in some embodiments of the present application;

[0051] Fig. 9 A schematic diagram of the structure of an AP device debugging and diagnosing apparatus based on an EAPOL message for a second STA device provided in some embodiments of the present application. DETAILED DESCRIPTION

[0052] In the prior art, technicians are usually required to use STA devices to authenticate one by one according to the SSID and password of each AP device to access the corresponding AP device, and then log in to the management webpage to view and debug the device. Or, custom data is added to the broadcast beacon frame of the wireless signal so that the AP device can periodically broadcast the device status. The first method mentioned above requires recording a large number of hotspot passwords. When the hotspot password of the AP device is unknown, this method cannot be used to diagnose the AP device, so it is inefficient. The second method relies on the manufacturer of the wireless communication chip to provide the underlying related API interface, and it is highly passive, and it is impossible to actively debug the AP device through STA.

[0053] In order to solve the above technical problems, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] Embodiment 1

[0055] Please refer to Figure 1, an AP device debugging and diagnostic method based on EAPOL messages provided in an embodiment of the present application, is applied to a first AP device. The debugging and diagnostic method adopts a WPA / WPA2 authentication process, including the following S10 to S40.

[0056] Preferably, in some embodiments of the present application, the WPA / WPA2 authentication process adopted by the debugging and diagnostic method adopts development system authentication, that is, when the AP device is associated with the STA device, the AP device will not verify the authenticity of the STA device. The authenticity verification of the AP device is performed in the subsequent four-way handshake process, that is, in the prior art, the STA device returns the hotspot password to the AP device to establish a connection.

[0057] S10: When a first association request sent by a first STA device is received, an association with the first STA device is established, and a first message is returned to the first STA device.

[0058] Preferably, in some embodiments of the present application, the first AP device includes but is not limited to: traditional wireless access points, integrated wireless access points, Mesh wireless access points, enterprise-level wireless access points and other devices, and all of the above devices need to have the function of parsing custom type EAPOL messages.

[0059] S20: When a first EAPOL message returned by the first STA device according to the first message is received within a first preset time, the first EAPOL message is parsed to obtain a first MAC address of the first STA device; the first EAPOL message is an EAPOL message of a first user-defined type.

[0060] Further, in some embodiments of the present application, the EAPOL message of the first self-defined type includes: first self-defined data and a first preset index value of the EAPOL message of the first self-defined type;

[0061] The first custom data includes: first data content and the type of the first data content; the first data content includes any one of the first diagnostic instruction or the first diagnostic result.

[0062] By adding a first preset index value with an identification function in the EAPOL message of the first custom type, the first AP device can accurately identify the function of the data carried in the currently received EAPOL message during the second handshake, so that the corresponding first diagnostic instruction can be executed according to the first custom data to generate a diagnostic result, thereby achieving the diagnosis result of the first AP device without having to establish a connection communication through a hotspot password.

[0063] Further, in some embodiments of the present application, when no EAPOL message is received for more than a first preset time, the association with the first STA device is disconnected.

[0064] After the first AP device returns the first message to the first STA device, it will wait for the first STA device to respond and return the EAPOL message within the specified time. If the first AP device does not receive any EAPOL message within the first preset time, it means that the first STA device cannot respond in time, which may mean that there is a problem with the entire connection authentication process and it is necessary to disconnect from the first STA device, which helps to avoid long-term pending invalid connection requests and improve network efficiency and security.

[0065] Preferably, in some embodiments of the present application, when a non-customized EAPOL message is received within the first preset time, the received EAPOL message is processed according to a normal four-way handshake process.

[0066] S30: When a first diagnosis instruction is obtained by parsing the first EAPOL message, a second EAPOL message is generated according to the first diagnosis instruction.

[0067] Further, in some embodiments of the present application, when the first diagnostic instruction is parsed and obtained from the first EAPOL message, generating a second EAPOL message according to the first diagnostic instruction includes:

[0068] When the first preset index value can be parsed from the first EAPOL message, and the first data content is determined to be the first diagnostic instruction according to the type of the first data content, a diagnostic operation is performed according to the first diagnosis to obtain a first diagnostic result;

[0069] Encapsulate the first diagnosis result into the EAPOL message of the first user-defined type to generate the second EAPOL message.

[0070] When the first preset index value is parsed in the first EAPOL message, it means that the first EAPOL message is an EAPOL message of the first custom type. At this time, the type of the first data content can be used to determine whether the first data content is a first diagnostic instruction or a first diagnostic result. When the first data content is the first diagnostic instruction, the first AP device can perform a corresponding diagnostic operation according to the first diagnostic instruction to generate a first diagnostic result, encapsulate the first diagnostic result and return it to the first STA device, so that the first STA device can obtain the diagnostic result of the first AP device without establishing a connection communication through a hotspot password.

[0071] S40: Return the second EAPOL message to the corresponding first STA device according to the first MAC address, so that the first STA device parses the second EAPOL message to obtain a first diagnostic result; the second EAPOL message is an EAPOL message of a first self-defined type.

[0072] In summary, the AP device debugging and diagnosis method based on EAPOL message for the first AP device provided by the embodiment of the present application has the following beneficial effects: in the standard WPA / WPA2 authentication process between the STA device and the AP device, after the STA device is associated with the AP device, a further four-way handshake authentication process is required to establish a connection between the two devices. In the standard four-way handshake process, after the AP device sends the first message (i.e., Message 1) to the STA device, the STA device should generate Message 2 according to the hotspot password and return Message 2 to the AP device until the complete four-way handshake process is completed. Therefore, in order to avoid using the hotspot password, the Message 2 generated according to the hotspot password is replaced with the first custom type of EAPOL message, so that the first EAPOL message sent by the first STA device contains the diagnostic instruction. After the first AP device parses and obtains the diagnostic instruction from the first EAPOL message, it automatically executes the diagnostic process and obtains the first diagnostic result, so that the diagnostic debugging result of the first AP device can be actively obtained without the need to enter the tedious hotspot password or change the code from the bottom layer.

[0073] Embodiment 2

[0074] Please refer to Figure 2 , an AP device debugging and diagnostic method based on EAPOL messages provided in an embodiment of the present application, is applied to a second STA device. The debugging and diagnostic method adopts a WPA / WPA2 authentication process, including S50 to S70.

[0075] S50: Send a second association request to the second AP device to be diagnosed.

[0076] Preferably, in some embodiments of the present application, the second AP device includes but is not limited to: traditional wireless access points, integrated wireless access points, Mesh wireless access points, enterprise-level wireless access points and other devices, and the above devices all need to have the function of parsing custom type EAPOL messages.

[0077] S60: When receiving the second message returned by the second AP device according to the second association request, generate a third EAPOL message according to the second diagnostic instruction input by the user, and return the third EAPOL message to the second AP device; the third EAPOL message is an EAPOL message of a second self-defined type.

[0078] Further, in some embodiments of the present application, the EAPOL message of the second self-defined type includes: second self-defined data and a second preset index value of the EAPOL message of the second self-defined type;

[0079] The second custom data includes: second data content and the type of the second data content; the second data content includes any one of the second diagnostic instruction or the second diagnostic result.

[0080] Preferably, reference Figure 3 , is a self-defined type of EAPOL message provided in some embodiments of the present application. The first self-defined type of EAPOL message in Embodiment 1 and the second self-defined type of EAPOL message in this embodiment can be used as follows Figure 3 The EAPOL message encapsulation structure shown.

[0081] Combination Figure 3 The EAPOL message encapsulation structure shown in the figure includes: an Ethernet header and a message payload 802.1X Auth in the above-mentioned first custom type EAPOL message and the second custom type EAPOL message. The Ethernet header includes a destination MAC, a source MAC, and an Ethernet type, wherein the value of the Ethernet type is eth.type=0x888e, indicating an 802.1XAuthentication (0x888e) message; the destination MAC refers to the address to which this message needs to be sent; the source MAC refers to the source address of the message sent this time. The message payload 802.1X Auth includes a series of index values ​​and custom data content, such as: the value of eapol.version is the index that calibrates the fixed definition; the value of eapol.type is the index value of the EAPOL message packet type; eapol.length represents the length of the message sent this time, starting from the current byte; eapol.keydes.type is used to identify whether the EAPOL message sent this time is of a custom type. In the EAPOL message of the first custom type, eapol.keydes.type=8, and in the standard four-way handshake, eapol.keydes.type=2; eapol.keydes.body is custom data (i.e., the first custom data or the second custom data), including magic words, data content (i.e., the first data content or the second data content), and the type of data content (i.e., Figure 3The magic word is a predetermined value used as a special identifier to distinguish EAPOL messages of a custom type. The magic word can use values ​​such as 0xA1B2C3D4. The packet type is used to identify whether the data content is a diagnostic instruction or a diagnostic result.

[0082] By adding a second preset index value with an identification function in the EAPOL message of the second custom type, the second AP device can accurately identify the function of the data carried in the currently received EAPOL message during the second handshake, so that the corresponding second diagnostic instruction can be executed according to the second custom data to generate a diagnostic result, thereby achieving the diagnosis result of the second AP device without having to establish a connection communication through a hotspot password.

[0083] S70: When receiving a fourth EAPOL message returned by the second AP device according to the third EAPOL message, parse the fourth EAPOL message to obtain a second diagnosis result of the second AP device; the fourth EAPOL message is an EAPOL message of a second self-defined type.

[0084] Further, in some embodiments of the present application, parsing the fourth EAPOL message to obtain a second diagnosis result of the second AP device includes:

[0085] When the second preset index value can be parsed from the fourth EAPOL message, and when it is determined that the second data content is the second diagnosis result according to the type of the second data content, the second data content is parsed to obtain the second data content.

[0086] When the second preset index value is parsed and obtained from the fourth EAPOL message, it means that the fourth EAPOL message is an EAPOL message of a user-defined type. At this time, if the type of the second data content in the fourth EAPOL message is a diagnosis result, the second data content can be parsed and obtained from the fourth EAPOL message as the second diagnosis result.

[0087] Further, in some embodiments of the present application, generating the third EAPOL message according to the second diagnostic instruction input by the user includes: encapsulating the second diagnostic instruction into the EAPOL message of the second self-defined type to generate the third EAPOL message.

[0088] By encapsulating the diagnostic instruction into the EAPOL message of the second custom type, a third EAPOL message is generated, so that the second AP device can parse and obtain the diagnostic instruction from the third EAPOL message, automatically execute the diagnostic process, and obtain the second diagnostic result, thereby actively obtaining the diagnostic debugging result of the second AP device without the need to perform tedious hotspot password input or change the code from the bottom layer.

[0089] In summary, the AP device debugging and diagnosis method based on EAPOL messages for the second STA device provided in the embodiment of the present application has the following beneficial effects: in order to prevent the second AP device from using the hotspot password, the Message 2 generated according to the hotspot password is replaced with an EAPOL message of the second custom type, so that the second EAPOL message sent by the second STA device includes a diagnostic instruction, and subsequently when the second AP device parses and obtains the diagnostic instruction from the third EAPOL message, it automatically executes the diagnostic process and obtains the second diagnostic result, thereby actively obtaining the diagnostic debugging result of the second AP device without the need to perform tedious hotspot password input or change the code from the bottom layer.

[0090] Embodiment 3

[0091] In order to better understand the above-mentioned embodiment 1 and embodiment 2, Figure 4 This embodiment also describes in detail the specific process of the AP device debugging and diagnosis method based on the EAPOL message.

[0092] S80: First, the AP device waits for the STA device to associate with it. After the AP device is associated with the STA device, the two enter the four-way handshake authentication stage (at this time, the AP device will send msg1 to the STA device. In this application, in order to simply explain the four-way handshake authentication process, msg1, msg2, msg3 and msg4 are used to represent the message information transmitted in the four-way handshake authentication process), and the AP device starts the authentication timeout timer; when the authentication timeout timer is not triggered, the EAPOL message is received, then jump to S90, otherwise execute S81.

[0093] S81: The AP device terminates the four-way handshake authentication phase with the corresponding STA device, disconnects from the corresponding STA device, and re-executes S80.

[0094] S90: Determine whether the EAPOL message is Figure 3 If the EAPOL message is of a user-defined type, execute S100; otherwise, execute S91.

[0095] S91: After processing the received EAPOL message according to the standard four-way handshake authentication process, continue to execute S80.

[0096] S100: Parse the EAPOL message of the user-defined type, obtain the MAC address of the STA device (ie, the source MAC address in the EAPOL message received this time) and the diagnosis instruction, and generate a corresponding diagnosis result according to the diagnosis instruction.

[0097] S110: After encapsulating the diagnosis result into an EAPOL message of a user-defined type, the message is sent to a STA device corresponding to the MAC address, and S80 is executed.

[0098] refer to Figure 5 , is an example of a wireshark message, where the left side is a diagnostic instruction message sent by STA to AP, and the right side is a diagnostic result message sent by AP to STA. It can be seen that the diagnostic instruction mentioned in some implementations of this application is actually an index value. When the AP device parses and obtains the diagnostic instruction, it determines the operation to be performed based on the value, such as querying the CPU occupancy. After the AP device performs the relevant diagnostic operation, it feeds back the diagnostic result to the STA device, such as Figure 5 As shown on the right, the AP device encapsulates the occupancy rate in hexadecimal into the EAPOL message. After the STA device obtains the result, it converts it into decimal and obtains the actual diagnosis result after performing certain operations.

[0099] In addition, reference Figure 6 ,Since the WPA / WPA2 authentication process in this application adopts open ,system authentication, the authenticity of the STA device identity will not be authenticated ,before association. Figure 6 In the figure, the first two messages 1 to 2 are messages generated when the STA device scans the hotspot of the AP device; the first two messages 3 to 4 are STA authentication messages using open system authentication; the first three messages 5 to 7 are for STA to associate with AP, among which messages 6 and 7 are repeated, which can be understood as retransmission operations after packet loss; the first 8 to 11 are the four-way handshake authentication process. At this time, EAPOL messages can be sent between AP and STA, but IP messages cannot be sent. Therefore, diagnostic instructions can be actively sent to AP devices through EAPOL messages to actively obtain diagnostic results.

[0100] refer to Figure 7 , which is a schematic diagram of the difference between the EAPOL message of the custom type in the present application and the EAPOL message in the standard four-way handshake authentication process, the left side is an example of the EAPOL message in the standard four-way handshake authentication process, and the right side is an example of the EAPOL message of the custom type mentioned in some embodiments of the present application; in the EAPOL message of the custom type, eapol.keydes.type=8, which is different from the EAPOL message eapol.keydes.type=2 in the standard four-way handshake authentication process, and there is a certain difference in the subsequent data load. In the EAPOL message of the custom type, the subsequent data load is custom data containing diagnostic instructions or diagnostic content.

[0101] It can be seen from the above-mentioned embodiment three that an AP device debugging and diagnosis method based on EAPOL messages provided in some embodiments of the present application has the following beneficial effects: in the WPA / WPA2 authentication process of wireless communication, after the STA is associated with the AP, it cannot send IP messages but can send EAPOL messages for four-way handshake authentication. Therefore, the present application realizes the function of debugging and diagnosing the AP device without a password by starting to send EAPOL messages with customized data after the STA is associated with the AP, thereby improving the flexibility of debugging and diagnosing the AP device.

[0102] Embodiment 4

[0103] refer to Figure 8 In some embodiments of the present application, a debugging and diagnostic device for an AP device based on an EAPOL message for a first AP device is provided. The debugging and diagnostic device adopts a WPA / WPA2 authentication process, including: an association response module 11, a first EAPOL message receiving module 12, a diagnostic instruction parsing module 13 and a diagnostic result sending module 14.

[0104] The association response module 11 is used to establish an association with the first STA device and return a first message to the first STA device when receiving a first association request sent by the first STA device; the first EAPOL message receiving module 12 is used to parse the first EAPOL message and obtain a first MAC address of the first STA device when receiving a first EAPOL message returned by the first STA device according to the first message within a first preset time; the first EAPOL message is an EAPOL message of a first self-defined type; the diagnostic instruction parsing module 13 is used to generate a second EAPOL message according to the first diagnostic instruction when a first diagnostic instruction is obtained by parsing the first EAPOL message; the diagnostic result sending module 14 is used to return the second EAPOL message to the corresponding first STA device according to the first MAC address, so that the first STA device parses the second EAPOL message to obtain a first diagnostic result; the second EAPOL message is an EAPOL message of a first self-defined type.

[0105] Further, in some embodiments of the present application, the EAPOL message of the first custom type includes: first custom data and a first preset index value of the EAPOL message of the first custom type; wherein the first custom data includes: first data content and a type of the first data content; the first data content includes any one of the first diagnostic instruction or the first diagnostic result.

[0106] Further, in some embodiments of the present application, when the first diagnostic instruction is parsed and obtained from the first EAPOL message, the second EAPOL message is generated according to the first diagnostic instruction, including: when the first preset index value can be parsed from the first EAPOL message, and when it is determined that the first data content is the first diagnostic instruction according to the type of the first data content, a diagnostic operation is performed according to the first diagnosis to obtain a first diagnostic result; and the first diagnostic result is encapsulated into the EAPOL message of the first custom type to generate the second EAPOL message.

[0107] Further, in some embodiments of the present application, when no EAPOL message is received for more than a first preset time, the association with the first STA device is disconnected.

[0108] It can be understood that the above-mentioned device embodiment corresponds to the method embodiment of the present invention. The AP device debugging and diagnosis device based on EAPOL messages provided in the embodiment of the present invention can implement any method embodiment of the present invention, that is, the AP device debugging and diagnosis method based on EAPOL messages provided in embodiments one to three.

[0109] In summary, the AP device debugging and diagnosis method based on EAPOL message for the first AP device provided by the embodiment of the present application has the following beneficial effects: in the standard WPA / WPA2 authentication process between the STA device and the AP device, after the STA device is associated with the AP device, a further four-way handshake authentication process is required to establish a connection between the two devices. In the standard four-way handshake process, after the AP device sends the first message (i.e., Message 1) to the STA device, the STA device should generate Message 2 according to the hotspot password and return Message 2 to the AP device until the complete four-way handshake process is completed. Therefore, in order to avoid using the hotspot password, the Message 2 generated according to the hotspot password is replaced with the first custom type of EAPOL message, so that the first EAPOL message sent by the first STA device contains the diagnostic instruction. After the first AP device parses and obtains the diagnostic instruction from the first EAPOL message, it automatically executes the diagnostic process and obtains the first diagnostic result, so that the diagnostic debugging result of the first AP device can be actively obtained without the need to enter the tedious hotspot password or change the code from the bottom layer.

[0110] Embodiment 5

[0111] refer to Fig. 9In some embodiments of the present application, an AP device debugging and diagnostic device based on EAPOL messages for a second STA device is provided. The debugging and diagnostic device adopts a WPA / WPA2 authentication process, including: an association request sending module 15, a diagnostic instruction encapsulation module 16, and a diagnostic result receiving module 17.

[0112] Further, in some embodiments of the present application, the association request sending module 15 is used to send a second association request to the second AP device to be diagnosed; the diagnostic instruction encapsulation module 16 is used to generate a third EAPOL message according to the second diagnostic instruction input by the user when receiving the second message returned by the second AP device according to the second association request, and return the third EAPOL message to the second AP device; the third EAPOL message is an EAPOL message of a second custom type; the diagnostic result receiving module 17 is used to parse the fourth EAPOL message when receiving the fourth EAPOL message returned by the second AP device according to the third EAPOL message, and obtain the second diagnostic result of the second AP device; the fourth EAPOL message is an EAPOL message of a second custom type.

[0113] Further, in some embodiments of the present application, the EAPOL message of the second custom type includes: second custom data and a second preset index value of the EAPOL message of the second custom type; wherein the second custom data includes: second data content and a type of the second data content; the second data content includes any one of the second diagnostic instruction or the second diagnostic result.

[0114] Further, in some embodiments of the present application, parsing the fourth EAPOL message to obtain the second diagnostic result of the second AP device includes: when the second preset index value can be parsed from the fourth EAPOL message, and when the second data content is determined to be the second diagnostic result according to the type of the second data content, parsing to obtain the second data content.

[0115] Further, in some embodiments of the present application, generating the third EAPOL message according to the second diagnostic instruction input by the user includes: encapsulating the second diagnostic instruction into the EAPOL message of the second self-defined type to generate the third EAPOL message.

[0116] It can be understood that the above-mentioned device embodiment corresponds to the method embodiment of the present invention. The AP device debugging and diagnosis device based on EAPOL messages provided in the embodiment of the present invention can implement any method embodiment of the present invention, that is, the AP device debugging and diagnosis method based on EAPOL messages provided in embodiments one to three.

[0117] In summary, the AP device debugging and diagnosis method based on EAPOL messages for the second STA device provided in the embodiment of the present application has the following beneficial effects: in order to prevent the second AP device from using the hotspot password, the Message 2 generated according to the hotspot password is replaced with an EAPOL message of the second custom type, so that the second EAPOL message sent by the second STA device includes a diagnostic instruction, and subsequently when the second AP device parses and obtains the diagnostic instruction from the third EAPOL message, it automatically executes the diagnostic process and obtains the second diagnostic result, thereby actively obtaining the diagnostic debugging result of the second AP device without the need to perform tedious hotspot password input or change the code from the bottom layer.

[0118] Embodiment 6

[0119] Based on the above-mentioned embodiment of the AP device debugging and diagnostic method based on EAPOL messages, another embodiment of the present application provides an AP device debugging and diagnostic terminal device based on EAPOL messages. The AP device debugging and diagnostic terminal device based on EAPOL messages includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the AP device debugging and diagnostic method based on EAPOL messages of any embodiment of the present application is implemented.

[0120] Exemplarily, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the AP device debugging and diagnostic device based on EAPOL messages.

[0121] The AP device debugging and diagnosing device based on EAPOL message can be a computing device such as a desktop computer, a notebook, a palm computer, a cloud server, etc. The AP device debugging and diagnosing terminal device based on EAPOL message can include, but is not limited to, a processor and a memory.

[0122] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the AP device debugging and diagnosis device based on EAPOL messages, and uses various interfaces and lines to connect the various parts of the AP device debugging and diagnosis device based on EAPOL messages. The memory may be used to store the computer program and / or module, and the processor implements various functions of the AP device debugging and diagnosis device based on EAPOL messages by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0123] Embodiment 7

[0124] Based on the above-mentioned embodiment of the AP device debugging and diagnostic method based on EAPOL messages, another embodiment of the present application provides a storage medium, wherein the storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the AP device debugging and diagnostic method based on EAPOL messages of any embodiment of the present application.

[0125] In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0126] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. An AP device debugging and diagnostic method based on EAPOL messages, applied to a first AP device, wherein the debugging and diagnostic method adopts a WPA / WPA2 authentication process, and is characterized in that: include: When receiving a first association request sent by a first STA device, establishing an association with the first STA device, and returning a first message to the first STA device; When a first EAPOL message returned by the first STA device according to the first message is received within a first preset time, parsing the first EAPOL message to obtain a first MAC address of the first STA device; The first EAPOL message is an EAPOL message of a first user-defined type; When a first diagnostic instruction is obtained by parsing the first EAPOL message, generating a second EAPOL message according to the first diagnostic instruction; According to the first MAC address, the second EAPOL message is returned to the corresponding first STA device, so that the first STA device parses the second EAPOL message to obtain a first diagnostic result; the second EAPOL message is an EAPOL message of a first self-defined type.

2. The AP device debugging and diagnosis method based on EAPOL message according to claim 1, characterized in that: The first user-defined type of EAPOL message includes: first user-defined data and a first preset index value of the first user-defined type of EAPOL message; The first custom data includes: first data content and the type of the first data content; the first data content includes any one of the first diagnostic instruction or the first diagnostic result.

3. The AP device debugging and diagnosis method based on EAPOL message as claimed in claim 2, characterized in that: When the first diagnostic instruction is parsed and obtained from the first EAPOL message, generating a second EAPOL message according to the first diagnostic instruction includes: When the first preset index value can be parsed from the first EAPOL message, and the first data content is determined to be the first diagnostic instruction according to the type of the first data content, a diagnostic operation is performed according to the first diagnosis to obtain a first diagnostic result; Encapsulate the first diagnosis result into the EAPOL message of the first user-defined type to generate the second EAPOL message.

4. The AP device debugging and diagnosis method based on EAPOL message according to claim 1, characterized in that: When no EAPOL message is received within a first preset time, the association with the first STA device is disconnected.

5. An AP device debugging and diagnostic method based on EAPOL messages, applied to a second STA device, wherein the debugging and diagnostic method adopts a WPA / WPA2 authentication process, and is characterized in that: include: Sending a second association request to a second AP device to be diagnosed; When receiving the second message returned by the second AP device according to the second association request, generating a third EAPOL message according to the second diagnostic instruction input by the user, and returning the third EAPOL message to the second AP device; The third EAPOL message is an EAPOL message of a second self-defined type; When receiving a fourth EAPOL message returned by the second AP device according to the third EAPOL message, the fourth EAPOL message is parsed to obtain a second diagnosis result of the second AP device; the fourth EAPOL message is an EAPOL message of a second self-defined type.

6. The AP device debugging and diagnosis method based on EAPOL message as claimed in claim 5, characterized in that: The EAPOL message of the second self-defined type includes: second self-defined data and a second preset index value of the EAPOL message of the second self-defined type; The second custom data includes: second data content and the type of the second data content; the second data content includes any one of the second diagnostic instruction or the second diagnostic result.

7. The AP device debugging and diagnosis method based on EAPOL message as claimed in claim 6, characterized in that: The parsing the fourth EAPOL message to obtain a second diagnosis result of the second AP device includes: When the second preset index value can be parsed from the fourth EAPOL message, and when it is determined that the second data content is the second diagnosis result according to the type of the second data content, the second data content is parsed to obtain the second data content.

8. The AP device debugging and diagnosis method based on EAPOL message as claimed in claim 5, characterized in that: The generating the third EAPOL message according to the second diagnostic instruction input by the user includes: encapsulating the second diagnostic instruction into the EAPOL message of the second self-defined type to generate the third EAPOL message.

9. An AP device debugging and diagnostic device based on EAPOL messages, applied to a first AP device, wherein the debugging and diagnostic device adopts a WPA / WPA2 authentication process, and is characterized in that: include: An association response module, a first EAPOL message receiving module, a diagnosis instruction parsing module, and a diagnosis result sending module; The association response module is used to establish an association with the first STA device when receiving a first association request sent by the first STA device, and return a first message to the first STA device; The first EAPOL message receiving module is used to parse the first EAPOL message and obtain the first MAC address of the first STA device when receiving the first EAPOL message returned by the first STA device according to the first message within a first preset time; the first EAPOL message is an EAPOL message of a first self-defined type; The diagnostic instruction parsing module is configured to generate a second EAPOL message according to the first diagnostic instruction when the first diagnostic instruction is obtained by parsing the first EAPOL message; The diagnosis result sending module is used to return the second EAPOL message to the corresponding first STA device according to the first MAC address, so that the first STA device parses the second EAPOL message to obtain a first diagnosis result; the second EAPOL message is an EAPOL message of a first self-defined type.

10. An AP device debugging and diagnostic device based on EAPOL message, applied to a second STA device, the debugging and diagnostic device adopts WPA / WPA2 authentication process, characterized in that: include: An association request sending module, a diagnosis instruction encapsulation module, and a diagnosis result receiving module; Wherein, the association request sending module is used to send a second association request to the second AP device to be diagnosed; The diagnostic instruction encapsulation module is configured to generate a third EAPOL message according to the second diagnostic instruction input by the user when receiving the second message returned by the second AP device according to the second association request, and return the third EAPOL message to the second AP device; the third EAPOL message is an EAPOL message of a second self-defined type; The diagnosis result receiving module is used to parse the fourth EAPOL message and obtain the second diagnosis result of the second AP device when receiving the fourth EAPOL message returned by the second AP device according to the third EAPOL message; the fourth EAPOL message is an EAPOL message of a second self-defined type.

Citation Information

Patent Citations

  • Fault diagnosis method and device of wireless network

    CN103650569A

  • Electronic part information analysis method, system and device, terminal and storage medium

    CN118400286A

  • Factor diagnosis apparatus, and method of controlling factor diagnosis apparatus

    JP2012060363A

  • Assisted wireless connection setup

    US20170064760A1

  • Common frames for authentication and encryption

    US20240314555A1