DEV Community

Abby
Abby

Posted on

The Top 1 Popular Software Package Wins a 40K Downloads-AT Device

1. Introduction

The AT device package is the OpenSource RT-Thread IoTOS AT component with the porting files and sample codes for different AT devices, it supports ESP8266, ESP32, M26, MC20, RW007, MW31, SIM800C, W60X, SIM76XX, A9/A9G, BC26, AIR720, ME3616, M 6315, BC28, EC200X series of devices, and more. This package implements the AT socket on all the devices above, which allows communications through the standard socket interfaces in AT commands. Refer to the " RT-thread programming guide " for the descriptions of specific functions.

RT-Thread is an open-source embedded real-time operating system (RTOS) born in 2006 that provides developers with a wide range of components and 200+ software packages.

1.1. Catalog

Description.png

1.2 License

at_device package follows the LGPLv2.1 license, check out LICENSE file for more information.

1.3 Dependence

  • RT_Thread 4.0.2+
  • RT_Thread AT component 1.3.0+
  • RT_Thread SAL component
  • RT-Thread netdev component

2. Fetching

The AT device software package is porting for AT components and AT socket functionality, you need to enable the AT component library and AT socket functionality to get the AT device package.

Version Description

The AT device package has been updated with multiple versions, different versions require different configuration option and need to be fit into the corresponding system version. The following mainly listing the currently available AT device package version information:

  • V1.2.0: For RT-Thread versions less than V3.1.3, AT component version equals V1.0.0;
  • V1.3.0: For RT-Thread versions less than V3.1.3, AT component version equals V1.1.0;
  • V1.4.0: For RT-Thread versions less than V3.1.3 or equal to V4.0.0, AT component version equals V1.2.0;
  • V1.5.0: For RT-Thread versions less than V3.1.3 or equal to V4.0.0, AT component version equals V1.2.0;
  • V1.6.0: For RT-Thread versions equal to V3.1.3 or V4.0.1, AT component version equals V1.2.0;
  • V2.0.0/V2.0.1: For RT-Thread versions higher than V4.0.1 or higher than 3.1.3, AT component version equals V1.3.0;
  • Lastest version: For RT-Thread versions higher than V4.0.1 or higher than 3.1.3, AT component version equals V1.3.0;

Version judgment will be done automatically in menuconfig, at_device package selection will give the best version support based on the current system environment, the above version description is used as a reference for the running environment.

Different versions require different configuration option, which is introduced as follows:

V1.X.X Configuration Option Introduction

Enable AT device software package. This version only supports to enable one AT device at the same time, the configuration option as follows:

RT-Thread online packages  --->
     IoT - internet of things  --->
        -*- AT DEVICE: RT-Thread AT component porting or samples for different device  
        [ ]   Enable at device init by thread
              AT socket device modules (Not selected, please select)  --->    
              Version (V1.6.0)  --->
Enter fullscreen mode Exit fullscreen mode
  • Enable at device init by thread: Whether configuration creates a separate thread to initialize the device network;
  • AT socket device modules: AT device selection, currently supported RW007, ESP8266, M26/MC20, EC20, SIM800C, SIM76XX, A9/A9G, BC26, air720, ME3616, M6315, BC28, EC200X and more;
  • Version: Download the package version.

V2.X.X (laster) Configuration Option Introduction

Enable AT device software package. This version supports to enable multiple AT device at the same time, the configuration option as follows:

RT-Thread online packages  --->
     IoT - internet of things  --->
        -*- AT DEVICE: RT-Thread AT component porting or samples for different device
        [*]   Quectel M26/MC20  --->
          [*]   Enable initialize by thread
          [*]   Enable sample
          (-1)    Power pin
          (-1)    Power status pin
          (uart3) AT client device name
          (512)   The maximum length of receive line buffer
        [ ]   Quectel EC20  --->
        [ ]   Espressif ESP32  --->
        [*]   Espressif ESP8266  --->
          [*]   Enable initialize by thread
          [*]   Enable sample
          (realthread) WIFI ssid
          (12345678) WIFI password
          (uart2) AT client device name
          (512)   The maximum length of receive line buffer
        [ ]   Realthread RW007  --->
        [ ]   SIMCom SIM800C  --->
        [ ]   SIMCom SIM76XX  --->
        [ ]   Notion MW31  --->
        [ ]   WinnerMicro W60X  --->
        [ ]   AiThink A9/A9G  --->
        [ ]   Quectel BC26  --->
        [ ]   Luat air720  --->
        [ ]   GOSUNCN ME3616  --->
        [ ]   ChinaMobile M6315  --->
        [ ]   Quectel BC28  --->
        [ ]   Quectel ec200x  --->
        Version (latest)  --->
Enter fullscreen mode Exit fullscreen mode

Quectel M26/MC20: Enable M20/MC20( 2G module) device supporting;

  • Enable initialize by thread:Enable the functionality of using thread to initialize the device().
  • Enable sample:Enable sample code. There is a registration for the sample device in the sample code
  • Power pin:Choose the pin to supply power.
  • Power status pin:Choose the pin to indicate the power state.
  • AT client device name:Configure the name of the serial device used by the sample device;
  • The maximum length of receive line buffer:Configure the maximum length of the sample device data receiving.

Quectel EC20:Enable EC20(4G module) device supporting;
Espressif ESP8266: Enable ESP8266 (WIFI Module) device supporting;

  • Enable initialize by thread:Enable the functionality of using thread to initialize the device(Non-blocking mode initialization).
  • Enable sample:Enable sample code. There is a registration for the sample device in the sample code
  • WIFI ssid:Configure the WIFI user name which connects the sample device;
  • WIFI password:Configure the WIFI password which connects the sample device;
  • AT client device name:Configure the name of the serial device used by the sample device;
  • The maximum length of receive line buffer:Configure the maximum length of the sample device data receiving.

Espressif ESP32:Enable ESP32 (WIFI Module)device supporting;

Realthread RW007:Enable RW007 (WIFI Module)device supporting;

SIMCom SIM800C:Enable SIM800C (2G Module)device supporting;

SIMCom SIM76XX:Enable SIM76XX (4G Module)device supporting;

Notion MW31:Enable MW31 (WIFI Module)device supporting;

WinnerMicro W60X:Enable W60X (WIFI Module)device supporting;

AiThink A9/A9G:Enable A9/A9G (2G Module)device supporting;

Quectel BC26:Enable BC26(NB-IOT Module)device supporting;

Luat Air720:Enable air720(4g Module)device supporting;

GOSUNCN ME3616:Enable ME3616(NB-IOT Module)device supporting;

ChinaMobile M6315:Enable M6315 (2G Module)device supporting;

Quectel BC28:Enable BC28(NB-IoT Module)device supporting;

Quectel EC200X:Enable EC200T、EC200S(4G Module)device supporting;

Version: Download the package version.

The configuration options mentioned above are using the 2G module and WIFI module options as examples, introduced the AT device package configuration option of the V2.X.X version, here are a few things to note:

  • V2.X.X version supports to enable multiple AT devices at the same time, the enabled device information can be viewed via ifocnfig command in FinSH;
  • V2.X.X version requires the device to register before using, the registration can be done in the samples directory file or customized in the application layer;
  • Pin options such as Power pin and Power status pinare configured according to the device's hardware connection and can be configured as '-1' if the hardware power-on function is not used;
  • One AT device should correspond to one serial name, and the AT client device name for each device should be different.

AT components configuration options introduction

When the AT device package is selected and the device supporting is enabled, client functionality for the AT component will be selected by default, and here are the AT component configuration options.

RT-Thread Components  --->
    Network  --->
        AT commands  --->
    [ ]   Enable debug log output
    [ ]   Enable AT commands server 
    -*-   Enable AT commands client
    (1)     The maximum number of supported clients
    -*-     Enable BSD Socket API support by AT commnads
    [*]     Enable CLI(Command-Line Interface) for AT commands
    [ ]     Enable print RAW format AT command communication data
    (128)   The maximum lenght of AT Commonds buffe
Enter fullscreen mode Exit fullscreen mode

The configuration options related to the AT device package:

  • The maximum number of supported clients: Selecting multiple devices in the AT device package requires this option to be configured as the corresponding value;
  • Enable BSD Socket API support by AT commands: This option will be selected by default when selecting the AT device package;
  • The maximum length of AT Commands buffe:The maximum length of AT commands data sending.

3. Notes

  • Modules that are adapted to the AT device package are not supported as TCP Server to complete the server-related operations (e.g. accept, etc.);
  • The default device type of the AT device package is unselected and needs to be specified for use;
  • The latest version supports multiple selected in multiple AT devices to implement AT Socket functionality, the V1.X.X version only supports access to a single AT device;
  • Multiple versions of the AT device package that currently used are primarily for the adaptation of AT components and system changes, the latest version of the RT-Thread system is recommended and the latest version can be selected in the menuconfig option.

RT-Thread Contact Info:

Website | Github | Twitter | Facebook | Youtube

Top comments (0)