CN112506834A - Baud rate self-adaption method based on power carrier mobile data extender - Google Patents
Baud rate self-adaption method based on power carrier mobile data extender Download PDFInfo
- Publication number
- CN112506834A CN112506834A CN202011242779.XA CN202011242779A CN112506834A CN 112506834 A CN112506834 A CN 112506834A CN 202011242779 A CN202011242779 A CN 202011242779A CN 112506834 A CN112506834 A CN 112506834A
- Authority
- CN
- China
- Prior art keywords
- baud rate
- serial port
- module
- method based
- mobile data
- 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.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
- G06F13/4081—Live connection to bus, e.g. hot-plugging
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y30/00—IoT infrastructure
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a baud rate self-adaption method based on a power carrier mobile data extender, which comprises the following steps: s1: identifying a keyword AT; s2: locking default baud rate, detecting, successfully identifying and locking the baud rate; s3: if the default baud rate identification fails, polling all baud rates, detecting baud rate interfaces, and switching each baud rate interface by adopting a time control strategy; s4: the baud rate self-adaption method based on the power carrier mobile data extender is different from the prior art, and further can quickly identify the baud rate of the terminal interface in the real-time use process under the condition that the baud rate of the terminal does not need to be known, so that the communication between the extender and the terminal interface is quickly realized, the standardized plug-and-play is realized, great convenience is brought to the field use, and the development of the interface technology of the internet of things is promoted.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a baud rate self-adaption method based on a power carrier mobile data extender.
Background
With the application development of large-scale internet of things such as a smart grid and the like, more and more serial interface baud rates between intelligent devices and between device modules exist, and the serial interface baud rates can be normally used only by being preset in advance or being defined in advance.
Especially, due to the limitations of equipment cost, technology type selection, application scenario and consideration of anti-interference, some equipment cannot be configured according to the default baud rate of another equipment, that is, the baud rate of another equipment module or equipment needs to be adjusted, but in the adjusting process, not only the modification method of the baud of the original equipment needs to be known, but also the baud rate modification methods of different devices may be different, and at the same time, different terminal interfaces have different baud rate parameters, which causes the baud rate modification work to be troublesome, the method has the advantages that great inconvenience is caused in the using process, the identification time is possibly too long or the identification cannot be carried out, great inconvenience is brought to field use, the device universality and the plug and play convenience cannot be realized, the universality and the standardization of communication devices of the Internet of things are not facilitated, the technical development of the Internet of things is severely restricted, and therefore, the baud rate self-adaption method based on the power carrier mobile data stretcher is provided.
Disclosure of Invention
The present invention aims to provide a baud rate adaptive method based on a power carrier mobile data extender, so as to solve the problems proposed in the background art.
In order to achieve the purpose, the invention provides the following technical scheme: a baud rate self-adaption method based on a power carrier mobile data extender comprises
S1: identifying a keyword AT;
s2: locking default baud rate, detecting, successfully identifying and locking the baud rate;
s3: if the default baud rate identification fails, polling all baud rates, detecting baud rate interfaces, and switching each baud rate interface by adopting a time control strategy;
s4: polling baud rate keywords, identifying the keywords successfully, and locking the polling baud rate.
Preferably, the step of identifying the keyword AT includes a cache module, a baud rate analysis module, a serial port receiving module, and a serial port sending module;
a cache module: the device is used for receiving and caching the serial port level signal in real time and outputting a delayed serial port level signal;
a Baud rate analysis module: the system comprises a serial port level cache module, a data processing module and a data processing module, wherein the serial port level cache module is used for performing baud rate analysis on a cached serial port level signal in real time, analyzing the minimum pulse width of the serial port level signal, obtaining the baud rate of a serial port according to the minimum pulse width, and sending an enabling instruction for outputting a delayed serial port level signal to the serial port level cache module;
a serial port receiving module: the serial port module is used for receiving a delayed serial port level signal according to the baud rate analyzed by the baud rate analyzing module in real time to obtain serial port data and matching the serial port baud rates of the serial port receiving module and the serial port sending module;
the serial port sending module: used for sending serial port level signals.
Preferably, the serial port receiving module further includes a serial port analyzing module, configured to analyze the serial port data according to the analyzed baud rate to obtain the serial port data.
Preferably, the baud rate analysis module calculates the minimum pulse width of the serial port level signal by a least common multiple method.
Preferably, the buffer module is in a FIFO buffer mode.
Preferably, the polling baud rate adopts a baud rate polling identification algorithm, and the algorithm adopts a control strategy of quickly sampling and adjusting the detection time according to the baud rate changing baud rate.
Preferably, the time control strategy adjusts the corresponding detection time according to the baud rate of the current polling baud rate, so as to ensure the synchronization with the communication rhythm.
Preferably, the method simultaneously adopts a self-learning strategy, identifies the working mechanism of the terminal, continuously optimizes the identification time and carries out quick synchronization.
Compared with the prior art, the invention has the beneficial effects that:
the method is different from the prior art, and can quickly identify the baud rate of the terminal interface in the real-time use process under the condition of not knowing the baud rate of the terminal, thereby quickly realizing the communication between the extender and the terminal interface, realizing the standardized plug-and-play, bringing great convenience to the field use and promoting the development of the Internet of things interface technology.
Drawings
Fig. 1 is a schematic flow chart of the baud rate adaptive method of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present invention provides a technical solution: a baud rate self-adaption method based on a power carrier mobile data extender comprises
S1: the mobile data is transmitted by adopting an AT instruction set, and if the detection is successful, the step S4 is entered;
s2: the baud rate adopted by most intelligent terminals is 115200bps, so the default baud rate adopts 115200bps, and the default baud rate value is adopted to detect keywords; if the detection is successful, carrying out baud rate locking;
s3: when the detection of the default baud rate fails, switching the baud rate to perform key word frame detection, judging that baud identification fails through a time control strategy, and when the detection of the switching baud rate fails, polling other baud rates, and performing secondary detection according to the method of S1;
s4: when the keyword is detected successfully, baud rate storage is carried out, and the identified baud rate information is transmitted to the host end of the extender through the power line carrier.
It should be noted that S1 is a precondition of S3, and is a condition for S3 to determine that the recognition baud rate fails, the method selects "AT" as a keyword recognized by the method by analyzing the feature word of the terminal remote data transmission, and screening from the occurrence frequency and fault tolerance of the feature word according to the terminal transmission feature word, and since the AT is a character set with a high occurrence frequency in the mobile data, the method has a good fault tolerance feature in terms of communication, and can achieve the effects of rapid recognition and ready recognition.
The step of identifying the key word AT comprises a cache module, a baud rate analysis module, a serial port receiving module and a serial port sending module;
a cache module: the device is used for receiving and caching the serial port level signal in real time and outputting a delayed serial port level signal;
a Baud rate analysis module: the system comprises a serial port level cache module, a data processing module and a data processing module, wherein the serial port level cache module is used for performing baud rate analysis on a cached serial port level signal in real time, analyzing the minimum pulse width of the serial port level signal, obtaining the baud rate of a serial port according to the minimum pulse width, and sending an enabling instruction for outputting a delayed serial port level signal to the serial port level cache module;
a serial port receiving module: the serial port module is used for receiving a delayed serial port level signal according to the baud rate analyzed by the baud rate analyzing module in real time to obtain serial port data and matching the serial port baud rates of the serial port receiving module and the serial port sending module;
the serial port sending module: used for sending serial port level signals.
The serial port receiving module also comprises a serial port analyzing module which is used for analyzing the serial port data according to the analyzed baud rate to obtain the serial port data.
And the baud rate analysis module calculates the minimum pulse width of the serial port level signal by a least common multiple method.
The buffer module is in a FIFO buffer mode.
The polling baud rate adopts a baud rate polling identification algorithm which adopts a control strategy of quickly sampling and adjusting the detection time according to the baud rate changing baud rate.
The time control strategy adjusts the corresponding detection time according to the baud rate of the current polling baud rate, and ensures that the detection time is synchronous with the rhythm of communication.
The method simultaneously adopts a self-learning strategy, identifies the working mechanism of the terminal, continuously optimizes the identification time and carries out quick synchronization.
According to the scheme, the power acquisition device can be well compatible with the existing running power acquisition device, the problem of a moving signal blind area of the existing power device running on site is solved, meanwhile, the baud rate of the extender host carries out mirroring, the host can be well adapted to the power acquisition device, the communication rate is matched, and a series of problems caused by unmatched baud rate or asynchronous working are solved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (8)
1. A baud rate self-adaption method based on a power carrier mobile data extender comprises the following steps:
s1: identifying a keyword AT;
s2: locking default baud rate, detecting, successfully identifying and locking the baud rate;
s3: if the default baud rate identification fails, polling all baud rates, detecting baud rate interfaces, and switching each baud rate interface by adopting a time control strategy;
s4: polling baud rate keywords, identifying the keywords successfully, and locking the polling baud rate.
2. The baud rate adaptation method based on the power carrier mobile data extender as claimed in claim 1, wherein: the step of identifying the key word AT comprises a cache module, a baud rate analysis module, a serial port receiving module and a serial port sending module;
a cache module: the device is used for receiving and caching the serial port level signal in real time and outputting a delayed serial port level signal;
a Baud rate analysis module: the system comprises a serial port level cache module, a data processing module and a data processing module, wherein the serial port level cache module is used for performing baud rate analysis on a cached serial port level signal in real time, analyzing the minimum pulse width of the serial port level signal, obtaining the baud rate of a serial port according to the minimum pulse width, and sending an enabling instruction for outputting a delayed serial port level signal to the serial port level cache module;
a serial port receiving module: the serial port module is used for receiving a delayed serial port level signal according to the baud rate analyzed by the baud rate analyzing module in real time to obtain serial port data and matching the serial port baud rates of the serial port receiving module and the serial port sending module;
the serial port sending module: used for sending serial port level signals.
3. The baud rate adaptation method based on the power carrier mobile data extender as claimed in claim 2, wherein: the serial port receiving module also comprises a serial port analyzing module which is used for analyzing the serial port data according to the analyzed baud rate to obtain the serial port data.
4. The baud rate adaptation method based on the power carrier mobile data extender of claim 3, wherein: and the baud rate analysis module calculates the minimum pulse width of the serial port level signal by a least common multiple method.
5. The baud rate adaptation method based on power carrier mobile data extender of claim 4, wherein: the buffer module is in a FIFO buffer mode.
6. The baud rate adaptation method based on the power carrier mobile data extender of claim 5, wherein: the polling baud rate adopts a baud rate polling identification algorithm which adopts a control strategy of quickly sampling and adjusting the detection time according to the baud rate changing baud rate.
7. The baud rate adaptation method based on power carrier mobile data extender of claim 6, wherein: the time control strategy adjusts the corresponding detection time according to the baud rate of the current polling baud rate, and ensures that the detection time is synchronous with the rhythm of communication.
8. The baud rate adaptation method based on the power carrier mobile data extender of claim 7, wherein: the method simultaneously adopts a self-learning strategy, identifies the working mechanism of the terminal, continuously optimizes the identification time and carries out quick synchronization.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011242779.XA CN112506834A (en) | 2020-11-10 | 2020-11-10 | Baud rate self-adaption method based on power carrier mobile data extender |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011242779.XA CN112506834A (en) | 2020-11-10 | 2020-11-10 | Baud rate self-adaption method based on power carrier mobile data extender |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112506834A true CN112506834A (en) | 2021-03-16 |
Family
ID=74955729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011242779.XA Withdrawn CN112506834A (en) | 2020-11-10 | 2020-11-10 | Baud rate self-adaption method based on power carrier mobile data extender |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112506834A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113891183A (en) * | 2021-08-26 | 2022-01-04 | 宁波三星智能电气有限公司 | Bidirectional interactive communication baud rate self-adaption method |
-
2020
- 2020-11-10 CN CN202011242779.XA patent/CN112506834A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113891183A (en) * | 2021-08-26 | 2022-01-04 | 宁波三星智能电气有限公司 | Bidirectional interactive communication baud rate self-adaption method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111600380B (en) | Household transformer relation identification method based on variable load and constant current detection | |
CN112818891B (en) | Intelligent identification method for communication interference signal type | |
CN114760172B (en) | Method and device for identifying radio frequency baseband comprehensive characteristic signals | |
CN103957551B (en) | Communications status method for real-time monitoring in automatic weather station | |
CN112506834A (en) | Baud rate self-adaption method based on power carrier mobile data extender | |
CN108538290A (en) | A kind of intelligent home furnishing control method based on audio signal detection | |
CN109548046B (en) | Channel self-adaptive cross-protocol communication system and method | |
CN117176270B (en) | Indoor antenna with signal monitoring function and monitoring method thereof | |
CN113032320B (en) | Asynchronous serial port communication baud rate self-adaption method | |
CN110441652A (en) | It is a kind of highly sensitive outer to apply signal type fault location system and method | |
CN117743120A (en) | Network card abnormality detection method based on big data technology | |
CN112929056A (en) | Intelligent detection method and system for carrier communication module | |
CN112398701A (en) | Intelligent voice recognition system based on internet application | |
CN116961799A (en) | Signal interference detection method based on time-frequency domain distribution characteristics | |
CN116975766A (en) | Power distribution network fault self-healing method and system based on machine learning | |
CN111443258A (en) | Power grid fault recording graph conversion method and device | |
CN111245627B (en) | Communication terminal device and communication method | |
CN113917294B (en) | Intelligent self-adaptive arc detection method based on wavelet decomposition and application device thereof | |
CN111596564B (en) | Smart home management system based on WiFi gesture recognition | |
CN114363865A (en) | Parallel synchronization method and device for vehicle-mounted Ethernet device | |
CN206442390U (en) | A kind of data network test platform of the network switch | |
KR100447165B1 (en) | detecting method of communication speed in device through receiver signal detection | |
EP1432205A3 (en) | Automatic detecting method for protocol nonconformity and automatic detecting apparatus for protocol nonconformity | |
CN213991113U (en) | Intelligent lighting control system of hotel guest room | |
CN210136282U (en) | Novel electric power link up circuit trouble is from range finding on line 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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210316 |
|
WW01 | Invention patent application withdrawn after publication |