Two RSP's, same program

Add useful snippets of code or links to entire SDR projects.
Post Reply
n2ic
Posts: 27
Joined: Sat May 28, 2016 7:26 pm

Two RSP's, same program

Post by n2ic » Fri Jan 18, 2019 3:51 pm

I have a RSP1 and an RSP1A. I have no problems running them simultaneously, using two separate instances of a program (in my case, the program Waterfall Bandmap). Another ham radio program, N1MM Logger+, now directly supports ExtIO-based SDR's, such as the RSP's. It also supports running two SDR's simultaneously. This has been tested with a RSP2 and an Airspy HF+. However, when I try to run my RSP1 and RSP1A simultaneously, I get the error message about one of the RSP's not being detected. Individually, each RSP can be run from N1MM Logger+. I know there are two different DLL's, but they are sharing the same mir library (in my case 2.13). Is there an issue of two RSP's not being able to run out of the same address space?

Thanks,
Steve

Reason: No reason

Paul314
Posts: 19
Joined: Thu Nov 23, 2017 8:39 pm

Re: Two RSP's, same program

Post by Paul314 » Fri Jun 28, 2019 12:45 pm

I have 2 rsp2 and a rspduo I got for an experiment. If it's helpful I wrote this rsp "directory" code to dump all the radios and some info. If you know how to compile and build c++ code, this may be useful for trouble shooting.

Code: Select all

#include <mirsdrapi-rsp.h>
#include <iostream>
#include <stdint.h>

using namespace std;

void initDevT(mir_sdr_DeviceT *device, int &found, int maxCount)
{
  found = -1;
  for (int n = 0; n < maxCount; n++) {
    device[n].SerNo = NULL;
    device[n].DevNm = NULL;
    device[n].hwVer = 0xFF;
    device[n].devAvail = 0xFF;
  }
}

bool invaidDevT(mir_sdr_DeviceT *device, int found)
{
  for (int n = 0; n < found; n++) {
    if (device[n].SerNo == NULL ||
        device[n].DevNm == NULL ||
        device[n].devAvail == 0xFF)
        return true;
  }
  return found < 0;
}

int main()
{
  mir_sdr_ErrT    ret;
  mir_sdr_DeviceT devices[2];
  int             found(-1);
  int             maxCount(2);
  const char     *green = "\033[01;32m";
  const char     *reset = "\033[00m";

  cout << "Look for SDRPlay radios" << endl;
  //mir_sdr_DebugEnable(1);
  initDevT(devices,found,maxCount);
  while (invaidDevT(devices,found)) {
    ret = mir_sdr_GetDevices(devices,(uint32_t*)&found,(uint32_t)maxCount);
    if (ret) {
      cout << "GetDevices failed: " << ret << endl;
      return -1;
    }
  }

  cout << "Found: " << found << " devices" << endl;
  for (int n = 0; n < found; n++) {
    cout << "-------------------------" << endl;
    cout << "Serial Number : " << green << devices[n].SerNo << reset << endl;
    cout << "Device Number : " << devices[n].DevNm << endl;
    cout << " Availability : " << ((devices[n].devAvail)?"Available":"In Use") << endl;
    cout << "      Version : " << (int)devices[n].hwVer << endl;
  }
  return 0;
}

Reason: No reason

Post Reply