10000 cAT returning ERROR when running embedded. · Issue #53 · marcinbor85/cAT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
cAT returning ERROR when running embedded. #53
Open
@andrewstillie

Description

@andrewstillie

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)
{

    while ((cat_service(&at) != 0) && (quit_flag == 0))
    {
        sl_sleeptimer_delay_millisecond(1);
    };


    printf("Bye!\n");

    return 0;

}

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0