Electronic device and related control method
By performing specific encoding operations in the MAC frame of wireless communication to generate a verification code, it is determined whether the wireless communication module suppliers of the electronic device are the same, and the communication quality problems caused by chips of different suppliers in complex environments are solved, and the effect of improving communication quality is achieved.
Patent Information
- Application Number
- CN202311498116.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2025-05-13
AI Technical Summary
In a complex external environment, wireless communication chips manufactured by different suppliers make it difficult to achieve ideal communication quality between electronic devices.
By performing a specific encoding operation in a specific field in a media access control (MAC) frame to generate a check code, replacing part of the content of the field, it is thereby determined whether the wireless communication module supplier of another electronic device is the same, thereby assisting in improving communication quality.
Effectively determine whether the wireless communication module of the two electronic devices comes from the same supplier, and thus improve the communication quality through specific operations and improve the stability and efficiency of wireless communication.
Smart Images

Figure CN119997093A_ABST
Abstract
Description
[Technical field]
[0001] The invention relates to an electronic device with wireless communication function. [Background technology]
[0002] In current electronic devices that can communicate with each other wirelessly, the wireless communication chips inside them may be manufactured by different suppliers, and the wireless communication chips manufactured by different suppliers may have different functions. In addition, if these electronic devices are in a more complex external environment, such as severe channel interference, etc., the communication quality between these electronic devices is often difficult to achieve ideal results. [Summary of the invention]
[0003] Therefore, one of the purposes of the present invention is to provide an electronic device that can confirm whether the supplier of the wireless communication chip in other electronic devices is the same as its own supplier, so as to help each other to improve the communication quality and solve the problems described in the background technology.
[0004] In one embodiment of the present invention, a control method for an electronic device is disclosed, which includes the following steps: generating a media access control (MAC) frame; performing a specific encoding operation on a specific field in the MAC frame to generate a check code; using the check code to replace a portion of the content of the specific field; and generating a packet based on the MAC frame for sending to another electronic device.
[0005] In one embodiment of the present invention, an electronic device is disclosed, which includes a processing circuit and a wireless communication module. The wireless communication module is used to perform the following steps: generate a MAC frame; perform a specific encoding operation on a specific field in the MAC frame to generate a check code; use the check code to replace a part of the content of the specific field; and generate a packet according to the MAC frame for sending to another electronic device.
[0006] In one embodiment of the present invention, a control method for an electronic device is disclosed, which includes the following steps: receiving a packet from another electronic device; determining whether a specific field of a MAC frame of the received packet is generated by a specific encoding method; if the specific field of the MAC frame is generated by the specific encoding method, determining that the other electronic device is from the same supplier as the wireless communication module in the electronic device; and if the specific field of the MAC frame is not generated by the specific encoding method, determining that the other electronic device is from a different supplier than the wireless communication module in the electronic device.
[0007] In one embodiment of the present invention, an electronic device is disclosed, which includes a processing circuit and a wireless communication module. The wireless communication module is used to perform the following steps: receiving a packet from another electronic device; determining whether a specific field of a MAC frame of the received packet is generated by a specific encoding method; if the specific field of the MAC frame is generated by the specific encoding method, determining that the other electronic device and the wireless communication module in the electronic device are from the same vendor; and if the specific field of the MAC frame is not generated by the specific encoding method, determining that the other electronic device and the wireless communication module in the electronic device are from different vendors.
Brief Description of the Drawings
[0008] Figure 1 FIG. 1 is a schematic diagram of a wireless communication system according to an embodiment of the present invention. Figure 2 FIG. 4 is a flow chart of a method for controlling a site according to an embodiment of the present invention. Figure 3 A schematic diagram of a MAC frame. Figure 4 Schematic diagram of generating a check code and a modified duration / identification field according to an embodiment of the present invention. Figure 5 FIG. 4 is a schematic diagram of generating a verification code according to an embodiment of the present invention. Figure 6 FIG. 4 is a schematic diagram of generating a verification code according to an embodiment of the present invention. Figure 7 FIG. 4 is a schematic diagram of generating a verification code according to an embodiment of the present invention. Figure 8 FIG. 4 is a flow chart of a method for controlling a site according to an embodiment of the present invention. [Specific implementation method]
[0009] Figure 1 FIG. 1 is a schematic diagram of a wireless communication system 100 according to an embodiment of the present invention. Figure 1As shown, the wireless communication system 100 includes an access point (AP) 102 and a plurality of electronic devices that can wirelessly communicate with the access point 102, wherein the plurality of electronic devices are illustrated by stations 110, 120, and 130. In this embodiment, the stations 110, 120, and 130 can be desktop computers, laptop computers, tablet computers, mobile phones, or other electronic devices with wireless communication functions, the station 110 at least includes a processing circuit 112 and a wireless communication module 114, and the station 120 at least includes a processing circuit 122 and a wireless communication module 124, wherein the processing circuits 112 and 122 can be a processor in the electronic device, and the wireless communication modules 114 and 124 can include a media access control layer (MAC layer) circuit and a physical layer circuit.
[0010] exist Figure 1 In the illustrated embodiment, since the surrounding environment of each station 110, 120, 130 is different, and the distances between the stations 110, 120, 130 and the access point 102 may also be different, the connection quality and signal transmission quality may also be different. Therefore, the present invention proposes a method that allows a station to identify whether the wireless communication modules of other stations around it belong to the same supplier, so as to help each other improve the communication quality. In the following description, it is assumed that the station 120 sends a packet, and the station 110 receives a packet from the station 120 to determine whether the wireless communication module 124 of the station 120 belongs to the same supplier as its own wireless communication module 114, but the present invention is not limited to this.
[0011] Figure 2 FIG. 2 is a flow chart of a control method of the station 120 according to an embodiment of the present invention. In step 200, the process starts, and the station 120 has established a connection with the access point 102. In step 202, the wireless communication module 124 generates a signal such as Figure 3The message of the MAC frame 300 shown in the figure, wherein the MAC frame includes multiple fields, namely, frame control, duration / identification (Duration / ID), address 1, address 2, address 3, sequence control (sequence control), address 4, quality of service control (QoS control), high throughput control (high through (HT) control), frame body (frame body) and frame check sequence (Frame Check Sequence, FCS). Since the definitions and functions of the multiple fields of the MAC frame 300 have been described in the relevant specifications of IEEE 802.11, and those skilled in the art can also understand the contents, the detailed description is not repeated here.
[0012] In step 204, the wireless communication module 124 performs a specific encoding operation on a specific field in the MAC frame 300 to generate a check code, and uses the check code to replace a portion of the content of the specific field to generate a modified specific field. Figure 3 , 4In this embodiment, the duration / identification field is used as the specific field, wherein the duration / identification field may be a duration (Duration) or an association identifier (AID) according to the frame format, and in most cases the duration / identification field is used to indicate the length of time that the MAC frame declares to occupy the channel. The duration / identification field includes 16 bits B0 to B15, and if it is used to indicate the duration, the range of the indication may be between 0 and 32.767 milliseconds (ms). In addition, among the 16 bits B0 to B15 of the duration / identification field, B0 represents the least significant bit (Least Significant Bit, LSB), that is, B0 has the least influence on the value of the duration; B15 represents the most significant bit (Most Significant Bit, MSB), that is, B15 has the greatest influence on the value of the duration; in addition, the closer the bit is to B15, the greater the influence on the value of the duration, and similarly, the closer the bit is to B0, the smaller the influence on the value of the duration. In this embodiment, the wireless communication module 124 divides the duration / identifier field into a plurality of segments S1-SN, wherein each segment S1-SN may contain the same or different number of bits. For example, if the wireless communication module 124 divides the duration / identifier field into four segments (i.e., N=4), each segment S1-S4 may contain four bits. Next, the wireless communication module 124 performs an exclusive or (XOR) operation on the segments S2, S3, . . . SN of the first part to generate a check code S1', and uses the check code S1' to replace the original segment S1 of the second part, i.e., the four segments of the modified duration / identifier field are S1', S2, S3, S4 respectively.
[0013] For details, refer to Figure 5 , the wireless communication module 124 divides the duration / identification field into four sections S1-S4, where section S4 includes B12-B15, section S3 includes B8-B11, and section S2 includes B4-B7. Then, the wireless communication module 124 performs an XOR operation on B12, B8, and B4 in sequence to generate B0' in the check code S1', performs an XOR operation on B13, B9, and B5 in sequence to generate B1' in the check code S1', performs an XOR operation on B14, B10, and B6 in sequence to generate B2' in the check code S1', and performs an XOR operation on B15, B11, and B7 in sequence to generate B3' in the check code S1'. B0'-B3' of the check code S1' are used to replace B0-B3 of section S1 respectively.
[0014] In this embodiment, since the segment S1 in the duration / identification field that is replaced by the check code S1' contains the least significant bit and other bits that have very little impact on the value of the duration, the error between the duration represented by the modified duration / identification field and the duration set at the beginning will be within the allowable range and will not affect the operation of the electronic device in practical applications.
[0015] It should be noted that in the present embodiment, the wireless communication module 124 will only generate the verification code S1' to replace the segment S1 if the content represented by the duration / identification field is a duration. That is, if the content represented by the duration / identification field is an association identification code (AID), the wireless communication module 124 will not modify the content of the duration / identification field.
[0016] In addition, since there is a certain probability that the verification code S1' will be equal to the content of the segment S1, in order to enhance the robustness of the verification code S1', the wireless communication module 124 will use one or more specific patterns to perform XOR operations with the segments S2, S3, ..., SN in sequence to generate the verification code S1'. For example, referring to Figure 6 , the number of bits of the specific pattern is the same as any one of the segments S1-SN, and the specific pattern can be any bit combination, such as (1,0,0,0), (0,1,0,0), (1,1,0,0), (0,0,1,0) ... etc. The wireless communication module 124 performs an XOR operation on B12, B8, B4 and the first bit of the specific pattern in sequence to generate B0' in the check code S1', performs an XOR operation on B13, B9, B5 and the second bit of the specific pattern in sequence to generate B1' in the check code S1', performs an XOR operation on B14, B10, B6 and the third bit of the specific pattern in sequence to generate B2' in the check code S1', and performs an XOR operation on B15, B11, B7 and the fourth bit of the specific pattern in sequence to generate B3' in the check code S1'. B0'-B3' of the check code S1' are used to replace B0-B3 of the segment S1 respectively.
[0017] In another embodiment, reference Figure 7, the wireless communication module 124 can divide the duration / identification field into three sections, wherein the first section includes B0-B3, the second section includes B4-B7, and the third section includes B8-B15. The wireless communication module 124 performs an XOR operation on B8-B15 of the third section, B4-B7 of the second section, and a specific pattern to generate check codes B0'-B3' and X1-X4, and uses B0'-B3' in the check code to replace the original B0-B3 of the first section. In addition, X1-X4 in the check code can be placed in the remaining address or spare address in other fields of the MAC frame 300.
[0018] In step 206, the wireless communication module 124 generates a packet, such as a physical layer protocol data unit (PPDU), according to the MAC frame and / or other MAC frames for transmission to the surrounding electronic devices. Afterwards, the process returns to step 202 to start preparing the content of the next MAC frame.
[0019] exist Figure 6 In the embodiment, in order to better ensure the robustness of the check code, the wireless communication module 124 may use different specific patterns to generate the check code S1' according to different MAC frames. Specifically, assuming that the wireless communication module 124 sets four different specific patterns, the four different specific patterns can be used in the MAC frame sequentially and cyclically. For example, the wireless communication module 124 uses the first specific pattern to perform an XOR operation with the segments S2, S3..., SN of the duration / identification field of the first MAC frame in sequence to generate the check code S1', the wireless communication module 124 uses the second specific pattern to perform an XOR operation with the segments S2, S3..., SN of the duration / identification field of the second MAC frame in sequence to generate the check code S1', the wireless communication module 124 uses the third specific pattern to perform an XOR operation with the segments S2, S3..., SN of the duration / identification field of the third MAC frame in sequence to generate the check code S1', The wireless communication module 124 uses the fourth specific pattern to perform an XOR operation with the segments S2, S3, ..., SN of the duration / identification field of the fourth MAC frame in sequence to generate a check code S1'. The wireless communication module 124 uses the first specific pattern to perform an XOR operation with the segments S2, S3, ..., SN of the duration / identification field of the fifth MAC frame in sequence to generate a check code S1'. The wireless communication module 124 uses the second specific pattern to perform an XOR operation with the segments S2, S3, ..., SN of the duration / identification field of the sixth MAC frame in sequence to generate a check code S1'... and so on.
[0020] Figure 88 is a flow chart of a control method of the station 110 according to an embodiment of the present invention. In step 800, the process starts, and the station 110 has established a connection with the access point 102. In step 802, the wireless communication module 114 of the station 110 receives packets from peripheral electronic devices, such as packets from the station 120, through the antenna, and obtains the MAC frame therein. In step 804, the wireless communication module 114 obtains the content of a specific field in the MAC frame. In step 806, the wireless communication module 114 determines whether the content of a specific field of the received MAC frame is generated by a specific encoding method. If so, the process enters step 810; if not, the process enters step 808. For example, the specific field can be Figure 3 The duration / identification field of Figure 5 , 6 , 7 or the examples of generating the modified duration / identification field mentioned in the above description. Figure 5 For example, the wireless communication module 114 can divide the duration / identification field into four sections S1 to S4, and the wireless communication module 114 performs an XOR operation on the sections S2, S3, ..., SN of the first part to generate a calculation result, and compares the calculation result with the content of the section S1 of the second part to see if they are consistent. If they are consistent, it means that the content of the duration / identification field is generated by the specific encoding method; if they are not consistent, it means that the content of the duration / identification field is not generated by the specific encoding method. Figure 6 For example, the wireless communication module 114 can divide the duration / identification field into four segments S1~S4, and the wireless communication module 114 performs an XOR operation on segments S2, S3..., SN with a specific pattern to generate a calculation result, and compares the calculation result with the content of segment S1 to see if they are consistent. If they are consistent, it means that the content of the duration / identification field is generated by the specific encoding method; if they are not consistent, it means that the content of the duration / identification field is not generated by the specific encoding method.
[0021] In step 808 , the wireless communication module 114 determines that the wireless communication module 124 of the station 120 is of a different provider than itself.
[0022] In step 810, the wireless communication module 114 determines that the wireless communication module 124 of the station 120 is of the same supplier as itself. Therefore, since the same supplier means having the same or similar control methods and functions, the wireless communication module 114 can perform one or more specific functions to help improve the communication quality of the station 120. For example, the wireless communication module 114 can determine the communication quality of the station 120 by detecting the strength of the packet of the station 120. If the communication quality of the station 120 is not good, the wireless communication module 114 can actively enter a relay mode so that the station 120 can communicate wirelessly with the access point 102 through the station 110; in addition, the wireless communication module 114 can also actively notify the access point 102 to change the channel setting to try to improve the communication quality between the station 120 and the access point 102.
[0023] To briefly summarize the present invention, in the wireless communication method of the present invention, the station 120 can generate a modified specific field by performing a specific encoding method on a specific field of the MAC frame, and send the MAC frame to the surrounding electronic devices, and the station 110 can determine whether the specific field of the received MAC frame is generated by the specific encoding method to determine whether the wireless communication modules of the two stations 110 and 120 are chips from the same supplier, so as to perform subsequent specific operations to improve the communication quality. In the present invention, since there is no need to add additional fields and it will not substantially affect the content of the original MAC frame, it can effectively and simply determine whether the wireless communication modules of the stations are chips from the same supplier. The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention. [Description of Reference Numerals]
[0024] 100: Wireless communication system 102: Access point 110,120,130: Site 112,122: Processing circuit 114,124: Wireless communication module 200~206: Steps 300: MAC frame 800~810: Steps B0~B15: bit S1~SN: Segment S1': check code B0'~B3',X1~X4: check code
Claims
1. A control method for an electronic device, comprising: generating a medium access control (MAC) frame; Performing a specific encoding operation on a specific field in the MAC frame to generate a check code; Use the checksum to replace a portion of the content of the specific field; as well as A packet is generated according to the MAC frame for sending to another electronic device. 2 . The wireless communication method as claimed in claim 1 , wherein the specific field is a duration / identification field.
3. The wireless communication method as claimed in claim 1, wherein the step of performing the specific encoding operation on the specific field in the MAC frame to generate the check code comprises: dividing the particular field into a plurality of sections; and Performing an operation on a first portion of the plurality of segments to generate the check code; and Using the checksum to replace the content of the specific field includes: The check code is used to replace a second portion of the segments among the plurality of segments. 4 . The wireless communication method of claim 3 , wherein the specific field is a duration / identification field, the segment of the first part includes a most significant bit, and the segment of the second part includes a least significant bit.
5. The wireless communication method as claimed in claim 3, wherein the step of performing operation on the first part of the plurality of segments to generate the check code comprises: An exclusive OR operation is performed on the first part of the segments in the plurality of segments to generate the check code.
6. The wireless communication method as claimed in claim 3, wherein the step of performing operation on the first part of the plurality of segments to generate the check code comprises: The first part of the segments among the plurality of segments and a specific pattern are operated to generate the check code.
7. An electronic device comprising: a processing circuit; and a wireless communication module; The wireless communication module is used to perform the following steps: generating a medium access control (MAC) frame; Performing a specific encoding operation on a specific field in the MAC frame to generate a check code; Use the checksum to replace a portion of the content of the specific field; as well as A packet is generated according to the MAC frame for sending to another electronic device.
8. A control method for an electronic device, comprising: receiving a packet from another electronic device; Determining whether a specific field of a media access control (MAC) frame of the received packet is generated by a specific encoding method; If the specific field of the MAC frame is generated by the specific encoding method, determining that the other electronic device and the wireless communication module in the electronic device are from the same vendor; and If the specific field of the MAC frame is not generated by the specific encoding method, it is determined that the wireless communication module in the other electronic device and the electronic device are from different suppliers.
9. The wireless communication method as claimed in claim 8, wherein the specific field is a duration / identification field.
10. The wireless communication method as claimed in claim 8, wherein the step of determining whether the specific field of the MAC frame of the received packet is generated by the specific encoding method comprises: dividing the particular field into a plurality of sections; and Performing calculation on a first portion of the plurality of segments to generate a calculation result; and The calculation result is compared with the content of a second part of the segments of the plurality of segments to determine whether the specific field of the MAC frame is generated by the specific encoding method.