AT instruction set¶
1. Instruction introduction¶
The following describes the AT instruction set supported by the CI230X WIFI terminal. Here, we only list some simple and common AT instructions. Unusual AT instructions can be found in the SDK source code
project\components\ln_ at_ cmd\wifi\ln_ at_ cmd_ Query in wifi. c, and users can also refer to ln as required_ at_ cmd_ The process of implementing AT instructions in the wifi. c file adds new AT instructions by itself.
AT instruction | Instruction description |
---|---|
AT+CIPSTAMAC=”1A: AF: C2:5E: DF: E2” | Set the MC address of the device |
AT+CIPSTAMAC? | Querying device MAC address |
AT+CWLAP | Scan route hotspots |
AT+CWJAP=”AIOT_TEST”, “12345678” | Connection route |
AT+CIPSTA? | Querying the device IP address |
AT+RST | System soft reset |
AT+PING=”192.168.1.1”, “- i”, 1024 | PING router |
AT+TENCENT_ TVS_ PROFILE=”xxxx” | Tencent TVS authentication file settings |
AT+TENCENT_ TVS_ PROFILE? | Acquisition of Tencent TVS authentication file |
AT+QCLOUD_ IOT_ PROFILE=”xxxx” | Tencent IOT authentication file settings |
AT+QCLOUD_ IOT_ PROFILE? | Acquisition of Tencent IOT authentication file |
AT+TUYA_ IOT_ PROFILE==”xxxx” | TUYA IOT authentication file settings |
AT+TUYA_ IOT_ PROFILE? | TUYA IOT authentication file acquisition |
2. AT instruction implementation description¶
2.1 AT+TENCENT_ TVS_ PROFILE=”xxxx”¶
//Obtain Tencent tvs authentication file
ln_ at_ err_ t ln_ at_ get_ tvs_ auth_ profile(const char *name)
{
uint8_ t tvs_ profile[TVS_PROFILE_MAX_LEN] = {0};
CIAS_ LOG_ HL("-ln_at_set_tvs_auth_profile name = %s\r\n", name);
if(sysparam_tvs_profile_get(tvs_profile) != SYSPARAM_ ERR_ NONE)
{
goto __ exit;
}
ln_ at_ printf("%s:%s \r\n", name, tvs_profile);
ln_ at_ printf(LN_AT_RET_OK_STR);
return LN_ AT_ ERR_ NONE;
__ exit:
ln_ at_ printf(LN_AT_RET_ERR_STR);
return LN_ AT_ ERR_ COMMON;
}
2.2 AT+TENCENT_ TVS_ PROFILE?¶
//Set Tencent tvs authentication file
ln_ at_ err_ t ln_ at_ set_ tvs_ auth_ profile(int para_num, const char *name)
{
LN_ UNUSED(para_num);
LN_ UNUSED(name);
bool is_ default = false;
uint8_ t para_ index = 1;
char *str_ param = NULL;
if(LN_AT_PSR_ERR_NONE != ln_at_parser_get_str_param(para_index++, &is_default, &str_param))
{
goto __ exit;
}
if (is_default || !str_param)
{
goto __ exit;
}
if (para_num != 1)
{
goto __ exit;
}
CIAS_ LOG_ HL("%s:%s\r\n", name, str_param);
if(sysparam_tvs_profile_update(str_param) != SYSPARAM_ ERR_ NONE)
{
goto __ exit;
}
ln_ at_ printf(LN_AT_RET_OK_STR);
return LN_ AT_ ERR_ NONE;
__ exit:
ln_ at_ printf(LN_AT_RET_ERR_STR);
return LN_ AT_ ERR_ COMMON;
}
2.3 Register the implemented AT instruction to the system¶
LN_ AT_ CMD_ REG(TENCENT_TVS_PROFILE, ln_at_get_tvs_auth_profile, ln_at_set_tvs_auth_profile, NULL, NULL);