CN108966251A - A kind of WiFi module baud rate collocation method, system and WiFi module - Google Patents

A kind of WiFi module baud rate collocation method, system and WiFi module Download PDF

Info

Publication number
CN108966251A
CN108966251A CN201810763867.0A CN201810763867A CN108966251A CN 108966251 A CN108966251 A CN 108966251A CN 201810763867 A CN201810763867 A CN 201810763867A CN 108966251 A CN108966251 A CN 108966251A
Authority
CN
China
Prior art keywords
baud rate
calibration data
wifi module
baud
terminal device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810763867.0A
Other languages
Chinese (zh)
Inventor
王思
黄斌
李明
陈立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Hongmei Intelligent Technology Co Ltd
Original Assignee
Sichuan Hongmei Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Hongmei Intelligent Technology Co Ltd filed Critical Sichuan Hongmei Intelligent Technology Co Ltd
Priority to CN201810763867.0A priority Critical patent/CN108966251A/en
Publication of CN108966251A publication Critical patent/CN108966251A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Communication Control (AREA)

Abstract

The present invention provides a kind of WiFi module baud rate collocation method, system and WiFi modules, this method comprises: S1: receiving the calibration data of external terminal device periodicity sending;S2: successively select be not selected baud rate as current baud rate from high to low sequence according to priority from least two stored baud rates;S3: parsing the calibration data received according to the current baud rate, obtains parsing calibration data;S4: judging whether the parsing calibration data is identical as preset standard calibration data, if so, executing S5, otherwise executes S1;S5: the current baud rate is configured to the work baud rate of the WiFi module;S6: successful match instruction is sent to the terminal device, so that the terminal device dwelling period sends the calibration data.This programme can reduce the degree of manual intervention in WiFi module baud rate configuration process.

Description

A kind of WiFi module baud rate collocation method, system and WiFi module
Technical field
The present invention relates to field of communication technology, in particular to a kind of WiFi module baud rate collocation method, system and WiFi Module.
Background technique
WiFi module is a kind of wireless mobile communication device for belonging to Internet of Things transport layer, traditional hardware device insertion It directly can be connected to internet using Wi-Fi wireless network after WiFi module, be to realize the Internet of Things applications such as wireless intelligent house Important component.In internet of things field, the number between WiFi module and terminal device is usually realized using serial communication According to transmission, but different terminal equipment carries out may having different traffic rates when serial communication, that is, has different bauds Rate needs to make baud rate and the institute of WiFi module to guarantee that WiFi module and terminal device can carry out normal serial communication The baud rate for connecting terminal device is identical.
Currently, being directed to the terminal device of each type, the baud rate according to the terminal device is needed, by manually Mode the baud rate of WiFi module is configured in software so that WiFi module and terminal device baud having the same Rate.
For the method for current configuration WiFi module baud rate, the terminal device of each type is required through artificial hand Baud rate in dynamic modification software code, developer need to be arranged according to different terminal devices the baud of WiFi module The degree of rate, WiFi module baud rate configuration process manual intervention is higher.
Summary of the invention
The embodiment of the invention provides a kind of WiFi module baud rate collocation method, system and WiFi modules, can reduce The degree of manual intervention in WiFi module configuration process.
In a first aspect, it is applied to WiFi module the embodiment of the invention provides a kind of WiFi module baud rate collocation method, Include:
S1: the calibration data of external terminal device periodicity sending is received;
S2: it successively selects not to be chosen from high to low sequence according to priority from least two stored baud rates One baud rate of middle mistake is as current baud rate;
S3: parsing the calibration data received according to the current baud rate, obtains parsing calibration data;
S4: judging whether the parsing calibration data is identical as preset standard calibration data, if so, executing Otherwise S5 executes S1;
S5: the current baud rate is configured to the work baud rate of the WiFi module;
S6: sending successful match instruction to the terminal device, so that described in terminal device dwelling period transmission Calibration data.
Optionally, after S4 judges that the parsing calibration data is identical as the standard calibration data, further comprise:
In stored at least two baud rate, it is excellent that highest is set by the priority of the current baud rate First grade.
Optionally,
At least two stored baud rates include at least two general standard baud rates, wherein described logical Standard baud rate includes 4800,9600,19200,38400 or 57600.
Optionally,
In at least two stored baud rates, the priority of the smaller baud rate of numerical value is higher.
Optionally, after S4 judges that the parsing calibration data is identical as the standard calibration data, further comprise:
For baud rate described in each of described at least two stored baud rates, obtains the baud rate and go through The accumulative number for being configured as the work baud rate of history is as successful match number;
According to the corresponding successful match time of the baud rate each in at least two stored baud rates Number, is updated the priority of at least two stored baud rates, so that the corresponding successful match number is got over The priority of more baud rates is higher.
Optionally, this method further comprises:
Receive externally input baud rate more new command;
New baud rate is deleted or stored to the stored baud rate according to the baud rate more new command.
Second aspect, the embodiment of the invention also provides a kind of WiFi modules, comprising: receiving unit, matching unit, configuration Unit and transmission unit;
The receiving unit, for receiving the calibration data of external terminal device periodicity sending;
The matching unit, for from least two stored baud rates according to priority from high to low sequence Successively select be not selected baud rate as current baud rate, according to the current baud rate to the reception The calibration data that unit receives carry out parsing obtain parsing calibration data, and judge the parsing calibration data whether with Preset standard calibration data are identical;
The configuration unit, for the judging result according to the matching unit, if so, the current baud rate is matched It is set to the work baud rate of the WiFi module, and triggers the transmission unit and refers to terminal device transmission successful match It enables, if not, trigger the receiving unit receives the calibration data that the terminal device is sent again;
The transmission unit sends successful match to the terminal device and refers to for the triggering according to the configuration unit It enables, so that the terminal device dwelling period sends the calibration data.
Optionally,
The configuration unit is further used for judging the parsing calibration data and the standard school in the matching unit After quasi- data are identical, set the priority of the current baud rate in stored at least two baud rate Highest priority.
Optionally,
The configuration unit is further used for judging the parsing calibration data and the standard school in the matching unit After quasi- data are identical, for baud rate described in each of described at least two stored baud rates, described in acquisition The accumulative number for being configured as the work baud rate of baud rate history is as successful match number, and according to described stored At least two baud rates in the corresponding successful match number of each baud rate, to described stored at least two The priority of a baud rate is updated, so that corresponding to the priority of the more baud rate of the successful match number more It is high.
The third aspect, the embodiment of the invention also provides a kind of WiFi module baud rates to configure system, comprising: terminal device Any one WiFi module provided with second aspect;
The terminal device is connected with the WiFi module by serial ports;
The terminal device for periodically sending the calibration data to the WiFi module, and comes from receiving After the successful match instruction of the WiFi module, stop to calibration data described in the WiFi module periodicity sending.
WiFi module baud rate configuration configuration method, system and WiFi module provided in an embodiment of the present invention, terminal device Periodicity sending calibration data, after receiving the calibration data that terminal device is sent each time, from stored each baud In rate according to priority from high to low one baud rate not being selected of sequential selection as current baud rate, later according to Current baud rate to the calibration data received carry out parsing obtain parsing calibration data, if obtain parsing calibration data with Preset standard calibration data are identical, then configure current baud rate to the work baud rate of WiFi module, and transmission Terminal device dwelling period is set to send calibration data with successfully instruction, the calibration number that otherwise receiving terminal apparatus is sent again According to.Terminal device sends calibration data according to its baud rate, only when current baud rate is identical as the baud rate of terminal device, Just can be identical as standard calibration data according to the parsing calibration data that current baud rate carries out parsing acquisition to calibration data, thus After successively stored each baud rate parses calibration data as current baud rate with standard calibration data into Row compares, and can determine the baud rate of terminal device, so configure the baud rate of WiFi module to it is identical as terminal device, The baud rate for realizing WiFi module adaptive terminal equipment, without the baud rate in developer's manual modification code, thus The degree of manual intervention in WiFi module baud rate configuration process can be reduced.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart of WiFi module baud rate collocation method provided by one embodiment of the present invention;
Fig. 2 is the schematic diagram of equipment where a kind of WiFi module provided by one embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of WiFi module provided by one embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of WiFi module baud rate configuration system provided by one embodiment of the present invention;
Fig. 5 is the flow chart of another WiFi module baud rate collocation method provided by one embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, being applied to WiFi mould the embodiment of the invention provides a kind of WiFi module baud rate collocation method Block, this method may comprise steps of:
Step 101: receiving the calibration data of external terminal device periodicity sending;
Step 102: successively being selected according to priority from high to low sequence from least two stored baud rates A baud rate not being selected is as current baud rate;
Step 103: the calibration data received being parsed according to current baud rate, obtains parsing calibration data;
Step 104: judging whether parsing calibration data is identical as preset standard calibration data, if so, executing Step 105, no to then follow the steps 101;
Step 105: configuring current baud rate to the work baud rate of WiFi module;
Step 106: successful match instruction is sent to terminal device, so that terminal device dwelling period sends calibration number According to.
WiFi module baud rate collocation method provided in an embodiment of the present invention, terminal device periodicity sending calibration data, After the calibration data for receiving terminal device transmission each time, according to priority from up to from stored each baud rate Low one baud rate not being selected of sequential selection is as current baud rate, later according to current baud rate to receiving Calibration data carries out parsing and obtains parsing calibration data, if the parsing calibration data and preset standard calibration number that obtain According to identical, then current baud rate is configured to the work baud rate of WiFi module, and send successful match instruction to make terminal device Dwelling period sends calibration data, the calibration data that otherwise receiving terminal apparatus is sent again.Terminal device is according to its baud Rate sends calibration data, only when current baud rate is identical as the baud rate of terminal device, according to current baud rate to calibration The parsing calibration data that data carry out parsing acquisition just can be identical as standard calibration data, thus successively will be stored each Baud rate is compared after parsing as current baud rate to calibration data with standard calibration data, can determine terminal The baud rate of equipment, and then configure the baud rate of WiFi module to identical as terminal device, it is adaptive to realize WiFi module The baud rate of terminal device, without the baud rate in developer's manual modification code, so as to reduce WiFi module baud The degree of manual intervention in rate configuration process.
Optionally, on the basis of WiFi module baud rate collocation method shown in Fig. 1, if judging to solve in step 104 It is identical as preset standard Calibration Data to analyse calibration data, illustrates that current baud rate is identical as the baud rate of terminal device, At this point, in stored each baud rate highest priority can be set by the priority of current baud rate.
After determining that a baud rate is identical as the baud rate of terminal device, highest is set by the priority of the baud rate Priority, when re-powering after WiFi module power-off, WiFi module can preferentially select the baud rate to send terminal device Calibration data is parsed, if the terminal device connecting with WiFi module is not replaced, only needs to carry out one to calibration data Secondary parsing can determine the baud rate of terminal device, can configure corresponding baud for the work baud rate of WiFi module Rate, so as to reduce configuration WiFi module baud rate, selection has stored time that baud rate parses calibration data in the process Number, and then promote the efficiency of WiFi module adaptive configuration baud rate.
Optionally, at least two general standard baud rates are stored in advance as the object selected, general standard wave Special rate can be 4800,9600,19200,38400 or 57600.For example, 4800,9600,19200,38400 and are stored in advance 57600 total 5 general standard baud rates are as the object selected.
General standard baud rate is the shared baud rate of most terminal devices, for example in intelligent appliance field, terminal is set Standby air-conditioning common baud rate when carrying out serial communication is 19200, and terminal device refrigerator is common when carrying out serial communication Baud rate is 9600.By multiple general standard baud rates, alternately baud rate is stored in WiFi module, guarantees WiFi mould Block by stored standard baud rate can with the baud rate successful match of most of terminal devices, i.e., for most of ends End equipment, WiFi module can be configured the work baud rate of itself to by way of adaptive baud rate and corresponding terminal Equipment is identical, and the success rate of itself baud rate is configured so as to promote WiFi module by adaptive baud rate mode.
Optionally, for stored each baud rate, each wave can be set according to the numerical value of each baud rate The priority of the smaller baud rate of the priority of special rate, specially numerical value is higher.
For example, stored baud rate includes 4800,9600,19200,38400 and 57600 total 5 baud rates, according to The sequence of priority from high to low, the ranking results of 5 baud rates are followed successively by 4800,9600,19200,38400,57600, That is after receiving the calibration data that terminal device is sent for the first time after WiFi module powers on, first by 4800 as current Baud rate parses calibration data, if parsing obtains parsing, calibration data is different from standard calibration data, by 9600 The calibration data received again is parsed as current baud rate, and so on until by 57600 be used as current bauds Rate.If by 57600 as current baud rate to receive calibration data carry out parsing acquisition parsing calibration data still with mark Quasi- calibration data is different, then the adaptive baud rate failure of WiFi module, needs developer by way of manually pair The baud rate of WiFi module is configured.
Optionally, the priority of baud rate has been stored other than it can be configured according to the numerical values recited of baud rate, also The number that can be arranged to WiFi module work baud rate according to baud rate is configured.Specifically, it determines and solves in step 104 After analysis calibration data is identical as standard calibration data, for each stored baud rate, the baud rate history is obtained The accumulative number for being configured as WiFi module work baud rate, the number that will acquire are defined as the successful match time of the baud rate Number carries out more the priority of stored each baud rate later according to the corresponding successful match number of each baud rate Newly, so that the priority of the more baud rate of Corresponding matching number of success is higher.
For example, 9600 numbers for being arranged to WiFi module work baud rate are greater than for stored 5 baud rates 19200 be arranged to WiFi module work baud rate number, 19200 be arranged to WiFi module work baud rate number it is big It is arranged to the number of WiFi module work baud rate in the number that 38400 are arranged to WiFi module work baud rate, 38400 It is arranged to the number of WiFi module operating bit rates greater than 4800,4800 are arranged to the number of WiFi module operating bit rates It is arranged to the number of WiFi module work baud rate, after the priority to 5 baud rates is updated, 5 greater than 57600 Baud rate is followed successively by 9600,19200,38400,4800,57600 according to the sequence of priority from high to low.
It should be noted that when acquisition baud rate history adds up to be configured as WiFi module work baud rate, and non-acquisition Some WiFi module works the facilities of baud rate in history, but obtains a large amount of WiFi modules and work in history baud rate Facilities, for example obtain the feelings that stored each baud rate is arranged to work baud rate in 100,000 WiFi modules Condition.Specifically, set work baud rate can be uploaded to unification after work baud rate is arranged by each WiFi module Server, each WiFi module, which can obtain each from above-mentioned server and store baud rate, later is arranged to operating wave The number of special rate.
It is further to note that previous embodiment will be arranged to the preferential of the baud rate of WiFi module work baud rate Grade is set as highest priority, which can be updated it to the priority of each baud rate completing the present embodiment After carry out.
The number that baud rate is arranged to WiFi module work baud rate is more, illustrates serially to be led to using the baud rate The quantity of the terminal device of letter is more, makes to be arranged to the more wave of WiFi module work baud rate number by updating priority The priority of special rate is higher, make WiFi module can preferentially select the more baud rates of counterpart terminal number of devices and terminal device into Row matching, it is possible to reduce the number that WiFi module selection baud rate parses calibration data, i.e. reduction WiFi module and end End equipment carries out the matched number of baud rate, so as to improve the efficiency of WiFi module configuration baud rate.
Optionally, it on the basis of above-mentioned each embodiment provided WiFi module baud rate collocation method, can also connect Externally input baud rate more new command is received, and stored baud rate is carried out according to the baud rate received more new command New baud rate is deleted or stored, realizes the update to baud rate has been stored.
Relative to stored each baud rate, when the terminal device for being carried out serial communication using new baud rate is occurred Or after quantity increases to certain numerical value, new baud rate can be stored into WiFi module, so that WiFi module can pass through Adaptive baud rate be normally carried out serial communication using the terminal device of new baud rate, promote the applicability of WiFi module.
For stored each baud rate, if the frequency of use of wherein one or more baud rates is very low, such as Frequency of use is lower than 5%, then can delete these baud rates from stored each baud rate, to promote WiFi module certainly Adapt to the rate of baud rate.
As shown in Figure 2 and Figure 3, the embodiment of the invention provides a kind of WiFi modules.WiFi module embodiment can be by soft Part is realized, can also be realized by way of hardware or software and hardware combining.For hardware view, as shown in Fig. 2, being this hair A kind of hardware structure diagram of equipment where the WiFi module that bright embodiment provides, in addition to processor shown in Fig. 2, memory, network Except interface and nonvolatile memory, the equipment in embodiment where device usually can also include other hardware, such as negative The forwarding chip etc. of duty processing message.Taking software implementation as an example, as shown in figure 3, being as the device on a logical meaning Computer program instructions corresponding in nonvolatile memory operation is read into memory by the CPU of equipment where it to be formed 's.WiFi module provided in this embodiment, comprising: receiving unit 301, matching unit 302, configuration unit 303 and transmission unit 304;
Receiving unit 301, for receiving the calibration data of external terminal device periodicity sending;
Matching unit 302, for from least two stored baud rates according to priority from high to low sequence It successively selects be not selected baud rate as current baud rate, receiving unit 301 is received according to current baud rate To calibration data carry out parsing obtain parsing calibration data, and judge parse calibration data whether with preset standard school Quasi- data are identical;
Configuration unit 303, for the judging result according to matching unit 302, if so, configuring current baud rate to The work baud rate of WiFi module, and trigger transmission unit 304 and send successful match instruction to terminal device, if not, triggering The receiving unit calibration data that receiving terminal apparatus is sent again;
Transmission unit 304 sends successful match instruction to terminal device for the triggering according to configuration unit 303, so that Terminal device dwelling period sends calibration data.
Optionally, on the basis of WiFi module shown in Fig. 3, configuration unit 303 is further used for sentencing in matching unit 302 After disconnected parsing calibration data is identical as standard calibration data, by the excellent of current baud rate in stored each baud rate First grade is set as highest priority, i.e., in stored each baud rate that the baud rate wherein with terminal device is identical The priority of one baud rate is set as highest priority.
Optionally, on the basis of WiFi module shown in Fig. 3, configuration module 303 is further used for sentencing in matching unit 302 When the parsing calibration data that breaks is identical as standard calibration data, for each stored baud rate, obtains the baud rate and go through Accumulative successful match number of the number as the baud rate for being arranged to work baud rate of history, and according to stored each The corresponding successful match number of baud rate, is updated the priority of stored each baud rate, so that Corresponding matching The priority of the more baud rate of number of success is higher.
It should be noted that the contents such as information exchange, implementation procedure between each unit in above-mentioned WiFi module, due to It is based on same design with embodiment of the present invention method, for details, please refer to the description in the embodiment of the method for the present invention, herein not It repeats again.
As shown in figure 4, one embodiment of the invention provides a kind of WiFi module baud rate configuration system, comprising: terminal Equipment 401 and WiFi module 402;
Terminal device 401 is connected with WiFi module 402 by serial ports;
Terminal device 401 is being received for periodically sending calibration data to WiFi module 402 from WiFi module After 402 successful match instruction, stop to 402 periodicity sending calibration data of WiFi module.
Optionally, on the basis of WiFi module baud rate configuration system shown in Fig. 4, terminal device can be refrigerator, sky The intelligent appliances such as tune, smoke exhaust ventilator, to receive the control instruction that the mobile terminals such as remote controler, mobile phone are sent by WiFi module, And operating state data can be sent to by mobile phone, cloud server etc. by WiFi module.
System is configured below with reference to WiFi module shown in Fig. 3 and WiFi module baud rate shown in Fig. 4, to of the invention real The WiFi module baud rate collocation method for applying example offer is described in further detail, as shown in figure 5, this method may include following Step:
Step 501: terminal device periodically sends calibration data to WiFi module.
In an embodiment of the invention, terminal device is connected by serial ports with WiFi module, in terminal device and After WiFi module powers on, terminal device periodically sends calibration data to WiFi module by serial ports.
For example, single-chip microcontroller included by refrigerator or MCU are connected by serial ports with WiFi module, and after refrigerator powers on, ice Case is every to send a calibration data, such as calibration number to WiFi module by serial ports by 30 seconds according to its intrinsic baud rate It is ABC123 according to the information for including.
The calibration data that step 502:WiFi module receiving terminal apparatus is sent.
In an embodiment of the invention, the WiFi module calibration data that receiving terminal apparatus is sent after the power-up.
For example, WiFi module, which powers on, is followed by the calibration data that ice collection case is sent by serial ports.
Step 503:WiFi module from stored baud rate select highest priority and this power on after be not chosen In a baud rate as current baud rate.
In an embodiment of the invention, after WiFi module receives calibration data transmitted by terminal device every time, from Select after this is powered on not selected and highest priority a baud rate as working as in stored each baud rate Preceding baud rate.
For example, 4800,9600,19200,38400 and 57600 total 5 baud rates are stored in WiFi module, and according to Priority from the ranking results of high to low 5 baud rates of sequence be 9600,19200,38400,4800,57600.If WiFi Calibration data received by module be its this power on after first calibration data receiving, then WiFi module is made 9600 For current baud rate;If calibration data received by WiFi module be its this power on after second calibration number receiving According to, then WiFi module is used as current baud rate for 19200, and so on.
Step 504:WiFi module parses the calibration data received according to current baud rate, obtains parsing calibration Data.
In an embodiment of the invention, WiFi module works as prewave by what is determined after determining current baud rate Special rate parses the calibration data received, obtains corresponding parsing calibration data.
For example, being 9600 pairs of schools received according to baud rate if WiFi module is used as current baud rate for 9600 Quasi- data are parsed, and corresponding parsing calibration data is obtained;If WiFi module is used as current baud rate for 19200, It is that 19200 pairs of calibration data received parse according to baud rate, obtains corresponding parsing calibration data.
Step 505:WiFi module judges whether the parsing calibration data obtained and standard calibration data are identical, if so, Step 506 is executed, it is no to then follow the steps 501.
In an embodiment of the invention, after parsing acquires parsing calibration data, WiFi module will obtain WiFi module The parsing calibration data obtained is compared with preset standard calibration data, if parsing calibration data and standard calibration number According to identical, illustrate that current baud rate is identical as the baud rate of terminal device, correspondingly execute step 506, if parsing calibration number According to different from standard calibration data, illustrate that current baud rate is different from the baud rate of terminal device, correspondingly return to step 501, the calibration data that receiving terminal apparatus is sent again.Wherein, letter included by calibration data transmitted by different terminal equipment Cease all the same, standard calibration data are the information that calibration data transmitted by terminal device includes.
For example, WiFi module parsed to the calibration data received by 19200 as current baud rate Calibration data, if obtain parsing calibration data it is identical with preset standard calibration data ABC123, illustrate and The baud rate for the refrigerator that WiFi module is connected is 19200, correspondingly executes step 506, if the parsing calibration data obtained Different from preset standard calibration data ABC123, then the baud rate for the refrigerator that explanation is connected with WiFi module is not 19200, correspondingly restart to execute step 501.
Current baud rate is set its work baud rate by step 506:WiFi module.
In an embodiment of the invention, WiFi module judgement parsing calibration data it is identical as standard calibration data after, WiFi module can determine that the baud rate of its connected terminal device is current baud rate, and WiFi module sets current baud rate It is set to its work baud rate, normal communication can be carried out according to identical baud rate and terminal device later.
For example, determining the parsing baud rate and standard for carrying out parsing acquisition to calibration data according to 19200 baud rate After calibration data is identical, WiFi module is set as its work baud rate for 19200, later WiFi module can be connected Refrigerator carries out normal serial communication.
Step 507:WiFi module sends successful match instruction to terminal device.
In an embodiment of the invention, after current baud rate is set its work baud rate by WiFi module, WiFi Module sends successful match instruction to terminal device.When terminal device receives the instruction of successful match transmitted by WiFi module Afterwards, terminal device dwelling period sends calibration data to WiFi module.
For example, WiFi module is after being set as its work baud rate for 19200, according to its work baud rate to being connected Refrigerator send successful match instruction, refrigerator receive successful match instruction after by dwelling period to WiFi module send school Quasi- data, until being re-powered after power-off.
The priority of current baud rate is set highest priority by step 508:WiFi module.
In an embodiment of the invention, WiFi module is in the baud rate for determining current baud rate with connect terminal device After identical, in stored each baud rate, the priority of current baud rate is set highest priority by WiFi module, It is preferentially matched afterwards by the baud rate of this successful match with terminal device so that next time powers on.
For example, WiFi module is after the baud rate for determining connected refrigerator is 19200, WiFi module is by baud rate 19200 are set as storing the baud rate in 5 baud rates with highest priority, after being provided with, according to corresponding priority From high to low sequence, 5 baud rates being stored are ordered as 19200,9600,38400,4800,57600.
It should be noted that each step included by above-described embodiment, is to clearly illustrate WiFi module Baud rate collocation method and when splitting out, can be not stringent between each step during practical business is realized it is successive Sequentially, for example step 508 can carry out before step 507, can also carry out simultaneously with step 507, step 507 and step 508 can also carry out before step 506.
The embodiment of the invention also provides a kind of readable medium, it is stored with and executes instruction on the readable medium, work as storage When executing instruction described in the processor execution of controller, the storage control executes the WiFi mould that above-mentioned each embodiment provides Block baud rate collocation method.
The embodiment of the invention also provides a kind of storage controls, comprising: processor, memory and bus;
The memory is executed instruction for storing, and the processor is connect with the memory by the bus, when When the storage control is run, the processor executes the described of memory storage and executes instruction, so that the storage Controller executes the WiFi module baud rate collocation method that above-mentioned each embodiment provides.
In conclusion WiFi module baud rate collocation method, system and WiFi module that each embodiment of the present invention provides, At least have the following beneficial effects:
1, in embodiments of the present invention, terminal device periodicity sending calibration data receives terminal device hair each time After the calibration data sent, it is not chosen according to priority from high to low sequential selection one from stored each baud rate The baud rate of middle mistake solved to the calibration data received according to current baud rate later as current baud rate Calibration data is analysed, if the parsing calibration data obtained is identical as preset standard calibration data, by current baud rate It is configured to the work baud rate of WiFi module, and sending successful match instruction makes terminal device dwelling period send calibration number According to the calibration data that otherwise receiving terminal apparatus is sent again.Terminal device sends calibration data according to its baud rate, only exists When current baud rate is identical as the baud rate of terminal device, the parsing of parsing acquisition is carried out to calibration data according to current baud rate Calibration data just can be identical as standard calibration data, thus successively using stored each baud rate as current baud rate pair Calibration data is compared after being parsed with standard calibration data, can determine the baud rate of terminal device, and then will The baud rate of WiFi module is configured to identical as terminal device, realizes the baud rate of WiFi module adaptive terminal equipment, nothing The baud rate in developer's manual modification code is needed, so as to reduce manual intervention in WiFi module baud rate configuration process Degree.
2, in embodiments of the present invention, after determining that a baud rate is identical as the baud rate of terminal device, by the baud The priority of rate is set as highest priority, and when re-powering after WiFi module power-off, WiFi module can preferentially select the wave The calibration data that special rate sends terminal device parses, if the terminal device connecting with WiFi module is not replaced, The baud rate that terminal device can be determined to calibration data progress one parsing is only needed, it can be by the operating wave of WiFi module Special rate is configured to corresponding baud rate, has stored baud rate pair so as to reduce selection during configuration WiFi module baud rate The number that calibration data is parsed, and then promote the efficiency of WiFi module adaptive configuration baud rate.
3, in embodiments of the present invention, by multiple general standard baud rates, alternately baud rate is stored in WiFi module In, guarantee WiFi module by stored standard baud rate can with the baud rate successful match of most of terminal devices, I.e. for most of terminal devices, WiFi module can be matched the work baud rate of itself by way of adaptive baud rate It is set to identical as corresponding terminal equipment, configures itself baud rate so as to promote WiFi module by adaptive baud rate mode Success rate.
4, in embodiments of the present invention, baud rate be arranged to WiFi module work baud rate number it is more, explanation makes The quantity for carrying out the terminal device of serial communication with the baud rate is more, makes to be arranged to WiFi module work by updating priority The priority for making the more baud rate of baud rate number is higher, makes WiFi module that can preferentially select counterpart terminal number of devices more Baud rate matched with terminal device, it is possible to reduce WiFi module select baud rate to calibration data parsed time Number, i.e. reduction WiFi module and terminal device carry out the matched number of baud rate, so as to improve WiFi module configuration baud The efficiency of rate.
5, it in embodiments of the present invention, relative to stored each baud rate, is gone here and there when using new baud rate After the terminal device appearance of row communication or quantity increase to certain numerical value, new baud rate can be stored into WiFi module, So that WiFi module can be normally carried out serial communication by adaptive baud rate and using the terminal device of new baud rate, mention Rise the applicability of WiFi module.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence " including one ", is not arranged Except there is also other identical factors in the process, method, article or apparatus that includes the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (10)

1. a kind of WiFi module baud rate collocation method is applied to WiFi module characterized by comprising
S1: the calibration data of external terminal device periodicity sending is received;
S2: it successively selects not to be selected from high to low sequence according to priority from least two stored baud rates A baud rate as current baud rate;
S3: parsing the calibration data received according to the current baud rate, obtains parsing calibration data;
S4: judging whether the parsing calibration data is identical as preset standard calibration data, if so, S5 is executed, it is no Then execute S1;
S5: the current baud rate is configured to the work baud rate of the WiFi module;
S6: successful match instruction is sent to the terminal device, so that the terminal device dwelling period sends the calibration Data.
2. the method according to claim 1, wherein judging the parsing calibration data and the standard school in S4 After quasi- data are identical, further comprise:
In stored at least two baud rate, it is preferential that highest is set by the priority of the current baud rate Grade.
3. the method according to claim 1, wherein
At least two stored baud rates include at least two general standard baud rates, wherein described general Standard baud rate includes 4800,9600,19200,38400 or 57600.
4. the method according to claim 1, wherein
In at least two stored baud rates, the priority of the smaller baud rate of numerical value is higher.
5. the method according to claim 1, wherein judging the parsing calibration data and the standard school in S4 After quasi- data are identical, further comprise:
For baud rate described in each of described at least two stored baud rates, it is tired to obtain the baud rate history Meter is configured as the number of the work baud rate as successful match number;
It is right according to the corresponding successful match number of the baud rate each in at least two stored baud rates The priority of at least two stored baud rates is updated, so that the institute that the corresponding successful match number is more The priority for stating baud rate is higher.
6. according to claim 1 to any method in 5, which is characterized in that further comprise:
Receive externally input baud rate more new command;
New baud rate is deleted or stored to the stored baud rate according to the baud rate more new command.
7. a kind of WiFi module characterized by comprising receiving unit, matching unit, configuration unit and transmission unit;
The receiving unit, for receiving the calibration data of external terminal device periodicity sending;
The matching unit, for from least two stored baud rates according to priority from high to low sequence successively Select be not selected baud rate as current baud rate, according to the current baud rate to the receiving unit The calibration data received carry out parsing obtain parsing calibration data, and judge the parsing calibration data whether in advance The standard calibration data of setting are identical;
The configuration unit, for the judging result according to the matching unit, if so, configuring the current baud rate to The work baud rate of the WiFi module, and trigger the transmission unit and send successful match instruction to the terminal device, such as Fruit is no, triggers the receiving unit and receives the calibration data that the terminal device is sent again;
The transmission unit sends successful match instruction to the terminal device for the triggering according to the configuration unit, with The terminal device dwelling period is set to send the calibration data.
8. WiFi module according to claim 7, which is characterized in that
The configuration unit is further used for judging the parsing calibration data and the standard calibration number in the matching unit After identical, highest is set by the priority of the current baud rate in stored at least two baud rate Priority.
9. WiFi module according to claim 7, which is characterized in that
The configuration unit is further used for judging the parsing calibration data and the standard calibration number in the matching unit After identical, for baud rate described in each of described at least two stored baud rates, the baud is obtained The accumulative number for being configured as the work baud rate of rate history as successful match number, and according to it is described it is stored extremely The corresponding successful match number of each baud rate in few two baud rates, at least two stored waves The priority of special rate is updated, so that the priority for corresponding to the more baud rate of the successful match number is higher.
10. a kind of WiFi module baud rate configures system characterized by comprising appoint in terminal device and claim 7 to 9 WiFi module described in one;
The terminal device is connected with the WiFi module by serial ports;
The terminal device for periodically sending the calibration data to the WiFi module, and is being received from described After the successful match instruction of WiFi module, stop to calibration data described in the WiFi module periodicity sending.
CN201810763867.0A 2018-07-12 2018-07-12 A kind of WiFi module baud rate collocation method, system and WiFi module Pending CN108966251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810763867.0A CN108966251A (en) 2018-07-12 2018-07-12 A kind of WiFi module baud rate collocation method, system and WiFi module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810763867.0A CN108966251A (en) 2018-07-12 2018-07-12 A kind of WiFi module baud rate collocation method, system and WiFi module

Publications (1)

Publication Number Publication Date
CN108966251A true CN108966251A (en) 2018-12-07

Family

ID=64483013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810763867.0A Pending CN108966251A (en) 2018-07-12 2018-07-12 A kind of WiFi module baud rate collocation method, system and WiFi module

Country Status (1)

Country Link
CN (1) CN108966251A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656172A (en) * 2018-12-24 2019-04-19 深圳市道通科技股份有限公司 A kind of method, apparatus obtaining baud rate
CN109739562A (en) * 2018-12-28 2019-05-10 潍柴动力股份有限公司 A kind of data processing method and control electronics
CN111431668A (en) * 2020-04-22 2020-07-17 珠海格力电器股份有限公司 Baud rate switching method based on multi-node UART communication, air conditioning system and processor
CN112533158A (en) * 2020-11-30 2021-03-19 广东万和新电气股份有限公司 WiFi module generalization method and WiFi module
CN115776365A (en) * 2021-09-07 2023-03-10 合肥移瑞通信技术有限公司 Method and system for correcting serial port baud rate, communication module and storage medium
CN117134841A (en) * 2023-10-27 2023-11-28 南京朗立微集成电路有限公司 Method for generating WIFI calibration data source and calibration method of WIFI transmitting link

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5742622A (en) * 1996-03-12 1998-04-21 Discovision Associates Error detection and correction system for a stream of encoded data
US20060067282A1 (en) * 2004-09-24 2006-03-30 Aes Corporation Link layered networks
CN1791103A (en) * 2005-10-20 2006-06-21 上海电器科学研究所(集团)有限公司 Field bus communication adapter with configurable characteristic
CN201004645Y (en) * 2006-12-05 2008-01-09 深圳市国电南思系统控制有限公司 Recording and analysis device for communication regulation breach
CN102325017A (en) * 2011-09-06 2012-01-18 天津汇讯视通科技有限公司 Communication speed adaption method for ball machine
CN103389960A (en) * 2013-07-26 2013-11-13 山东康威通信技术股份有限公司 Method and device for self-adapting of Baud rate in field of power monitoring
CN103514127A (en) * 2012-06-15 2014-01-15 中国航天科工集团第三研究院第八三五八研究所 Implementation method for achieving self-adaption of baud rate
CN103684678A (en) * 2012-11-01 2014-03-26 国网电力科学研究院 Baud rate adaptive method for UART, device and UART
CN103905381A (en) * 2012-12-26 2014-07-02 苏州工业园区新宏博通讯科技有限公司 Method for electricity meter to realize baud rate adaptive communication
CN104734900A (en) * 2013-12-21 2015-06-24 昊宏广泰(北京)科技有限公司 Sending control method for communication protocol testing
CN105049151A (en) * 2015-07-03 2015-11-11 福州瑞芯微电子股份有限公司 Method for controlling serial port communication and communication serial port
US20170005819A1 (en) * 2006-01-31 2017-01-05 Sigma Designs, Inc. Method and system for synchronization and remote control of controlling units
US20170115672A1 (en) * 2015-10-23 2017-04-27 The Toro Company Two-Wire Irrigation Communication System
CN107634862A (en) * 2017-10-25 2018-01-26 杭州轨物科技有限公司 Wireless modbus systems based on Lora technologies

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5742622A (en) * 1996-03-12 1998-04-21 Discovision Associates Error detection and correction system for a stream of encoded data
US20060067282A1 (en) * 2004-09-24 2006-03-30 Aes Corporation Link layered networks
CN1791103A (en) * 2005-10-20 2006-06-21 上海电器科学研究所(集团)有限公司 Field bus communication adapter with configurable characteristic
US20170005819A1 (en) * 2006-01-31 2017-01-05 Sigma Designs, Inc. Method and system for synchronization and remote control of controlling units
CN201004645Y (en) * 2006-12-05 2008-01-09 深圳市国电南思系统控制有限公司 Recording and analysis device for communication regulation breach
CN102325017A (en) * 2011-09-06 2012-01-18 天津汇讯视通科技有限公司 Communication speed adaption method for ball machine
CN103514127A (en) * 2012-06-15 2014-01-15 中国航天科工集团第三研究院第八三五八研究所 Implementation method for achieving self-adaption of baud rate
CN103684678A (en) * 2012-11-01 2014-03-26 国网电力科学研究院 Baud rate adaptive method for UART, device and UART
CN103905381A (en) * 2012-12-26 2014-07-02 苏州工业园区新宏博通讯科技有限公司 Method for electricity meter to realize baud rate adaptive communication
CN103389960A (en) * 2013-07-26 2013-11-13 山东康威通信技术股份有限公司 Method and device for self-adapting of Baud rate in field of power monitoring
CN104734900A (en) * 2013-12-21 2015-06-24 昊宏广泰(北京)科技有限公司 Sending control method for communication protocol testing
CN105049151A (en) * 2015-07-03 2015-11-11 福州瑞芯微电子股份有限公司 Method for controlling serial port communication and communication serial port
US20170115672A1 (en) * 2015-10-23 2017-04-27 The Toro Company Two-Wire Irrigation Communication System
CN107634862A (en) * 2017-10-25 2018-01-26 杭州轨物科技有限公司 Wireless modbus systems based on Lora technologies

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656172A (en) * 2018-12-24 2019-04-19 深圳市道通科技股份有限公司 A kind of method, apparatus obtaining baud rate
CN109739562A (en) * 2018-12-28 2019-05-10 潍柴动力股份有限公司 A kind of data processing method and control electronics
CN111431668A (en) * 2020-04-22 2020-07-17 珠海格力电器股份有限公司 Baud rate switching method based on multi-node UART communication, air conditioning system and processor
CN111431668B (en) * 2020-04-22 2021-04-06 珠海格力电器股份有限公司 Baud rate switching method based on multi-node UART communication, air conditioning system and processor
CN112533158A (en) * 2020-11-30 2021-03-19 广东万和新电气股份有限公司 WiFi module generalization method and WiFi module
CN112533158B (en) * 2020-11-30 2021-12-10 广东万和新电气股份有限公司 WiFi module generalization method and WiFi module
CN115776365A (en) * 2021-09-07 2023-03-10 合肥移瑞通信技术有限公司 Method and system for correcting serial port baud rate, communication module and storage medium
CN117134841A (en) * 2023-10-27 2023-11-28 南京朗立微集成电路有限公司 Method for generating WIFI calibration data source and calibration method of WIFI transmitting link
CN117134841B (en) * 2023-10-27 2024-01-09 南京朗立微集成电路有限公司 Method for generating WIFI calibration data source and calibration method of WIFI transmitting link

Similar Documents

Publication Publication Date Title
CN108966251A (en) A kind of WiFi module baud rate collocation method, system and WiFi module
CN109147788B (en) Local voice library updating method and device
EP3605323A1 (en) Method for generating network slice template and for applying network slice template, and apparatus
CN106713047A (en) Node upgrading method and system in mesh network
CN109547306A (en) A kind of smart home device management method, system, intelligent gateway and server
CN104796464A (en) Multi-protocol conversion warning condition information remote transmission system and method based on MODBUS
CN110213102B (en) Device control method, device, electronic device and storage medium
CN104601203A (en) Dynamic connection parameter regulation method and device for low-power consumption Bluetooth equipment
CN109753034B (en) Control method, control device, electronic equipment and storage medium
CN106411667A (en) Network chip based smart home multi-cloud control method and system
CN111913397B (en) Device control method, device, storage medium, and electronic apparatus
CN104468547A (en) Long connection establishing method, device and system
CN109644465A (en) A kind of resource allocation method and device, computer storage medium
CN112887416B (en) Frequency adjustment method and device for sending keep-alive packets
CN103780472A (en) Selected port management method and device of aggregate port group
CN108966168A (en) Internet of Things gauge table, communication board and the Internet of Things gauge table means of communication based on NB-IoT
CN112714159A (en) Message forwarding method and device, storage medium and electronic device
CN105635999A (en) Intelligent terminal and management method of multi-card data traffic
CN110519258A (en) Equipment accesses account control method, control device and readable storage medium storing program for executing
CN107547315B (en) Method and device for optimizing data communication
CN204465598U (en) A kind of multiprotocol conversion alert Information Remote Transmission System based on MODBUS
CN107590981A (en) A kind of LORAWAN ammeters communication module and its control method
CN112752307A (en) Control method, data processing apparatus, control system, and storage medium
CN113596235A (en) Operation instruction issuing method and device, storage medium and electronic device
CN112698948A (en) Method and device for acquiring product resources, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181207