AT Commands Used with the APCA
The AT command set provided in this guide should be used when communicating with the Ayla Production Cellular Agent over an asynchronous serial line. The following diagram shows the AT Command Layer and the Quectel BG96 NB-IoT module in a functional layout:
| ADS | Ayla Device Service |
| CoAP | Constrained Application Protocol Service |
| DTLS | Data Transport Layer Security |
The AT command serial port uses hardware (RTSRequest to Send/CTSClear to Send) flow control so that data is not lost. As a best practice, make sure that your implementation is compatible with the ITU-T Recommendation V.250 (07/2003), which includes the standards for one set of the extensions to the AT command set. Refer to the following resources for more information.
The V.250 specification indicates the following:
- Multiple values are comma-separated numbers and strings, where the numbers can be decimal or hexadecimal.
- The strings are quoted with double-quotes (").
- Double-quotes within strings are replaced with “\22” and backslash is replaced with "\5C.
- Any hex character can be replaced by “\xx” where xx is the hexadecimal ASCII value.
The AT command that is used for configuration (e.g. status, etc.) is +ADAAyla Device Agent. Only one AT command should be in progress at a time. The host MCUMicrocontroller Unit generally does not start another AT command until the synchronous response is provided for the AT command in progress. Each command gives a synchronous response, and some AT commands may give asynchronous responses later, which most often is to clarify an error response. The general format of the +ADA command is as follows:
| AT+ADA="<subcmd>"[,args>] | |
| Response | OK |
| Error Response |
ERROR +ADA: "<subcmd>",”err”,<code>,”<explanation>” e.g., +ADA: “<subcmd>”,”err”,4,”unknown cmd” Possible values for error codes: 1 – missing 2 – busy 3 – unknown 4 – usage 5 – len err 6 – invalid 7 – err 8 – not supported 9 – cmd id |
| Asynchronous Response | +ADA: “<subcmd>”[,<parameters>] |
|
NOTE |
The asynchronous response always starts with a single space after the colon, which is followed by the sub-command in quotes, e.g. "+ADA:"
|
Following is a diagram of the power cycle sequence for the AT commands:
Please click here to let us know how we're doing. Thank you.