Re: Arduino CAT communication with SDR-Console


Simon Brown
 

Hi,

 

Delay of 4000 ???

 

Simon Brown, G4ELI

https://www.sdr-radio.com

 

From: main@SDR-Radio.groups.io <main@SDR-Radio.groups.io> On Behalf Of Randy Hollingsworth
Sent: 02 July 2020 19:14
To: main@SDR-Radio.groups.io
Subject: [SDR-Radio] Arduino CAT communication with SDR-Console

 

I am trying to use an Arduino MEGA to obtain the current frequency that the SDR-Console is set to using the supported CAT commands. I am using an SDRPlay RSP1A receiver and the PC is running Windows 10. I have both the Arduino and SDR-Console ports set to COM10, and am using serial.print  to send the required FA; command. Here is the code:
----------------------------------------------------------------------------

int inByte = 0;         // incoming serial byte

 

void setup() {

  // start serial port at 9600 bps:

  Serial.begin(9600);

  while (!Serial) {

    ; // wait for serial port to connect. Needed for native USB port only

  }

  while (Serial.available() <= 0) {

    Serial.print("FA;");   // sends CAP Frequency Read command

    delay(4000);

  }

}  

 

void loop() {

  // if we get a valid byte, read analog ins:

  if (Serial.available() > 0) {

    // get incoming byte:

    inByte = Serial.read();

    Serial.write(inByte);

  }
-------------------------------------------------------------

The code in the loop section is not correct to get the full frequency but at this point, I am just trying to get the FA; command recognized and responded to. Using the I/O Monitor, I can see that there is activity on COM10 every four seconds, but the FA; command is not being received. However, using the Arduino IDE serial monitor, I can see that the FA; code is being sent. If anyone knows what changes I need to make so that SDR-Console recognizes and responds to the FA; command, I would very much appreciate your sharing the solution.

Join main@SDR-Radio.groups.io to automatically receive all group messages.