From dfbe10bbfbaff83af9d8e6fe4237dd2e1a4ea980 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Tue, 26 May 2020 18:31:58 +0200
Subject: [PATCH] Silently accept AI0 command (used by many clients)

---
 rigctl.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/rigctl.c b/rigctl.c
index ba749e1..58787b0 100644
--- a/rigctl.c
+++ b/rigctl.c
@@ -2557,7 +2557,15 @@ int parse_cmd(void *data) {
           }
         case 'I': //AI
           // set/read Auto Information
-          implemented=FALSE;
+          // many clients start the connection with an "AI0" command.
+          // piHPSDR is constantly in an "AI0" state, therefore
+          // silently ignore AI0 commands and flag an error for
+          // all other possiblities
+          if (command[2] == '0' && command[3] == ';') {
+            // do nothing
+          } else {
+            implemented=FALSE;
+          }
           break;
         case 'L': // AL
           // set/read Auto Notch level
-- 
2.45.2