35 lines
874 B
C
35 lines
874 B
C
|
/**
|
||
|
* Copyright: (C) 2020 Quectel
|
||
|
* All rights reserved.
|
||
|
* Filename: send-at-tool.c
|
||
|
* Description: QL_MISC_SendAT() API example
|
||
|
* Version: 1.0.0(2020年09月17日)
|
||
|
* Author: Peeta Chen <peeta.chen@quectel.com>
|
||
|
* ChangeLog: 1, Release initial version on "2020年09月17日 16时00分18秒"
|
||
|
*/
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
#include <ql_misc.h>
|
||
|
|
||
|
int main (int argc, char **argv)
|
||
|
{
|
||
|
int ret = 0;
|
||
|
char cmd_resp[1024] = {0};
|
||
|
|
||
|
if(argc != 2) {
|
||
|
printf ("command number error\n");
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
memset(cmd_resp, 0, sizeof(cmd_resp));
|
||
|
ret = QL_MISC_SendAT(argv[1], cmd_resp, sizeof(cmd_resp));
|
||
|
if (ret <= 0)
|
||
|
printf ("QL_MISC_SendAT failed with return:%d\n", ret);
|
||
|
else
|
||
|
printf ("%s\n", cmd_resp);
|
||
|
|
||
|
return 0;
|
||
|
} /* ----- End of main() ----- */
|