Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calibration on X310 with WBX-120: NO CAL antenna #731

Open
keukenrol opened this issue Feb 28, 2024 · 5 comments
Open

Calibration on X310 with WBX-120: NO CAL antenna #731

keukenrol opened this issue Feb 28, 2024 · 5 comments

Comments

@keukenrol
Copy link

keukenrol commented Feb 28, 2024

Issue Description

I am using an X310 with WBX-120 and TwinRX daughterboards. The transmission seems to have a lot of carrier leakage (when sending a stream of 0's, there is still a frequency spike at the carrier frequency at -50dBm). I found out about calibration methods, which are supported by the TX board (WBX-120). https://files.ettus.com/manual/page_calibration.html

When running the uhd_usrp_probe command, I can see the board gives me the following info:

TX Frontend: 0

| | | Name: WBX-120 TX+GDB
| | | Antennas: TX/RX, CAL
| | | Sensors: lo_locked
| | | Freq range: 25.000 to 2200.000 MHz
| | | Gain range PGA0: 0.0 to 31.0 step 1.0 dB
| | | Bandwidth range: 120000000.0 to 120000000.0 step 0.0 Hz
| | | Connection Type: IQ
| | | Uses LO offset: No

However, when running uhd_cal_tx_iq_balance or uhd_cal_tx_dc_offset it gives me the following error:

Running calibration for WBX-120 TX+GDB
Daughterboard serial: [censored]
Error: This board does not have the CAL antenna option, cannot self-calibrate.

Setup Details

UHD_4.6.0.HEAD-0-g50fa3baa
FPGA version of X310 is HG

Expected Behavior

Calibration of TX (and RX) for both DC offset and IQ.

Actual Behaviour

This board does not have the CAL antenna option, cannot self-calibrate.

Steps to reproduce the problem

Using a X310 with a WBX-120 daughterboard, run the following command:
uhd_cal_tx_iq_balance --verbose --args="addr=192.168.10.2"
remark: i have the default IP from the HG fw version.

Additional Information

Source code: https://github.com/EttusResearch/uhd/blob/master/host/utils/usrp_cal_utils.hpp
The functions get_rx_antennas() and get_tx_antennas are part of https://github.com/EttusResearch/uhd/blob/master/host/lib/usrp/multi_usrp.cpp This might be helpful.

@manderseck
Copy link
Contributor

@keukenrol Sorry for the late response. I don't have such a device at hand and I'm not too familiar with this product series, but from what the cal_utils do it seems like they check both TX and the RX antennas and if one of them fails (and only in that case) they come up with that error. In your snipped I only see the TX output. Can you confirm that the RX frontend reports to have a CAL antenna, too? That may bring us a little bit further.

@keukenrol
Copy link
Author

keukenrol commented May 15, 2024

Hello @manderseck. This is the output of uhd_find_devices:
| _____________________________________________________
| /
| | TX Dboard: 0/Radio#1
| | ID: WBX-120 (0x0080)
| | Serial: [censored]
| | Revision: 2
| | ID: WBX + Simple GDB, WBX v3 + Simple GDB, WBX v4 + Simple GDB, WBX-120 + Simple GDB (0x004f)
| | Serial: [censored]
| | Revision: 2
| | _____________________________________________________
| | /
| | | TX Frontend: 0
| | | Name: WBX-120 TX+GDB
| | | Antennas: TX/RX, CAL
| | | Sensors: lo_locked
| | | Freq range: 25.000 to 2200.000 MHz
| | | Gain range PGA0: 0.0 to 31.0 step 1.0 dB
| | | Bandwidth range: 120000000.0 to 120000000.0 step 0.0 Hz
| | | Connection Type: IQ
| | | Uses LO offset: No
| _____________________________________________________
| /
| | RX Dboard: 0/Radio#1
| | ID: WBX-120, WBX-120 + Simple GDB (0x0081)
| | Serial: [censored]
| | Revision: 2
| | _____________________________________________________
| | /
| | | RX Frontend: 0
| | | Name: WBX-120 RX+GDB
| | | Antennas: TX/RX, RX2, CAL
| | | Sensors: lo_locked
| | | Freq range: 25.000 to 2200.000 MHz
| | | Gain range PGA0: 0.0 to 31.5 step 0.5 dB
| | | Bandwidth range: 120000000.0 to 120000000.0 step 0.0 Hz
| | | Connection Type: IQ
| | | Uses LO offset: No
It does show a CAL antenna option on the RX frontend.

@manderseck
Copy link
Contributor

Thanks for providing the full output. From that it looks like it should work, indeed. So to get further I'd take the usrp_cal_utils.hpp and add some print or log statements to see which antennas it thinks are available. As mentioned earlier, unfortunately I don't have such a device available with these particular daughterboards for testing and debugging it myself.

@keukenrol
Copy link
Author

Thanks for providing the full output. From that it looks like it should work, indeed. So to get further I'd take the usrp_cal_utils.hpp and add some print or log statements to see which antennas it thinks are available. As mentioned earlier, unfortunately I don't have such a device available with these particular daughterboards for testing and debugging it myself.

I suppose I need to rebuild the whole uhd package to get the print statements working? Suggestions where to add them and what to print? Thanks!

@manderseck
Copy link
Contributor

@keukenrol Yes, rebuilding will be required, but if you built your current installation yourself already, then rebuilding from the same directory will be pretty fast.
To see which antennas it thinks it has when checking if the CAL antenna is among them I propose to add the following debug lines after line 244 ("set the antennas to cal"):

    auto rx_ant = usrp->get_rx_antennas();
    auto tx_ant = usrp->get_tx_antennas();
    std::cout << "RX antennas:" << std::endl;
    for (const auto& ant : rx_ant) {
        std::cout << "  " << ant << std::endl;
    }
    std::cout << "TX antennas:" << std::endl;
    for (const auto& ant : tx_ant) {
        std::cout << "  " << ant << std::endl;
    }

The error message that you get comes a few lines later, so this is the place where something seems to go wrong. Thanks for your effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants