 // and execute the command
 void doCommand()
 {
+  int cmd_len = 0;
+  char * cr_ptr = NULL;
+  int xfer_len = 0;
+
+  fifoCmdBufDequeueCommand(input_buf,IO_BUF_SIZE,cmd_buf,IO_BUF_SIZE);
+  cmd_len = strlen(cmd_buf);
+  if (cmd_len > 0)
+  {
+    if (cmd_len > 1)
+    {
+      // The only command for now is to change the prefix_string
+      cr_ptr = (char *)memchr(cmd_buf,'\r',IO_BUF_SIZE);
+      if (cr_ptr)
+      {
+        *cr_ptr = '\0'; // Do not want <cr> in prefix_string
+        xfer_len = strlen(cmd_buf);
+        memset(prefix_string,0,PREFIX_BUF_SIZE);
+        fifoCmdBufEnqueueCommand(cmd_buf,xfer_len,prefix_string,PREFIX_BUF_SIZE);
+        prefix_write_count = 0;
+      }
+    }
+  }
 }
 
 // fifoCmdBuf* functions

// Periodic write to Serial to test RPi <-> Arduino
void timerWrite()
{
  char write_buf[80];

  ++prefix_write_count;
  sprintf(write_buf,"timerWrite %d\r",prefix_write_count);
  fifoCmdBufEnqueueCommand(write_buf,sizeof(write_buf),output_buf,IO_BUF_SIZE);
}

// Remove the first character in output_buf and write to serial

SimpleTimer timer;

#define IO_BUF_SIZE 200
char cmd_buf[IO_BUF_SIZE];
char input_buf[IO_BUF_SIZE];
char output_buf[IO_BUF_SIZE];

