Issue Description
When running the rx_samples_to_file example in /host/build/examples, supplying the --gain argument causes the example to crash due to an unrecognized channel. Please see the Additional Information section for a fix.
Setup Details
I am using a self-compiled UHD version 4.6 on RHEL9.5, connecting to a USRP B205 mini-i via USB, and connecting to the USRP by supplying the --args "serial=" argument.
Expected Behavior
I expect the USRP's rx gain to be set to the value I supply to the --gain argument. The log should look like this:
Setting RX Gain: 0.000000 dB...
Actual RX Gain: 0.000000 dB...
Actual Behaviour
When the script tries to set the gain, the log reads:
Setting RX Gain: 0.000000 dB...
Error: LookupError: IndexError: multi_usrp: RX channel 18446744073709551615 out of range for configured RX frontends
Steps to reproduce the problem
Reproducing should be as simple as connecting a USRP B205 mini-i via USB, cd'ing to <uhd_root>/host/build/examples and running ./rx_samples_to_file --duration --rate --freq --args "serial=" --file --gain
Additional Information
This bug is actually pretty straightforward to fix: on line 486, rather than passing uhd::usrp::multi_usrp::ALL_CHANS to set_rx_gain, just iterate over the channel list and pass that value in- the exact same way it's done on lines 475-476 to set frequency, for example.
Issue Description
When running the rx_samples_to_file example in /host/build/examples, supplying the --gain argument causes the example to crash due to an unrecognized channel. Please see the Additional Information section for a fix.
Setup Details
I am using a self-compiled UHD version 4.6 on RHEL9.5, connecting to a USRP B205 mini-i via USB, and connecting to the USRP by supplying the --args "serial=" argument.
Expected Behavior
I expect the USRP's rx gain to be set to the value I supply to the --gain argument. The log should look like this:
Setting RX Gain: 0.000000 dB...
Actual RX Gain: 0.000000 dB...
Actual Behaviour
When the script tries to set the gain, the log reads:
Setting RX Gain: 0.000000 dB...
Error: LookupError: IndexError: multi_usrp: RX channel 18446744073709551615 out of range for configured RX frontends
Steps to reproduce the problem
Reproducing should be as simple as connecting a USRP B205 mini-i via USB, cd'ing to <uhd_root>/host/build/examples and running ./rx_samples_to_file --duration --rate --freq --args "serial=" --file --gain
Additional Information
This bug is actually pretty straightforward to fix: on line 486, rather than passing uhd::usrp::multi_usrp::ALL_CHANS to set_rx_gain, just iterate over the channel list and pass that value in- the exact same way it's done on lines 475-476 to set frequency, for example.