Skip to content

AT_Slave example only accept first AT command #45

@peterj43

Description

@peterj43

When using the AT_slave example I found that I would only get a response to the first AT command I sent. I am working with version 1.2.3 but don't think the issue is only in this version.
I have debugged the issue and believe the issue is in command.c CMD_Process(void)

void CMD_Process(void)
{
  static char command[CMD_SIZE];
  static unsigned i = 0;                                 // This should not be declared as "static" 

  /* Process all commands */
  while (IsNewCharReceived() == SET)
  {
    command[i] = GetNewChar();

#if 0 /* echo On    */
    PRINTF("%c", command[i]);
#endif

    if (command[i] == AT_ERROR_RX_CHAR)
    {
      i = 0;
      com_error(AT_RX_ERROR);
      break;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions