I have been testing cAT locally using a Linux machine and compiling with GCC and all is working fine.
This is how I have the comms interface set.
static int write_char(char ch)
{
putc(ch, stdout);
return 1;
}
I now want to run the code embedded in a SiLabs Microcontroller via a UART and TeraTerm.
Serial output from the application is working fine. But when I send AT#HELP (or any other command) I get the "ERROR" response.
The main loop is calling handleATProcessing() every iteration.
My gut feeling is that a command is not being built as characters are received, so command buffer is empty when CR is received.
Can you see where I am going wrong or advise how to debug this?
I have been testing cAT locally using a Linux machine and compiling with GCC and all is working fine.
This is how I have the comms interface set. static int write_char(char ch) { putc(ch, stdout); return 1; }
static int read_char(char ch) { ch = getc(stdin); return 1; }
I now want to run the code embedded in a SiLabs Microcontroller via a UART and TeraTerm. Serial output from the application is working fine. But when I send AT#HELP (or any other command) I get the "ERROR" response.
The main loop is calling handleATProcessing() every iteration.
struct cat_object at; is declared as a global.
int handleATProcessing(void) {
}
My gut feeling is that a command is not being built as characters are received, so command buffer is empty when CR is received. Can you see where I am going wrong or advise how to debug this?