The AT command uses a standard serial port for data transmission and reception, which converts the previously complicated device communication method into a simple serial port programming, which greatly simplifies the hardware design and software development cost of the product. This makes almost all network modules such as GPRS, 3G/4G, NB-IoT, Bluetooth, WiFi, GPS and other modules all use AT commands.

With the development of the Internet of Things era, AT commands are widely used in the development mode of the Internet of Things such as single-chip microcomputer (MCU) + network module. However, for the AT commands of different devices, the data transmission and analysis methods are very different, which is directly Increasing the complexity of development is also not conducive to code maintenance and reuse.

In order to solve the problem of repeated development caused by the difference between the AT commands of different network modules, RT-Thread released AT components for AT equipment development.

image.png

RT-Thread AT component solution

Introduction to RT-Thread AT Components

Our AT component is the realization of AT client and server based on RT-Thread system.

image.png

Introduction to RT-Thread AT Components

1. AT command client

It is mainly used in the scenario of MCU + AT module, and the MCU is the AT command client. Its main features are as follows:

URC data processing: a complete URC data processing method;

Data analysis: Support custom response data analysis method to facilitate the acquisition of relevant information in the response data;

Debug mode: Provide a command line interactive mode, mainly used for device debugging;

AT Socket: Provide a standard network programming interface;

Low resource consumption: 4.6K ROM and 2.0K RAM.

URC: The full name is Unsolicited Result Code (Unsolicited Result Code), specifically refers to the data that the AT server actively sends to the AT client. Generally, it will be sent under special circumstances, with a certain degree of randomness.

2. AT command server

It is often used inside the AT module, so that the AT module can build in some AT commands. Its main features are as follows:

Basic commands: realize a variety of general basic commands;

Command compatibility: Command supports ignoring case to improve command compatibility;

Command detection: Command supports self-defined parameter expressions, and realizes the function of self-detection of received command parameters;

Command registration: Provide a simple way to add user-defined commands;

Debugging mode: Provides a command line interactive mode, mainly used for device debugging.

Low resource consumption: 4.0K ROM and 2.5K RAM.

Innovation of AT components

The AT components of RT-Thread not only have comprehensive and complete functions, but also fully consider the details of user use, debugging and testing. While ensuring low resource usage, it also allows users to use it very smoothly. These are the innovations we made:

1. Flexible response data analysis method

The analysis of response data is another major problem in the development of AT modules. Different device commands and the response data analysis methods of different commands of the same device may be very different, which greatly increases the difficulty for developers to obtain valid data from response data.

RT-Thread provides multiple parsing interfaces for the analysis of response data. For example: it can be parsed by line number or by keyword search and analysis. The parsing method also uses standard scanf expressions, which support regular expressions. Enables developers to easily analyze the important data they want while saving the original response data.

2. Complete URC data processing mechanism

URC data is the data actively sent by the server, which is usually sent only under special circumstances, such as: boot log, network connection prompt, etc. For these special situations, developers often have a headache.

Because URC data generally does not have a fixed format and may be sent randomly, poor processing can easily affect the entire data interaction process. Therefore, a very complete mechanism is required for URC processing.

At present, the AT component has a powerful URC processing framework to ensure that each URC data can be processed reasonably and supports custom operations for each URC data.

3. Simplify the sending and receiving process of AT commands

For the traditional AT module development process, the entire process of sending and receiving an AT command may require multiple steps, including command sending, sending result judgment, receiving response data, and response result judgment. And different commands are handled differently, making it difficult to reuse the code.

The command sending and receiving in the AT component only needs to be realized through a function, and the function returns the response result and processes the response data, which is convenient for subsequent use. Greatly simplifies the interaction process.

4. Provide a standard network programming interface

After using the AT module, a general single-chip microcomputer can complete functions such as network connection and data transparent transmission of the device through AT commands. But it is difficult to reuse the code that has been developed before, based on the standard BSD Socket API, such as MQTT, HTTP, Web Socket, etc. Even if the Internet access function is realized on a module, it is difficult to reuse it in other products in the end.

The AT component of RT-Thread implements the AT Socket function on the basis of the AT client, which is an implementation of SAL (Socket Abstraction Layer). Provide a standard BSD Socket network programming interface for the upper layer. In products using AT modules, the network development code is greatly simplified and the software reusability is enhanced.

RT-Thread has been docked with commonly used AT modules

Currently RT-Thread has provided docking files for Quectel's M26 GPRS module and Espressif's ESP8266 WiFi module. RT-Thread will also give priority to other popular wireless modules (please leave a message to tell us which AT module you want RT-Thread to support first). Developers can follow the AT component programming manual provided by RT-Thread (https:// ) Conveniently and quickly complete the docking by yourself.

Zener Diodes

SMA means surface mount assembly. It is a new generation of electronic assembly technology, which compresses traditional electronic components into a device with a volume of only a few tenths.
Surface mounting is not a new concept, it is derived from earlier processes, such as flat mounting and mixed mounting.
For the assembly of electronic circuits, a point-to-point wiring method was initially adopted, and there was no substrate at all. The packaging of the first semiconductor device uses radial pins, which are inserted into the through holes of the monolithic circuit boards that have been used for the packaging of resistors and capacitors. Active components have been widely used in the past ten years.

Zener Diodes,Surface Mount Standard Rectifiers,Smd Bridge Rectifier,zener diodes manufacturers

Changzhou Changyuan Electronic Co., Ltd. , https://www.cydiode.com