Identification method of wireless communication module, intelligent device and program product

By integrating the main control module in the intelligent device and using the level signal or waveform code of the wireless communication module to identify the module information, the problem that the intelligent device cannot accurately identify the wireless communication module information is solved, and automatic identification and reduction of firmware requirements are achieved.

CN119997052APending Publication Date: 2025-05-13SHENZHEN MINEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510026557.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the prior art, smart devices cannot accurately identify module information of connected wireless communication modules, resulting in the need to design different firmware for LoRa modules in each frequency band, increasing design complexity and maintenance costs.

Method used

By integrating the main control module on the circuit board of the smart device, module information, including type information and frequency band information, is determined using level signals or waveform encoding of at least one pin of the wireless communication module. The specific method includes identifying using a combination of level signals output by the encoded pin or frequency and duty cycle of the PWM signal.

Benefits of technology

The intelligent device automatically recognizes the module information of the wireless communication module without manual intervention, which improves the intelligence of the intelligent device, reduces configuration complexity and enhances compatibility, thereby reducing the demand for different firmware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119997052A_ABST
    Figure CN119997052A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent equipment, and provides a wireless communication module identification method, intelligent equipment and a program product, and the intelligent equipment comprises a wireless communication module which comprises a plurality of pins; the main control module is integrally arranged on a circuit board of the intelligent equipment and is used for determining module information of the wireless communication module based on the level signal or waveform code of at least one pin of the wireless communication module after the wireless communication module is inserted into the circuit board of the intelligent equipment, and sending the module information to the intelligent equipment; the module information comprises at least one of the following information: type information and frequency band information. Therefore, the intelligent device can automatically identify the module information of the connected wireless communication module, the configuration complexity of the intelligent device can be reduced, the compatibility of the intelligent device can be enhanced, and the requirements for different firmware are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of smart devices, and more specifically, to a method for identifying a wireless communication module, a smart device, and a program product. Background Art

[0002] Taking the LoRa module as an example of a wireless communication module, the supplier of the LoRa module needs to design different LoRa module models according to the different frequency bands of each country.

[0003] At present, the integrators of LoRa modules cannot identify the module information of the connected LoRa modules on the product side, so they need to design different firmware for the LoRa modules of each frequency band. Obviously, this not only increases the design complexity, but also increases the maintenance cost. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method for identifying a wireless communication module, a smart device and a program product, aiming to solve the technical problem in the prior art that smart devices cannot accurately identify the module information of the connected wireless communication module.

[0005] To achieve the above object, according to a first aspect of the present application, a smart device is provided, the smart device comprising:

[0006] A wireless communication module, wherein the wireless communication module comprises a plurality of pins;

[0007] A main control module is integrated on the circuit board of the smart device and is used to determine the module information of the wireless communication module based on the level signal or waveform coding of at least one pin of the wireless communication module after the wireless communication module is plugged into the circuit board of the smart device, wherein the module information includes at least one of the following information: type information and frequency band information.

[0008] Optionally, in a possible implementation manner of the first aspect, if the multiple pins include at least two encoding pins, then:

[0009] The at least two encoding pins are used to respectively output a high level signal and / or a low level signal after the wireless communication module establishes a connection with the smart device;

[0010] The main control module is further used to obtain the type information of the wireless communication module by combining the high level signal and / or the low level signal respectively output by the at least two encoding pins.

[0011] Optionally, in a possible implementation manner of the first aspect, if the multiple pins include a pulse width modulation signal PWM pin, then:

[0012] The PWM pin is used to output a PWM signal after the wireless communication module establishes a connection with the smart device, and obtain a waveform code based on the frequency and duty cycle of the PWM signal using a predetermined data protocol, and output the waveform code to the main control module;

[0013] The main control module is further used to parse the waveform code using the predetermined data protocol to obtain the frequency and duty cycle of the PWM signal, and determine the type information and frequency band information of the wireless communication module according to the frequency and duty cycle of the PWM signal.

[0014] Optionally, in a possible implementation manner of the first aspect, the data frame structure of the predetermined data protocol includes:

[0015] A synchronization header, including the frequency and duty cycle of the PWM signal, used to mark the beginning of a data frame;

[0016] A type field is used to indicate the type information obtained by encoding the frequency;

[0017] A data field is used to represent a data value obtained by encoding the duty cycle;

[0018] Checksum field, used for error detection.

[0019] Optionally, in a possible implementation manner of the first aspect, the multiple pins further include an interrupt pin;

[0020] The interrupt pin is used to output a high level signal when the wireless communication module establishes a connection with the smart device, and to output a low level signal when the wireless communication module is disconnected from the smart device;

[0021] The main control module is used to determine that the wireless communication module is connected to the smart device when a high-level signal is detected output by the interrupt pin, and to determine that the wireless communication module is disconnected from the smart device when a low-level signal is detected output by the interrupt pin.

[0022] According to a second aspect of the present application, a method for identifying a wireless communication module is provided, the method comprising:

[0023] After the wireless communication module is plugged into the circuit board of the smart device, obtaining a level signal or a waveform code of at least one pin of the wireless communication module;

[0024] Based on the level signal or waveform code of at least one pin of the wireless communication module, the module information of the wireless communication module is determined, and the module information includes at least one of the following information: type information and frequency band information.

[0025] Optionally, in a possible implementation manner of the second aspect, if the multiple pins include at least two encoding pins, then:

[0026] Acquiring a level signal of at least one pin of the wireless communication module, comprising: acquiring a high level signal and / or a low level signal respectively output by the at least two encoding pins;

[0027] Based on the level signal of at least one pin of the wireless communication module, the module information of the wireless communication module is determined, including: according to the high level signal and / or low level signal respectively output by the at least two encoding pins, the type information of the wireless communication module is obtained by combining.

[0028] Optionally, in a possible implementation manner of the second aspect, if the multiple pins include a pulse width modulation signal PWM pin, then:

[0029] Acquiring a waveform code of at least one pin of the wireless communication module, comprising: obtaining the waveform code based on the frequency and duty cycle of a PWM signal using a predetermined data protocol;

[0030] Based on the waveform coding of at least one pin of the wireless communication module, the module information of the wireless communication module is determined, including: using the predetermined data protocol to parse the waveform coding to obtain the frequency and duty cycle of the PWM signal, and determining the type information and frequency band information of the wireless communication module according to the frequency and duty cycle of the PWM signal.

[0031] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0032] According to a third aspect of the present application, there is provided an intelligent device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the intelligent device implements any of the methods described in any one of the above.

[0033] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the above is implemented.

[0034] According to a fifth aspect of the present application, a computer program product is provided. When the computer program product is executed on a smart device, the smart device executes any one of the methods described in the first aspect.

[0035] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0036] The embodiment of the present application provides a method for identifying a wireless communication module, a smart device and a program product, the smart device comprising: a wireless communication module, the wireless communication module comprising a plurality of pins; a main control module, which is integrated on a circuit board of the smart device and is used to determine the module information of the wireless communication module based on the level signal or waveform coding of at least one pin of the wireless communication module after the wireless communication module is plugged into the circuit board of the smart device, the module information comprising at least one of the following information: type information, frequency band information. The smart device can automatically identify the module information of the connected wireless communication module without excessive human intervention, which can not only improve the intelligence of the smart device, but also reduce the complexity of the configuration of the smart device and enhance the compatibility of the smart device, thereby reducing the need for different firmware. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 A schematic diagram of the structure of a smart device provided by the present application is shown;

[0039] Figure 2 A pin diagram of an optional LoRa module provided by the present application is shown;

[0040] Figure 3 A pin diagram of another optional LoRa module provided by the present application is shown;

[0041] Figure 4 A schematic diagram of an optional waveform coding provided by the present application is shown;

[0042] Figure 5 A schematic flow chart of identifying a wireless communication module provided by the present application is shown;

[0043] Figure 6 A schematic flow chart of an optional wireless communication module identification provided by the present application is shown;

[0044] Figure 7 A schematic flow chart of an optional wireless communication module identification provided by the present application is shown;

[0045] Figure 8 It is a structural diagram of a smart device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0047] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0048] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0049] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0050] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0051] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0052] First, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0053] Low Power Wide Area Network LoRa (Long Range): is a low power wide area network (LPWAN) technology used for long-range wireless communication.

[0054] Pulse Width Modulation PWM (Pulse Width Modulation): is a technology that controls power transmission by adjusting the width of the pulse.

[0055] The above is a brief introduction to the nouns involved in the embodiments of the present application, which will not be repeated below.

[0056] Taking the wireless communication module as LoRa module as an example, the supplier of LoRa module needs to design different LoRa module models according to the different frequency bands in each country. If the integrator cannot identify the module information of the connected LoRa module on the product side, it is necessary to design different firmware for the LoRa module of each frequency band. This not only increases the complexity of product design, but also increases the cost of product maintenance.

[0057] This application example provides an example of a smart device, please refer to Figure 1 As shown, Figure 1 A schematic diagram of the structure of a smart device provided by the present application is shown, and the smart device includes:

[0058] A wireless communication module 101, wherein the wireless communication module comprises a plurality of pins;

[0059] The main control module 102 is integrated on the circuit board of the above-mentioned smart device, and is used to determine the module information of the above-mentioned wireless communication module based on the level signal or waveform code of at least one pin of the above-mentioned wireless communication module after the above-mentioned wireless communication module is plugged into the circuit board of the above-mentioned smart device.

[0060] Optionally, the module information includes at least one of the following information: type information and frequency band information.

[0061] Optionally, the smart device may also be referred to as an integrator device, such as any type of smart IoT device.

[0062] In the example of this application, multiple pins of a wireless communication module (such as a low-power wide area network LoRa module or other wireless communication module that requires frequency band identification) have different functions, and various information about the module is transmitted through the level signals or waveform codes output by these pins. For example, some pins may be used to transmit connection status information, while some pins are specifically used to transmit module information such as the type or frequency band of the module.

[0063] It should be understood that the specific definitions and functions of the pins of different types of wireless communication modules may vary, but overall they are designed around the goal of achieving effective communication with the main control module and accurately conveying their own characteristics.

[0064] In the example of the present application, the main control module in the smart device is integrated on the circuit board of the smart device. By reading the level status of the interrupt pin of the wireless communication module, a simple judgment of the module connection status is achieved. After the main control module determines that the wireless communication module is successfully plugged into the circuit board, the module information (type information and / or frequency band information) of the wireless communication module is determined based on the level signal or waveform coding of at least one pin of the above-mentioned wireless communication module, so that the smart device can communicate with the wireless communication module based on the module information.

[0065] More importantly, based on the acquired level signal or waveform encoding, the main control module determines the module information of the wireless communication module according to the pre-set rules and logic, so that the smart device can correctly communicate with the wireless communication module. In the example of this application, the module information includes at least one or more of type information and frequency band information.

[0066] For example, the type information can be used to determine the specific model of the wireless communication module through the level combination of specific pins (such as different combinations of several encoding pins outputting high or low levels respectively). For example, if the combination of encoding pin A being high and encoding pin B being low corresponds to a certain model of wireless communication module, then when the main control module detects this level combination, the specific model of the wireless communication module can be clearly determined.

[0067] For example, the frequency band information can be obtained by parsing an encodable waveform (such as a PWM signal) output by a certain pin. For example, according to a predetermined data protocol, the frequency and duty cycle of the signal output by a certain PWM pin are parsed. Different frequency and duty cycle combinations correspond to different frequency bands, thereby determining the frequency band information of the wireless communication module.

[0068] The design architecture of the smart device provided in the example of this application enables the smart device to automatically identify the module information of the connected wireless communication module without excessive human intervention. This can not only improve the intelligence level of the smart device, but also reduce the complexity of the smart device configuration and enhance the compatibility of the smart device, thereby reducing the need for different firmware.

[0069] For example, in the wide range of application scenarios of smart IoT devices, different application scenarios require the use of wireless communication modules of different types and frequency bands. Through this smart device that can automatically identify the characteristics of the wireless communication module, it is easier to deploy, upgrade and maintain the device, ensuring that the device can achieve good communication and collaborative work with the wireless communication module in different environments.

[0070] In one possible implementation, Figure 2 or Figure 3 As shown (taking the LoRa module as an example), the multiple pins include an IRQ interrupt pin; the interrupt pin is used to output a high-level signal when the wireless communication module establishes a connection with the smart device, and output a low-level signal when the wireless communication module is disconnected from the above-mentioned smart device; the main control module is used to determine that the wireless communication module is connected to the smart device when a high-level signal output by the interrupt pin is detected, and to determine that the wireless communication module is disconnected from the smart device when a low-level signal output by the interrupt pin is detected.

[0071] In the example of this application, when the wireless communication module starts to establish a connection with the smart device, if the connection is successfully established, the interrupt pin will output a high-level signal. For example, in an actual hardware connection scenario, when the wireless communication module is inserted into the corresponding slot of the smart device or the relevant electrical connection is completed, the level state of the interrupt pin will change immediately from the initial state (which may be a low level or an uncertain state) to a high level. This high-level signal is a clear indication that the main control module has successfully established a connection relationship with the smart device.

[0072] On the contrary, when the connection between the wireless communication module and the smart device is disconnected due to some reason (such as the wireless communication module is manually unplugged, the connection line fails, etc.), the interrupt pin will output a low-level signal accordingly. For example, if the user unplugs the wireless communication module during the operation of the device, the level of the interrupt pin will change from the high-level state when it was previously connected to the low-level state, thereby conveying to the main control module that the connection between the wireless communication module and the smart device has been disconnected.

[0073] The main control module has been monitoring the level status of the interrupt pin. When it detects a high-level signal output by the interrupt pin, it clearly determines that the wireless communication module has successfully established a connection with the smart device according to the pre-set logic and functions. At this time, the main control module carries out a series of subsequent operations based on this judgment, such as starting the communication initialization process with the wireless communication module, configuring related communication parameters, etc., so as to be able to carry out normal information exchange and communication collaboration with the wireless communication module that has just been connected.

[0074] Similarly, when the main control module detects a low-level signal output by the interrupt pin, it can quickly determine that the connection between the wireless communication module and the smart device has been disconnected. In this case, the main control module can take corresponding measures, such as suspending communication operations related to the wireless communication module, releasing resources previously occupied for communication with the module (such as cache space, communication ports, etc.), and can also record relevant information about the disconnection for subsequent troubleshooting or status statistics.

[0075] By outputting different level signals through the interrupt pin when the connection is established and disconnected, and the accurate detection and corresponding processing of these level signals by the main control module, the smart device can realize real-time monitoring and effective management of the connection status of the wireless communication module, thereby ensuring the stable operation and normal communication of the smart device.

[0076] In a possible implementation, if the plurality of pins include at least two encoding pins, then:

[0077] The at least two encoding pins are used to respectively output a high level signal and / or a low level signal after the wireless communication module establishes a connection with the smart device;

[0078] The main control module is further used to obtain the type information of the wireless communication module according to the high level signal and / or low level signal respectively output by the at least two encoding pins.

[0079] In the above implementation, different wireless communication module models may correspond to different encoding pin level combinations.

[0080] For example, the main control module is integrated on the circuit board of the smart device and maintains a connection with the encoding pin of the wireless communication module. If the wireless communication module establishes a connection with the smart device, the main control module monitors and reads the high-level signal and / or low-level signal output by each encoding pin in real time.

[0081] In an alternative example, Figure 2As shown, if at least two encoding pins are: the first encoding pin GPIO1 and the second encoding pin GPIO0, when the wireless communication module is connected to the smart device, if it is detected that the first encoding pin GPIO1 outputs a low level, and the second encoding pin GPIO0 outputs a low level, it indicates that the type information of the wireless communication module is model A; if it is detected that the first encoding pin GPIO1 outputs a low level, and the second encoding pin GPIO0 outputs a high level, it indicates that the type information of the wireless communication module is model B; if it is detected that the first encoding pin GPIO1 outputs a high level, and the second encoding pin GPIO0 outputs a low level, it indicates that the type information of the wireless communication module is model C. If it is detected that the first encoding pin GPIO1 outputs a high level, and the second encoding pin GPIO0 outputs a high level, it indicates that the type information of the wireless communication module is model D, and so on.

[0082] In addition, if Figure 2 or Figure 3 As shown, the OTHER pin represents other pins of the wireless communication module, which are used to realize the function in specific communication.

[0083] For example, a corresponding table is pre-stored inside the main control module, and the corresponding table records in detail the mapping relationship between different coding pin level combinations and wireless communication module types. When the main control module reads the current level combination of the above two coding pins, such as the level signal combination in which the output level signal of GPIO0 is high and the output level signal of GPIO1 is low, the main control module searches and matches in the pre-stored corresponding table based on the level signal combination. Assuming that in the corresponding table, the combination of "GPIO0 is high and GPIO1 is low" corresponds to a wireless communication module of a specific model (such as model B), the main control module can determine that the type information of the currently connected wireless communication module is model X.

[0084] In this way, by utilizing the combination of different level signals output by at least two encoding pins, the main control module can accurately and efficiently obtain the type information of the wireless communication module, thereby providing the necessary basic information for subsequent operations such as adaptation communication, functional configuration, etc. between the smart device and the wireless communication module.

[0085] In a possible implementation, if the multiple pins include a pulse width modulation signal PWM pin (such as Figure 3 WAVE pin shown), then:

[0086] The above-mentioned PWM pin is used to output a PWM signal after the above-mentioned wireless communication module establishes a connection with the above-mentioned smart device, and adopts a predetermined data protocol to obtain a waveform code based on the frequency and duty cycle of the above-mentioned PWM signal, and outputs the above-mentioned waveform code to the above-mentioned main control module.

[0087] The main control module is also used to parse the waveform code using the predetermined data protocol to obtain the frequency and duty cycle of the PWM signal, and determine the type information and frequency band information of the wireless communication module according to the frequency and duty cycle of the PWM signal.

[0088] In the example of the present application, after the wireless communication module establishes a connection with the smart device, the PWM pin in the wireless communication module outputs a PWM signal, which has specific frequency and duty cycle characteristics. Subsequently, according to a predetermined data protocol, a waveform code is generated based on the frequency and duty cycle of the PWM signal. For example, the predetermined data protocol may, but is not limited to, stipulate that: a PWM signal in a certain frequency range corresponds to the beginning of the transmission of information about the type of the wireless communication module, and within this frequency range, different duty cycles correspond to different specific types; for the transmission of frequency band information, it is another PWM signal in a specific frequency range, and different duty cycles within it also correspond to different frequency bands.

[0089] The following is a specific illustration using a simple example. If the predetermined data protocol is set: a PWM signal with a frequency of 50 Hz is used to transmit type information. At this frequency, a duty cycle of 30% corresponds to a wireless communication module of model A, and a duty cycle of 50% corresponds to a wireless communication module of model B; and a PWM signal with a frequency of 80 Hz is used to transmit frequency band information. At this frequency, a duty cycle of 20% corresponds to frequency band 1, and a duty cycle of 40% corresponds to frequency band 2.

[0090] Furthermore, the waveform code generated by the wireless communication module is output from the PWM pin and transmitted to the main control module to ensure that the main control module can receive the waveform code for parsing the relevant information of the wireless communication module. After the main control module receives the waveform code from the PWM pin, it first uses a pre-set predetermined data protocol to parse it to accurately obtain the frequency and duty cycle information of the PWM signal.

[0091] Continuing with the above example, if the waveform code received by the main control module is parsed to obtain a PWM signal feature with a frequency of 50 Hz and a duty cycle of 50%, it can be clearly determined that this part of information is related to the type of wireless communication module.

[0092] According to the frequency and duty cycle of the PWM signal obtained by analysis, the main control module further determines the type information and frequency band information of the wireless communication module. Still as in the specific example given above, when the main control module analyzes the frequency as 50Hz and the duty cycle as 50%, according to the predetermined data protocol, the main control module can determine that the type of the current wireless communication module is model B; if the main control module then analyzes the PWM signal characteristics of the frequency as 80Hz and the duty cycle as 40%, it can be determined that the corresponding frequency band is frequency band 2.

[0093] Through the above implementation method, by utilizing the PWM signal output by the PWM pin and the waveform coding generation and parsing process based on the predetermined data protocol, the main control module can accurately obtain the type information and frequency band information of the wireless communication module, thereby providing a key basis for subsequent adaptation, communication settings and other operations between the smart device and the wireless communication module.

[0094] In a possible implementation, the data frame structure of the predetermined data protocol includes:

[0095] A synchronization header, including the frequency and duty cycle of the PWM signal, used to mark the beginning of the data frame;

[0096] The type field is used to indicate the type information obtained by encoding the above frequency;

[0097] A data field is used to represent a data value obtained by encoding the above duty cycle;

[0098] Checksum field, used for error detection.

[0099] Specifically, in the example of this application, the synchronization header contains the frequency and duty cycle information of the PWM signal, which plays a vital role in the entire data frame structure and is used to clearly identify the beginning of a data frame. For example, it is stipulated that when the frequency of the PWM signal is a specific value (such as 50Hz) and the duty cycle is a fixed ratio (such as 20%), it means that a new data frame is about to start transmitting relevant information.

[0100] For the main control module, by detecting whether the frequency and duty cycle of the PWM signal meet the set value of the synchronization header, the starting position of the data frame can be accurately determined. If the synchronization header cannot be accurately identified, data parsing errors may occur, and relevant information of the wireless communication module cannot be correctly obtained.

[0101] Furthermore, the type field is mainly used to indicate the type information obtained after encoding the frequency of the PWM signal. Specifically, according to the rules set in the predetermined data protocol, different frequency values ​​correspond to different wireless communication module types through specific encoding methods. For example, a PWM signal with a frequency of 50Hz is encoded and represented as a wireless communication module of model A in the type field, while a PWM signal with a frequency of 80Hz is encoded and represented as a wireless communication module of model B in the type field. When parsing the data frame, the main control module can quickly determine the type information of the current wireless communication module by reading the content of the type field and based on the pre-known encoding rules.

[0102] The data field is used to represent the data value obtained after encoding the duty cycle of the PWM signal. Also according to the provisions of the predetermined data protocol, different duty cycles will be encoded into different data values, and these data values ​​correspond to different information contents. For example, a PWM signal with a duty cycle of 30% may be represented as a value within a certain frequency band (such as frequency band 1) in the data field after being encoded, and a PWM signal with a duty cycle of 50% may be represented as a value within another frequency band (such as frequency band 2) in the data field after being encoded.

[0103] By parsing the content of the data field and following the coding rules, the main control module can obtain specific data value information such as the frequency band, which helps the smart device to accurately understand the relevant characteristics of the wireless communication module. For example, it can set appropriate communication parameters according to the obtained frequency band information to ensure smooth communication with the wireless communication module.

[0104] The check field is used for error detection. During data transmission, various interference factors may cause data errors. The check field verifies the entire data frame (including the synchronization header, type field, and data field) by using a specific check algorithm (such as CRC check).

[0105] For example, when the transmitting end (wireless communication module) generates a data frame according to a predetermined data protocol, a check value is calculated based on the data content and filled into the check field. When the data frame is transmitted to the main control module, the main control module also calculates the received data frame according to the check algorithm and compares the calculation result with the value in the check field: if the two are consistent, it means that the data transmission is correct; if they are inconsistent, it means that an error occurred during the data transmission process, and the main control module may take corresponding measures, such as requesting the data frame to be resent.

[0106] The following provides a specific value of the data frame structure of an optional predetermined data protocol to facilitate the implementation of the specific solution provided by this application:

[0107] Synchronous header:

[0108] Fixed frequency: 1kHz

[0109] Fixed duty cycle: 50%

[0110] Type field:

[0111] Module A: Frequency 2kHz

[0112] Module B: Frequency 3kHz

[0113] Module C: Frequency 4kHz

[0114] Data field (taking 8-bit data as an example):

[0115] Values ​​from 0-255 are mapped to duty cycles from 5%-100% (in 0.38% steps)

[0116] For example, when the data value is 123, the calculated duty cycle is:

[0117] Duty cycle = 5% + (123 × 0.38%) = 46.74% ≈ 48.4%

[0118] Check field: Simple parity check, with a specific duty cycle (such as 10% for odd check and 90% for even check).

[0119] In an optional example, assuming that the data value of the wireless communication module A needs to be transmitted, the waveform encoding of the predetermined data protocol is as follows: Figure 4 The data frame structure based on the above-mentioned predetermined data protocol, including the synchronization header, type field, data field and check field, can effectively realize the accurate transmission, encoding and parsing of information between the wireless communication module and the main control module, thereby ensuring that the smart device can accurately obtain key content such as the type information and frequency band information of the wireless communication module, and provide guarantee for good communication and collaborative work between the wireless communication module and the main control module (or smart device).

[0120] This application example provides an example of a method for identifying a wireless communication module. Please refer to Figure 5 As shown, Figure 5 A schematic flow chart of identifying a wireless communication module provided by the present application is shown. As an example but not a limitation, the method can be applied to or run in a smart device. The method includes:

[0121] S101, after the wireless communication module is plugged into the circuit board of the smart device, a level signal or waveform code of at least one pin of the wireless communication module is obtained.

[0122] S102, determining module information of the wireless communication module based on a level signal or waveform code of at least one pin of the wireless communication module, wherein the module information includes at least one of the following information: type information and frequency band information.

[0123] After the wireless communication module is plugged into the circuit board of the smart device (physical connection), the level signal or waveform code output by the pin of the wireless communication module can accurately reflect the characteristics and status of the module itself. Therefore, in the example of the present application, after the wireless communication module is plugged into the circuit board of the above-mentioned smart device, the main control module of the smart device is used to obtain the level signal or waveform code of at least one pin of the above-mentioned wireless communication module.

[0124] For example, some encoding pins of the wireless communication module can represent the type information of the wireless communication module through a specific level combination (such as two encoding pins outputting different combinations of high and low levels, respectively).

[0125] For another example, the PWM (pulse width modulation) pin of the wireless communication module can output an encodable PWM (pulse width modulation) signal. By capturing and analyzing the characteristics of these PWM signals such as frequency and duty cycle, more detailed information can be obtained. For example, according to a predetermined data protocol, different frequency and duty cycle combinations can encode the frequency band information of the wireless communication module and other related information.

[0126] In addition, the interrupt pin of the wireless communication module outputs a high level when the wireless communication module establishes a connection with the smart device, and outputs a low level when the connection is disconnected. By obtaining the level signal of the interrupt pin, the connection status between the wireless communication module and the smart device can be known, which is also part of the overall module information.

[0127] Based on the acquired level signal or waveform code of at least one pin of the wireless communication module, the module information is determined according to pre-set rules and logic. Specifically, the rules and logic can usually be formulated according to the specific design of the wireless communication module and the communication protocol between the smart device and the module.

[0128] There may be multiple ways to determine the type information. As mentioned above, it is determined by the level combination of the encoding pins. Assuming that there are two encoding pins GPIO1 and GPIO2, if the combination of GPIO1 being high and GPIO2 being low corresponds to a certain type of wireless communication module, then when this level combination is obtained, it can be determined that the type of the wireless communication module is the corresponding specific model.

[0129] The frequency band information can be determined by analyzing the pins (such as PWM pins) that output waveform encoding. For example, according to a predetermined data protocol, a signal output by a PWM pin, whose frequency is 50Hz and whose duty cycle is 30%, corresponds to a certain frequency band range. When a signal with corresponding frequency and duty cycle characteristics output by the PWM pin is captured, the frequency band information of the wireless communication module can be determined to be the corresponding frequency band range.

[0130] Through the above-mentioned wireless communication module identification method, the smart device can automatically and accurately identify the module information of the connected wireless communication module, including type information and frequency band information. This provides a strong guarantee for the flexible configuration, efficient communication and subsequent maintenance and upgrade of smart devices in different application scenarios. For example, in the application scenario of IoT devices, different IoT devices may need to be equipped with wireless communication modules of different types and frequency bands. Through this identification method, the device can quickly adapt to different modules, reduce manual intervention, and improve the intelligence and operation efficiency of the device.

[0131] In one possible implementation, if the multiple pins include at least two encoding pins, please refer to Figure 6 As shown, Figure 6 A schematic flow chart of identification of a wireless communication module provided by the present application is shown, specifically:

[0132] S101, obtaining a level signal of at least one pin of the wireless communication module, including: S201, obtaining a high level signal and / or a low level signal respectively output by the at least two encoding pins;

[0133] S102, determining the module information of the wireless communication module based on the level signal of at least one pin of the wireless communication module, including: S202, combining the high level signal and / or low level signal respectively output by the at least two encoding pins to obtain the type information of the wireless communication module.

[0134] After the wireless communication module is plugged into the circuit board of the smart device, the operation of obtaining the encoding pin level signal is performed. This is because only when the wireless communication module is physically connected to the smart device and is in an operable state, the encoding pin will output the corresponding level signal according to its designed function.

[0135] In the example of this application, each encoding pin may output a high level or a low level, and different encoding pin combinations output different levels. These different level combinations are used to convey the type information of the wireless communication module. For example, assuming there are two encoding pins, encoding pins GPIO1 and GPIO2, after the module is connected to the device, GPIO1 outputs a high level and GPIO2 outputs a low level; or GPIO1 outputs a low level and GPIO2 outputs a high level; or both output a high level or a low level, etc. There are many possible level combinations.

[0136] Based on the high level signal and / or low level signal respectively output by at least two encoding pins, the type information of the wireless communication module is obtained by combining the pre-set corresponding rules. For example, in the design process of the smart device or wireless communication module, the corresponding relationship between the encoding pin level combination and the module type is determined in advance. For example:

[0137] When GPIO1 is high and GPIO2 is low, the corresponding wireless communication module is model A. If GPIO1 is low and GPIO2 is high, the corresponding wireless communication module is model B. When both GPIO1 and GPIO2 are high, the corresponding wireless communication module is model C. By analogy, through this clear corresponding rule, when the main control module obtains the specific encoding pin level combination, it can accurately determine the type information of the wireless communication module.

[0138] In the example of this application, the implementation method of determining the type information of the wireless communication module by obtaining the level signal of at least two encoding pins has the following advantages: First, the simple level signal (high level or low level) output by the encoding pin is used to convey information, without the need for complex encoding and decoding processes, which is relatively simple and intuitive, easy to understand and implement. Secondly, it only needs to set accurate corresponding rules in advance. After obtaining the level signal of the encoding pin, the main control module can quickly and accurately determine the type information of the wireless communication module, thereby providing timely and accurate basis for subsequent adaptation, communication and other operations between the smart device and the wireless communication module.

[0139] In summary, in the process of identifying the wireless communication module, the type information of the wireless communication module can be determined in a simple and efficient manner, which supports the collaborative work of the entire smart device and the wireless communication module.

[0140] In one possible implementation, if multiple pins include a pulse width modulation signal PWM pin, please refer to Figure 7 As shown, Figure 7 A schematic flow chart of an optional wireless communication module identification provided by the present application is shown, specifically:

[0141] S101, obtaining a waveform code of at least one pin of the wireless communication module, including: S301, obtaining a waveform code based on a frequency and a duty cycle of a PWM signal using a predetermined data protocol;

[0142] S102, based on the waveform coding of at least one pin of the above-mentioned wireless communication module, determine the module information of the above-mentioned wireless communication module, including: S302, use the above-mentioned predetermined data protocol to parse the above-mentioned waveform coding to obtain the frequency and duty cycle of the above-mentioned PWM signal, and determine the type information and frequency band information of the above-mentioned wireless communication module according to the frequency and duty cycle of the above-mentioned PWM signal.

[0143] In the example of the present application, when a PWM pin is included among the multiple pins and after the wireless communication module is plugged into the circuit board of the smart device, a predetermined data protocol can be used to obtain waveform encoding based on the frequency and duty cycle of the PWM signal.

[0144] Specifically, the predetermined data protocol is a set of rules set in advance to regulate how to generate specific waveform codes based on the characteristics of the PWM signal (frequency and duty cycle). For example, the protocol may, but is not limited to, stipulate that: when the frequency of the PWM signal is in a certain range (such as 50Hz-100Hz), it corresponds to the part that transmits information about the type of wireless communication module; within this frequency range, different duty cycles (such as 30%, 50%, etc.) correspond to different specific types. When the frequency of the PWM signal is in another specific range (such as 150Hz-200Hz), it corresponds to the part that transmits frequency band information, and different duty cycles within this range correspond to different frequency bands.

[0145] Based on the above protocol, by detecting the actual frequency and duty cycle of the PWM signal output by the PWM pin, the encoding operation is performed according to the predetermined rules to obtain the waveform code. In an example, assuming that the frequency of the PWM signal is 60Hz (within the frequency range of the transmission type information) and the duty cycle is 40%, according to the predetermined data protocol, after a specific encoding calculation (which may involve mathematical operations, logical judgments, etc.), a specific waveform code corresponding to it will be generated.

[0146] After the main control module of the smart device obtains the waveform code, first, the waveform code is parsed using a predetermined data protocol. Since the waveform code is generated according to a predetermined data protocol, the parsing process is also performed in reverse according to the protocol. The original frequency and duty cycle information of the PWM signal can be accurately obtained through parsing. Continuing with the above example, if the obtained waveform code is parsed and the result is that the frequency of the PWM signal is 60Hz and the duty cycle is 40%, then the basic characteristics of the PWM signal are restored.

[0147] According to the frequency and duty cycle of the PWM signal obtained by analysis, the type information and frequency band information of the wireless communication module are further determined. The specific type is determined based on the correspondence between the type information and the frequency and duty cycle of the PWM signal in the predetermined data protocol. For example, if the protocol stipulates that a PWM signal with a frequency of 60Hz and a duty cycle of 40% corresponds to a wireless communication module of model A, then when such a feature is analyzed, it can be determined that the type of the current wireless communication module is model A.

[0148] Similarly, according to the corresponding relationship between the frequency band information and the PWM signal frequency and duty cycle in the protocol, it is determined that the frequency band of the wireless communication module is frequency band 1 when the PWM signal characteristics that meet the conditions are analyzed.

[0149] The above implementation method can obtain various module information such as type information and frequency band information of the wireless communication module by utilizing the PWM signal output by the PWM pin and generating and parsing the waveform code according to the predetermined data protocol, which is richer and more comprehensive than the information obtained only through simple level signals. In addition, the predetermined data protocol can be flexibly set according to actual needs. For example, the corresponding relationship between the frequency and duty cycle and the specific information in the protocol can be adjusted according to different wireless communication module models, frequency band ranges, etc., so as to adapt to changes in various application scenarios.

[0150] In addition, as long as the waveform coding is generated, parsed and the information is determined strictly in accordance with the predetermined data protocol, the type information and frequency band information of the wireless communication module can be obtained more accurately, providing a reliable basis for the effective communication and collaborative work between smart devices and wireless communication modules.

[0151] In summary, the above-mentioned implementation method including PWM pins and based on a predetermined data protocol plays an important role in acquiring and determining the module information of the wireless communication module, and can meet the needs of smart devices for accurately understanding the characteristics of the wireless communication module.

[0152] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0153] The embodiment of the present application also provides a smart device, which includes one or more processors and a memory;

[0154] The memory is coupled to one or more processors, and the memory is used to store computer program codes, the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the smart device to execute the identification method of the wireless communication module shown above.

[0155] Figure 8 The schematic diagram of the structure of a smart device provided in the embodiment of the present application is that the smart device 700 can be a mobile phone, a smart screen, a tablet computer, a wearable smart device, a vehicle-mounted smart device, an augmented reality (AR) device, a virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a projector, or a communication device such as a server, a storage device, a base station, or a smart car, etc. The embodiment of the present application does not impose any restrictions on the specific type of the smart device.

[0156] The memory 701 can be used to store computer software programs 702 and modules. The processor 703 executes various functional applications and data processing of the smart device by running the software programs and modules stored in the memory 701. The memory 701 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the smart device (such as audio data, a phone book, etc.), etc. In addition, the memory 701 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0157] Among them, the processor 703 may include one or more processors such as a central processing unit, an application processor (AP), a baseband processor, etc. The processor may be the nerve center and command center of the wireless router. The processor 703 may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions. The memory 701 may be used to store computer executable program codes, and the executable program codes include instructions. The processor 703 executes various functional applications and data processing of the network device by running the instructions stored in the memory. The memory 701 may include a program storage area and a data storage area, such as storing data of a sound signal to be played. For example, the memory may be a double rate synchronous dynamic random access memory DDR or a flash memory Flash.

[0158] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored; when the computer-readable storage medium is executed on a smart device, the smart device executes the wireless communication module identification method shown above.

[0159] The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium, or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0160] An embodiment of the present application also provides a computer program product including computer instructions. When the computer program product is run on a smart device, the smart device can execute the wireless communication module identification method shown above.

[0161] The computer storage medium and computer program product provided in the above-mentioned embodiments of the present application are used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects corresponding to the method provided above, and will not be repeated here.

[0162] In the above embodiments, it can also be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (such as: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital versatile disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)).

[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0164] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments applied for herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0165] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0167] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A smart device, characterized in that: include: A wireless communication module, wherein the wireless communication module comprises a plurality of pins; A main control module is integrated on the circuit board of the smart device and is used to determine the module information of the wireless communication module based on the level signal or waveform coding of at least one pin of the wireless communication module after the wireless communication module is plugged into the circuit board of the smart device, wherein the module information includes at least one of the following information: type information and frequency band information.

2. The smart device according to claim 1, characterized in that: If the multiple pins include at least two encoding pins, then: The at least two encoding pins are used to respectively output a high level signal and / or a low level signal after the wireless communication module establishes a connection with the smart device; The main control module is further used to obtain the type information of the wireless communication module by combining the high level signal and / or the low level signal respectively output by the at least two encoding pins.

3. The smart device according to claim 1, characterized in that: If the multiple pins include a pulse width modulation signal PWM pin, then: The PWM pin is used to output a PWM signal after the wireless communication module establishes a connection with the smart device, and obtain a waveform code based on the frequency and duty cycle of the PWM signal using a predetermined data protocol, and output the waveform code to the main control module; The main control module is further used to parse the waveform code using the predetermined data protocol to obtain the frequency and duty cycle of the PWM signal, and determine the type information and frequency band information of the wireless communication module according to the frequency and duty cycle of the PWM signal.

4. The smart device according to claim 3, characterized in that: The data frame structure of the predetermined data protocol includes: A synchronization header, including the frequency and duty cycle of the PWM signal, used to mark the beginning of a data frame; A type field is used to indicate the type information obtained by encoding the frequency; A data field is used to represent a data value obtained by encoding the duty cycle; Checksum field, used for error detection.

5. The smart device according to any one of claims 1 to 4, characterized in that: The multiple pins also include interrupt pins; The interrupt pin is used to output a high level signal when the wireless communication module establishes a connection with the smart device, and to output a low level signal when the wireless communication module is disconnected from the smart device; The main control module is used to determine that the wireless communication module is connected to the smart device when a high-level signal is detected output by the interrupt pin, and to determine that the wireless communication module is disconnected from the smart device when a low-level signal is detected output by the interrupt pin.

6. A method for identifying a wireless communication module, characterized in that: include: After the wireless communication module is plugged into a circuit board of a smart device, a level signal or a waveform code of at least one pin of the wireless communication module is obtained; Based on the level signal or waveform code of at least one pin of the wireless communication module, the module information of the wireless communication module is determined, and the module information includes at least one of the following information: type information and frequency band information.

7. The method according to claim 6, characterized in that If the multiple pins include at least two encoding pins, then: Acquiring a level signal of at least one pin of the wireless communication module, comprising: acquiring a high level signal and / or a low level signal respectively output by the at least two encoding pins; Based on the level signal of at least one pin of the wireless communication module, the module information of the wireless communication module is determined, including: according to the high level signal and / or low level signal respectively output by the at least two encoding pins, the type information of the wireless communication module is obtained by combining.

8. The method according to claim 6, characterized in that If the multiple pins include a pulse width modulation signal PWM pin, then: Acquiring a waveform code of at least one pin of the wireless communication module, comprising: obtaining the waveform code based on the frequency and duty cycle of a PWM signal using a predetermined data protocol; Based on the waveform coding of at least one pin of the wireless communication module, the module information of the wireless communication module is determined, including: using the predetermined data protocol to parse the waveform coding to obtain the frequency and duty cycle of the PWM signal, and determining the type information and frequency band information of the wireless communication module according to the frequency and duty cycle of the PWM signal.

9. An intelligent device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the smart device implements the method according to any one of claims 6 to 8.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed, causes the method according to any one of claims 6 to 8 to be performed.