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

Tx tuning bug in UHD 4.4 for X310/UBX following commit 682a358b #712

Closed
rkossler opened this issue Nov 13, 2023 · 7 comments
Closed

Tx tuning bug in UHD 4.4 for X310/UBX following commit 682a358b #712

rkossler opened this issue Nov 13, 2023 · 7 comments

Comments

@rkossler
Copy link

rkossler commented Nov 13, 2023

Issue Description

UHD does not tune to the requested Tx frequency and reports wrong "actual frequency"

Setup Details

X310/UBX-160. UHD-4.4. Use "tx_waveforms" example or really any example that includes Tx tuning

Expected Behavior

Tx tuning should go to requested frequency and report an actual frequency that is close to the requested frequency

Actual Behaviour

For a requested tune frequency of 2450e6, UHD tune result reports actual frequency of 450e6. Additionally, the RF output is not at the requested frequency (that it, this is not just a reporting error)

Steps to reproduce the problem

Run the following with X310/UBX-160. Take a look at the resulting "Actual Tx Freq"

$ tx_waveforms --rate 25e6 --freq 2450e6

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.4.0.0-33-g4a77791c
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Maximum frame size: 8000 bytes.
[INFO] [GPS] Found an internal GPSDO: LC_XO, Firmware Rev 0.932
[INFO] [X300] Radio 1x clock: 200 MHz
Using Device: Single USRP:
Device: X-Series Device
Mboard 0: X310
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: UBX RX
RX Channel: 1
RX DSP: 1
RX Dboard: B
RX Subdev: UBX RX
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: UBX TX
TX Channel: 1
TX DSP: 1
TX Dboard: B
TX Subdev: UBX TX

Setting TX Rate: 25.000000 Msps...
Actual TX Rate: 25.000000 Msps...

Setting TX Freq: 2450.000000 MHz...
Setting TX LO Offset: 0.000000 MHz...
Actual TX Freq: 449.999998 MHz...

[WARNING] [0/Radio#0] Attempting to set tick rate to 0. Skipping.
Setting device timestamp to 0...
Checking TX: TXLO: locked ...
Press Ctrl + C to stop streaming...
^C
Done!

Additional Information

This error was introduced in commit b644723 (UBX: Add VCO band calibration and map access)

In order to show that this is not just a reporting error but an actual Tx tuning error, you can run the following with an RF loopback cable & 30dB attenuator between Tx-0 and Rx-1. Take a look at the resulting capture file which shows a 2MHz tone for code versions prior to the bug and shows no tone for code versions after the bad commit

txrx_loopback_to_file --tx-rate 12.5e6 --rx-rate 12.5e6 --tx-freq 2450e6 --rx-freq 2450e6 --tx-gain 20 --rx-gain 20 --rx-channels 1 --nsamps 102400 --wave-type SINE --wave-freq 2000000 --file /media/ramfolder/usrp_samples.dat --settling 1

@nzqo
Copy link

nzqo commented Nov 26, 2023

+1

Facing the same issue with an x300. Tuning will always report "-50 MHz".

@rkossler
Copy link
Author

rkossler commented Nov 26, 2023 via email

@nzqo
Copy link

nzqo commented Nov 26, 2023

Try uhd 4.5 or 4.6 if you can. Otherwise, I think it is still broken on 4.4 such that you would need to manually add the fix (late commit) and then re build

On Sun, Nov 26, 2023 at 8:25 AM Fabian @.> wrote: Any updates on this? I am facing the same issue. x300 reports a transmission frequency of -50 MHz — Reply to this email directly, view it on GitHub <#712 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATFPTI3CUXZIYO2VUMLHULLYGM7K7AVCNFSM6AAAAAA7J3IK6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWG44DIMJWGI . You are receiving this because you authored the thread.Message ID: @.>

I tried on whatever the latest version shipped with apt is today and had met the issue there. Id need to check the version but I assume its at least 4.6

@rkossler
Copy link
Author

rkossler commented Nov 26, 2023 via email

@nzqo
Copy link

nzqo commented Nov 27, 2023

For me, it worked fine on both 4.5 and 4.6

On Sun, Nov 26, 2023 at 3:43 PM Fabian @.> wrote: Try uhd 4.5 or 4.6 if you can. Otherwise, I think it is still broken on 4.4 such that you would need to manually add the fix (late commit) and then re build … <#m_7431776744919283723_> On Sun, Nov 26, 2023 at 8:25 AM Fabian @.> wrote: Any updates on this? I am facing the same issue. x300 reports a transmission frequency of -50 MHz — Reply to this email directly, view it on GitHub <#712 (comment) <#712 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATFPTI3CUXZIYO2VUMLHULLYGM7K7AVCNFSM6AAAAAA7J3IK6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWG44DIMJWGI https://github.com/notifications/unsubscribe-auth/ATFPTI3CUXZIYO2VUMLHULLYGM7K7AVCNFSM6AAAAAA7J3IK6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWG44DIMJWGI . You are receiving this because you authored the thread.Message ID: @.> I tried on whatever the lattest version shipped with apt is today and had met the issue there. Id need to check the version but I assume its at least 4.6 — Reply to this email directly, view it on GitHub <#712 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATFPTI3SV3WHP33C5T52XBLYGOSWLAVCNFSM6AAAAAA7J3IK6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWHA4TCNBXGA . You are receiving this because you authored the thread.Message ID: @.**>

I just checked and the latest version on Ubuntu 22.04 in the jammy repos seems to be 4.1.0.5-3. I am honestly very confused as to why that would happen there.

@mbr0wn
Copy link
Contributor

mbr0wn commented Mar 19, 2024

If this is an issue with UHD 4.4 only, we won't be fixing it there. If it's still an issue in recent UHD versions, that's a different story. Thanks for the report.

@gmeyerho
Copy link
Contributor

This should be fixed by 996e7ab, which is in UHD 4.5 and addresses one of the changes made in the commit referenced that caused this issue (b644723). So this should only be an issue in UHD 4.4 as that was when the change that introduced this issue was committed.

@mbr0wn mbr0wn closed this as completed Mar 19, 2024
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

4 participants