Hello,
I’m using the following code for initialization:
using namespace lime;
using namespace std::literals::string_view_literals;
std::unique_ptr<lime::RFStream> stream;
SDRConfig config;
StreamConfig streamCfg;
/******************************************************************************/
static void LogCallback(LogLevel lvl, const std::string& msg)
{
printf("LogCallback[%d]: %s\n", lvl,msg.c_str());
}
int main (void)
{
lime::registerLogHandler(LogCallback);
std::vector<lime::DeviceHandle> listOfDevices = lime::DeviceRegistry::enumerate();
std::cout << "Found " << listOfDevices.size() << " devices\n";
for (const auto& item : listOfDevices)
std::cout << item.Serialize() << std::endl;
lime::SDRDevice* device = lime::DeviceRegistry::makeDevice(listOfDevices.at(0));
if (device == nullptr)
{
std::cout << "Failed to connect to SDR device\n";
return SDR_OPEN_FAILED;
}
rc=device->Init();
if (rc != OpStatus::Success)
{
printf("Init failed.\n");
return SDR_OPEN_FAILED;
}
config.channel[0].rx.enabled = true;
config.channel[0].rx.centerFrequency = CenterFreq;
config.channel[0].rx.sampleRate = SampFreq;
config.channel[0].rx.oversample = 2;
config.channel[0].rx.lpf = BandWidth;
config.channel[0].rx.path = Antenna;
config.channel[0].rx.calibrate = CalibrationFlag::FILTER;
config.channel[0].rx.testSignal.enabled = false;
config.channel[0].tx.enabled = false;
config.channel[0].tx.sampleRate = 0;
config.channel[0].tx.oversample = 0;
config.channel[0].tx.path = 0;
config.channel[0].tx.centerFrequency = 0;
config.channel[0].tx.testSignal.enabled = false;
std::cout << "Configuring device ...\n"sv;
rc=device->Configure(config, 0);
if (rc != OpStatus::Success)
{
printf("Configure failed.\n");
return SDR_START_FAILED;
}
It works. I managed to receive samples.
Then I tried to use DCIQ calibration instead of FILTER. Nothing else was modified.
In this scenario I got exception.
There are no logs explains the crash.
Can you please advise ?
Thank you,
Zvi