Forum
Please or Register to create posts and topics.

AARTSAAPI_StopDevice & AARTSAAPI_StartDevice

Page 1 of 2Next

Good morning,

We are having a little bit strange issue when using sweep mode with values extended from 3e7 to 6e9 using filter auto extended.

We have a loop to start/stop the meetering from the device, at first round it runs smoothly but when we stop the process using AARTSAAPI_StopDevice and we start it again with AARTSAAPI_StopDevice  it inmediatly starts to return empty values. (AARTSAAPI_GetPacket(&deviceHandler, 0, 0, &_packet2) =1 instead of 0).

when setting  main/stopfreq value to 80e6 it runs fine. We do not understand why this is happening. Can you help us?

 

Thanks in advance.

 

 

May this code help to reproduce the issue:

AARTSAAPI_Result res;

// Initialize library for medium memory usage

if ((res = AARTSAAPI_Init(AARTSAAPI_MEMORY_MEDIUM)) == AARTSAAPI_OK)
{

// Open a library handle for use by this application

AARTSAAPI_Handle h;

if ((res = AARTSAAPI_Open(&h)) == AARTSAAPI_OK)
{
// Rescan all devices controlled by the aaronia library and update
// the firmware if required.

if ((res = AARTSAAPI_RescanDevices(&h, 2000)) == AARTSAAPI_OK)
{
// Get the serial number of the first V6 in the system

AARTSAAPI_DeviceInfo dinfo = { sizeof(AARTSAAPI_DeviceInfo) };

if ((res = AARTSAAPI_EnumDevice(&h, L"spectranv6", 0, &dinfo)) == AARTSAAPI_OK)
{
// Try to open the first V6 in the system in sweep mode

AARTSAAPI_Device d;

if ((res = AARTSAAPI_OpenDevice(&h, &d, L"spectranv6/sweepsa", dinfo.serialNumber)) == AARTSAAPI_OK)
{
// Begin configuration, get root of configuration tree

AARTSAAPI_Config config, root;

if (AARTSAAPI_ConfigRoot(&d, &root) == AARTSAAPI_OK)
{
// Select the first receiver channel

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"device/receiverchannel") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetString(&d, &config, L"Rx1");

// Use fast receiver clock

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"device/receiverclock") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetString(&d, &config, L"245MHz");

// La magia
if (AARTSAAPI_ConfigFind(&d, &root, &config, L"calibration/rffilter") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetString(&d, &config, L"Auto Extended");

// Start frequency at 75MHz

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"main/startfreq") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetFloat(&d, &config, 30e6);

// Stop frequency at 6000MHz

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"main/stopfreq") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetFloat(&d, &config, 6000e6);

// Set RBW frequency to 1MHz

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"main/rbwfreq") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetFloat(&d, &config, 1.0e6);

// Reference level at -20dBm

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"main/reflevel") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetFloat(&d, &config, 10.0);

/*

// Select iq as output format

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"device/outputformat") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetString(&d, &config, L"iq");

// Set decimation to 1/64

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"main/decimation") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetString(&d, &config, L"1 / 64");
*/

// Connect to the physical device

if ((res = AARTSAAPI_ConnectDevice(&d)) == AARTSAAPI_OK)
{
for (int n = 0; n < 50000; n++) {
// Start the receiver

if (AARTSAAPI_StartDevice(&d) == AARTSAAPI_OK)
{
// Receive some spectra
std::cout << "---------[" << n << "]" << "\n";
streamSpectra(d);

// Stop the receiver

AARTSAAPI_StopDevice(&d);
Sleep(20);
}
}

// Release the hardware

AARTSAAPI_DisconnectDevice(&d);
}
else
std::wcerr << "AARTSAAPI_ConnectDevice failed : " << std::hex << res << std::endl;
}

// Close the device handle

AARTSAAPI_CloseDevice(&h, &d);
}
else
std::wcerr << "AARTSAAPI_OpenDevice failed : " << std::hex << res << std::endl;
}
else
std::wcerr << "AARTSAAPI_EnumDevice failed : " << std::hex << res << std::endl;
}
else
std::wcerr << "AARTSAAPI_RescanDevices failed : " << std::hex << res << std::endl;

// Close the library handle

AARTSAAPI_Close(&h);
}
else
std::wcerr << "AARTSAAPI_Open failed : " << std::hex << res << std::endl;

// Shutdown library, release resources

AARTSAAPI_Shutdown();
}
else
std::wcerr << "AARTSAAPI_Init failed : " << std::hex << res << std::endl;

Also the following configuration leads to a Access Violation Reading exception:

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"main/startfreq") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetFloat(&d, &config, 5e9);

if (AARTSAAPI_ConfigFind(&d, &root, &config, L"main/stopfreq") == AARTSAAPI_OK)
AARTSAAPI_ConfigSetFloat(&d, &config, 6e9);

 

This is fixed from build 10056 on. Thanks for the report!

My pleasure , thank you very much for confirming and fixing.

Sorry, It's probably my fault, but from where can I download this build? I am totally unable to find it out, and  just see the RTSA-Suite PRO - Stable (Windows) 2.1.1.9959 at the download page.

 

Please send us a mail to get a link for the latest BETA.

MiguelAngel.DiazDelaCampa has reacted to this post.
MiguelAngel.DiazDelaCampa

done, sent to [email protected]

vielen dank für die gute arbeit !!

Good morning, got the link by email but sadly seems I am not allowed to download it :

Error1020

Ray ID: 6c0181cebec4718a • 2021-12-19 15:01:35 UTC

Access denied

What happened?

This website is using a security service to protect itself from online attacks.

 

Please ensure that you've enabled cookies for that site, else the CDN provider might block access. Also it might help to clear the browser cache and delete existing cookies, and/or use a different browser (see https://webpop.io/cloudflare/error-1020-access-denied/ ). If that doesn't fix the error please contact [email protected] again.

Page 1 of 2Next