at_commands

Table of Contents

Example Summary

This example demonstrates the use of AT Commands to operates the various range of networking capabilities which the CC3220/CC3120 device family provides.
For details about the AT Commands and thier parameters please refer to the AT Commands and attributes: Commands and attributes

Example Usage

The connection should have the following connection settings:

    Baud-rate:    115200
    Data bits:         8
    Stop bits:         1
    Parity:         None
    Flow Control:   None

Once the application has complete it’s initialization and the network processor is up,
the application banner would be displayed, showing version details:

         ==============================================
            AT Commands Example Ver: 1.1.1
         ==============================================

         CHIP: 0x20000010
         MAC:  2.0.0.0
         PHY:  2.2.0.4
         NWP:  3.2.0.0
         ROM:  0
         HOST: 2.0.1.17
         MAC address: 08:00:28:5b:55:e0

         ==============================================

At this point, you will see the following line:

Enter AT Command:

indicating that you can enter AT command at the command prompt.

AT Command Application Overview

This example is a command line interface (cli) based application, which is used to operate the CC32XX/CC31XX networking capabilities by using AT Commands.

It does that by offering a list of propriety commands, fed to the application via UART and later parsed and dispatched.

The application starts with invoking API function: “ATCMD_create” which creates the ATCMD module by the following actions:

Next, it creates the events thread which responsible for receiving events and command response from the ATCMD module by invoking the API function: “ATCMD_recv”

Lastly, it invokes the API function “ATCMD_send” which is responsible for sending commands to the ATCMD module.

If the typed command matches a table entry, the handler is dispatched and the parameters fed by the user are passed to the command callback. Inside each command callback, the first action is to parse the user’s input. This is achieved by calling the corresponding parser function.

A structure containing each command’s parameters is also passed to the designated parser and returned filled with the parsed user’s parameters.

Later, the parsed structure is handled by the callback.

Once a dispatched callback has completed, it returns a command response of OK or ERROR.

The application then returns to the starting point and is ready for another command from the user.

for getting usage help for specific command put ‘?’ instead of parameters ([AT Command name] = ?)

Commands

Syntax:

    AT<command name>=<param1>, <param2>,  ,<paramX>

Command return status

Command return status could be one of the following cases:

Asynchronous event

The events may arrive at any time. They will always be built in the following format:

    <event name>: <event ID>,<value1>, ,<valueX>

Please install the latest CC32xx Service Pack in order to get the most optimization and lowest current consumption.

References

For full list of commands and attributes, please refer to Commands and attributes