Q: How do I define my own functions in the AT+ commands? How do I pass parameters between them?

ESP_Luna
Posts: 32
Joined: Wed Jun 17, 2015 4:10 pm

Q: How do I define my own functions in the AT+ commands? How do I pass parameters between them?

Postby ESP_Luna » Tue Jul 28, 2015 12:57 pm

Q: How do I define my own functions in the AT+ commands? How do I pass parameters between them?
In the example of \esp_iot_sdk\examples\at\user\user_main.c, ways are delivered on how to implement a self-defined AT Command, "AT+TEST".
The structure, at_funcationType, is used to define four types of a command, e.g., "AT+TEST".
  • "at_testCmd" is a testing command and it’s formatted as AT+TEST=?. In the example of AT, the registered callback is "at_testCmdTest"; the testing demand could be designed as the value range of the return parameter. If registered as NULL, there will be no testing command.
  • "at_queryCmd" is a query command and it’s formatted as AT+TEST?.In the example of AT, the registered callback is "at_queryCmdTest"; the query command could be designed as returning the current value. If registered as NULL, there will be no query command.
  • "at_setupCmd" is a setup command and it’s formatted as AT+TEST=parameter1,parameter2,........ In the example of AT, the registered callback is "at_setupCmdTest"; the setup command could be designed as the value of the parameter; if registered as NULL, there will be no setup command.
  • "at_exeCmd" is an execution command and it’s formatted as AT+TEST. In the example of AT, the registered callback is "at_exeCmdTest"; if registered as NULL, there will be no execution command.

Who is online

Users browsing this forum: No registered users and 0 guests