rains
7 December 2019 10:08
143
I’m getting the following occasionally:
[ERROR] Tune Rx Filter: MCU error 2 (CGEN tune failed)
[ERROR] setBandwidth(Rx, 0, 30 MHz) Failed -
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
self.run()
File “/usr/lib/python2.7/threading.py”, line 754, in run
self.__target(*self.__args, **self.__kwargs)
File “sna.py”, line 80, in snaThread
self.sweeper = SingleToneSweeper(radio, self.snaSampleRate, 20, 20, self)
File “/media/rusty/COMMON/CE301/VNA/limeSNA/SingleToneSweeper.py”, line 24, in init
self.setSampleRate(sampleRate)
File “/media/rusty/COMMON/CE301/VNA/limeSNA/SingleToneSweeper.py”, line 37, in setSampleRate
self.radio.rxBandwidth = int(sampleRate * 1.5)
File “build/bdist.linux-x86_64/egg/pyLMS7002Soapy/pyLMS7002Soapy.py”, line 222, in rxBandwidth
self.sdr.setBandwidth(SOAPY_SDR_RX, 0, val)
File “/usr/lib/python2.7/dist-packages/SoapySDR.py”, line 1841, in setBandwidth
RuntimeError
Any suggestions?
nepe
20 December 2019 20:32
144
Try to modify the sweepResult function in the sna.py to:
self.socketio.emit('data', {
'x': index,
'y': pwr
})
self.socketio.sleep(0)
Please let me know if it helps.
nepe
20 December 2019 20:44
145
Based on the pyLMS7002Soapy library configureAntenna code the switching is automatic:
if frequency >= 1.5e9:
self.sdr.setAntenna(SOAPY_SDR_TX, self.channel, 'BAND2')
else:
self.sdr.setAntenna(SOAPY_SDR_TX, self.channel, 'BAND1')
if frequency >= 1.5e9:
self.sdr.setAntenna(SOAPY_SDR_RX, self.channel, 'LNAH')
else:
self.sdr.setAntenna(SOAPY_SDR_RX, self.channel, 'LNAL')
You can modify the code by replacing the configureAntenna call in the SingleToneSweeper.py to:
self.radio.sdr.setAntenna(SOAPY_SDR_RX, 0, ‘LNAH’)
1 Like
nepe
21 December 2019 00:24
146
I uploaded a new version to github, changes:
Python 3 support
Switched from numpy fft to scipy welch (fixed the fft index calculation issue causing misalignment on higher sample rates)
Added rx/tx gain controll to the ui
Maybe fixed the socketio lag on linux
2 Likes
vu2tve
4 January 2022 14:12
147
I’m checking in on this thread to see if anyone got to run the measureVNA_900.py script for frequencies below 240MHz. Specifically, I am trying to get it to plot an S curve for the FM band with a few different antennas for transmitting a signal.
opened 01:49PM - 04 Jan 22 UTC
Hi,
These examples that allow usage of the SDR as a VNA look very cool. Howev… er, when I try to run the script measureVNA_900M for frequencies below 240M (like for the FM band 88-108), the script bombs out because of this check
```
File "/usr/local/lib/python3.6/dist-packages/pyLMS7002Soapy-1.1.0-py3.6.egg/pyLMS7002Soapy/LMS7002_SX.py", line 1048, in setFREQ
raise ValueError("Not Valid LO Frequency. 240 MHz< F_LO < 3.8 GHz")
ValueError: Not Valid LO Frequency. 240 MHz< F_LO < 3.8 GHz
```
I was wondering if there is any way to get this script to run for the FM band.
Thanks in advance!