That looks fantastic, @nepe! Could you drop me a line on myriadrf@halfacree.co.uk? I’d love to ask you a few questions about it with a view to highlighting the project on Lime Micro’s Community hub.
That looks great!!!
Great work Nepe!
Can you add SWR markings?
Can you add progress bar, so we know when the sweep has finished?
Thanks for the effort!
Best Regards,
Kiril
Yes, i can add a SWR measurement mode maybe in next week. Currently working on increasing the sample rate to reduce the sweep time.
The orange line shows the sweep position. See the screenshot above.
Dear Nepe,
The orange line jumps around the screen all the time and i am not quite sure when to stop the measurement when i am calibrating with the short standard.
It will be nice if it is possible to have a “single sweep” option, so the software will do a single sweep for calibration and then stop.
Thanks again for the great work!
Cheers.
Kiril
Today i pushed a new version to the GitHub. Added sample rate selection, more visible sweep cursor, SWR display mode, sweep time improvements, modular sweeper, and bug fixes.
With 20MS/s 500KHz resolution(steps=40) a 100MHz sweep only takes about 6sec. I also tried a multi tone measurement method(MultiToneSweeper.py), with the same settings the sweep time is halved but its highly reduced dynamic range so no ui options added for this right now.
Hi @dgrujic,
I just started to experiment with the SNA code (I noted it is quite different from the VNA code, a lot “simpler” I guess …) and I’m getting a bunch of error messages, some like the previous post and some additional ones:
e[1me[31m[ERROR] Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)e[0m
Do you think I can safely ignore all of these?
Also, could you please shed some light on how this code works? Since each entry of the spectrum is taken directly from a Fourier transform of the measured signal I assume the code sends out pulses centered on the respective frequencies?
My measured signals also have some oscillations with a period comparable to the sampleRate (expected, I guess) - so there should be some frequential averaging or similar to smooth these out, right?
Finally, regarding the values of rxGain and txGain:
I am using the function to measure |S21(f)|, e.g. to characterize a wireless channel rather than a DUT so I fix the gain to be the same for all frequencies and don’t do any calibration (I don’t care about offsets etc if they are the same in repeated measurements). What are the highest possible values for rxGain and txGain? Since free space propagation is very lossy, I think I’d better take the largest possible gain values in my case, right?
Hello, nepe, and thanks for your work. I’ve tried to launch your VNA, but got error:
sdr@sdr:~/Desktop/limeSNA-master$ sudo python3 sna.py
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python3.6/threading.py”, line 916, in _bootstrap_inner
self.run()
File “/usr/lib/python3.6/threading.py”, line 864, in run
self._target(*self._args, **self._kwargs)
File “sna.py”, line 75, in snaThread
radio = pyLMS7002Soapy(1)
NameError: name ‘pyLMS7002Soapy’ is not defined
Original pyLMS7002Soapy examples works great with my pi mini, ive installed and tested all dependencies of your limeSNA - all of them importing successfully. I’m not a pro linux user, so i cant debug where is a problem, and will accept any help
Regards.
You are running it with python3.6, my SNA code is only working with python 2.7. I looked at the pyLMS7002Soapy github page, it looks like they updated it to python 3. Install python 2.7, install this version of the pyLMS7002Soapy lib that is for python 2.7: https://github.com/myriadrf/pyLMS7002Soapy/tree/3814001863265daf6b0efcdd1fd543fb47ad6577
If i have some time i will update the code to support python 3.
Thank You. I’ve reinstalled it and now its fine. But I have few questions.
- I have a same calibration error as [Time2Lime]. Is it matters for your code?
- Orange sweep line doesn’t work for me as it expected. Sometimes i have 2-3 normal sweeps and than line stops and full graph refreshes randomly, or it can just freeze. When it freezes i need to click any buttons on interface and it refresh some tomes more. (measurements in terminal works all time and my pc ispretty fast)
- When i short DUT output to run calibration sweep i have graph like on figure 1. But with original pyLMS7002Soapy works fine.
- Tell me, am i right on my measurements?
- start sna.py
-set freq. range and step. - put short plug to the coupler DUT output.
- press start to sweep few times.
- put antenna to the coupler DUT output.
- press set relative button
- press Run to sweep new charts with calibrated SWR.
Am i right or maybe missing something?
Here is my config, btw.
No
Maybe try different browser?
Look at the y axes, the error is negligible. It looks big because of the graph auto scaling. The dips caused by the bandwidth of the radio at the edges of the band (20MHz in this case).
No, the correct procedure is:
- start sna.py
-set freq. range and step. - put short plug to the coupler DUT output.
- press start to sweep few times.
- press set relative button
- put antenna to the coupler DUT output.
Nah, i’ve tried Vivaldi and Chrome, its same. Refreshes a full graph in one moment and randomly. Sooome times i see rinning orange line, but it can stop any place.
Any ideas where i need to dig?
You can try to slow down the sweep by changing
line 74
targetTime = int(self.radio.sdr.getHardwareTime() + 1e6)
to
targetTime = int(self.radio.sdr.getHardwareTime() + 10e6)
or
100e6
in SingleToneSweeper.py
Dose this solves your problem?
Sorry, nothing changed. Slowed 10-100 times, but nothing.
It can fully sweep 5-6 times in terminal, while any result appear on browser. Sometimes only half of diagram showed.
When i was installing dependencies i did not install webbrowser, because
webbrowser is part of the python standard library, you don’t have to install a separate package to use it because it comes bundled with your python installation.
and my terminal promts:
sdr@sdr:~$ sudo pip install webbrowser
[sudo] password for sdr:
WARNING: The directory ‘/home/sdr/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
WARNING: The directory ‘/home/sdr/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting webbrowser
ERROR: Could not find a version that satisfies the requirement webbrowser (from versions: none)
ERROR: No matching distribution found for webbrowser
I’m sotty, that disturbing You, but any more ideas how to fix it?
The webbrowser lib is only used to open the default browser on your machine, not a critical component.
I think the other errors also can’t be problematic.
I have no idea what causing your problem. From what you say it’s related to the browser part (javascript/HTML5 Canvas). Somehow the chart rendering is to slow on your machine.
I had the same problem here. It turned out that for some reason the measurement data is hanging somewhere in the python SocketIO for a random time and then gets transmitted to the browser all at ones. Changing line 29 in sna.py to
self.socketio = SocketIO(app, async_mode='threading')
did it for me. This is just a quick and dirty hack as the Flask-SocketIO developer mentions that this “threading” option is only there for debugging. And it fills the terminal with debugging messages quite fast.
Maybe nepe has an idea how to stay with the async_mode='gevent'
option?
Great tool! I’ve been using this with the LimeSDR-USB and it works fine for the default receiver channel 1 with antenna port LNAL. However, I have been attempting to switch to port LNAH with no luck. Do you have any tips?
Cheers