Dear Community,
I am able to access my sdr via the pointer sdr, pointing to the remote device and successful with sdr->getHardwareInfo()
Able to receive driver key, hardwarekey etc parameters successfully.
I am trying call the setGain API call from a remote unit and passing the direction, channel and value as follows:
On the host PC my code is as below:
const double gain_val = 2.0000;
sdr->setGain(SOAPY_SDR_RX, 0, gain_val);
On the SDR board side, my code is as follows:
void setGain(const int direction, const size_t channel, const double value){
u32 Type;
printf("My gain value: %f \n", value);
printf("My received direction: %d \n", direction);
printf("My received channel: %d \n", channel);
(direction == SOAPY_SDR_TX) ? (Type = 1) : (Type = 0); //0 = ADC, 1=DAC
//changeGain(value, Type, 1, 1);
}
Before calling the actual hardware function, I want to make sure that I see the value being printed at Soapy level. I am getting the following output (part of log from the sdr terminal):
----------------------------------------------------
SoapyServerListener::accept(
192.168.0.109:59540)
metal: info: Registered shmem provider ion.reserved.
metal: info: Registered shmem provider ion.ion_system_contig_heap.
metal: info: Registered shmem provider ion.ion_system_heap.
My gain value: 0.000000
My received direction: 1
My received channel: 0
SoapyServerListener::handlerLoop() FAIL: SoapyRPCUnpacker::recv(header) FAIL:
SoapyServerListener::close()
SoapyServerListener::close()
-----------------------------------------
Values for direction and channel are printing properly and even changing when I send different values from the host side code. How ever, gain value is always shown 0.000000
Tried to change the function signature for setGain, tried different values and types (int, string etc), direct number entry instead of passing using a variable but with no success so far.
Can you please help me resolve this issue? I am unable to understand where I am going wrong.
Thanks and Regards,
Sudhakar