Choosing an antenna analyzer and FA-VA5 review

I thought I would share my experience of choosing, ordering and building an antenna analyzer. A need for one has been hanging around for months if not years. In fact, I have started building one, more like SWR bridge than a full blown analyzer, but still would be very useful. It proved to be quite hard especially the analogue part of the device. The amplitude of signal coming out of DDS would just fluctuate across the frequencies and would go below voltage drop on a simple diode SWR bridge. A problem which I am still working on. But back to the ones you can actually buy.

Before buying an analyzer I did some research. First, into terminology. The way I understood it an antenna analyzer is a one port device which you can connect to and take measurements of an antenna, a coax, possibly an inductor’s resonant frequency, and quite often it acts as a LCR meter. A network analyzer is usually a two port device which can measure all above plus you can test filters, for example bandpass characteristic of a filter.

Then there is a scalar or vector one. A vector network or antenna analyzer can measure not only amplitude but also phase property. The way I understood it the vector analyzers can measure the sign of reactance and tell you if reactance is positive (inductive) or negative (capacitive). For example, a popular MFJ-259 is a scalar antenna analyzer, or as it says on the unit itself, SWR analyzer.

So my requirements for an analyzer were:
1. It must cover HF bands
2. It must do a frequency sweep
3. It should be under £300
4. It should have graphical display
5. It should work without a PC or a phone or a tablet
6. It should be able to plug into a PC and driven from it
7. It will be nice if it covered VHF and UHF

Before I list the models I had considered, I should mention this link which groups analyzers by technology used to measure the parameters, an interesting read mentioning about 50 different devices: https://new.rigexpert.com/a-short-review-of-antenna-and-network-analyzers/.

The models I have considered were:

Sark-110, £330, 0.1-230 MHz. A two-port-MCX device from a Spanish amateur. A handheld with big colour touch screen. A bit unclear if it can be driven by a PC or just the already measured data can be transferred and plotted on a PC. Open to community requested features. eHam review score: 4.5/5
Chinese Sark-100 clones, £55, 1-60Mhz, text display. One port SO-239. Originally an inexpensive kit designed by the same Spanish amateur but not sold by him any more. Manufactured and sold from China these days. There are some reports on having the wrong DDS chip in some units and they were massively off frequency by the factor of 1.5. No warranty. I mentioned it here just because of such low price, may be worth trying out, especially if you are happy to replace an SMD chip if it goes wrong. Does not come with the battery holder so technically it’s a kit. Mini60 is a variation of it, a very tiny device. eHam review score: 2.9/5
MiniVNA tiny, £420, 1-3000Mhz. Two ports, SMA. No display at all. Need to use a phone or a PC. eHam review score: 4.0/5
MFJ-259C, £320, 0.5-230Mhz. One port SO-239. Cannot sweep. Textual display. Needle indicators. Frequency input by multi-position switch and a knob. Frequency generator is a simple LC oscillator. eHam review score: 3.6/5.
MFJ-223, £300, 1-60Mhz. One port, BNC. Can sweep. Looks like a new model. Colour graphical LCD. Has a USB port but for charging only. Cannot be plugged into a PC properly. eHam review score: 4.8/5.
RigExpert AA-55 ZOOM, £270, 0.1-54Mhz. One port SO-239. Can be used in a field and connected to a PC. Very well built. Knows about amateur bands. Has a mode when SWR is being transmitted as audio over VHF so can be used remotely. Not to be confused with AA-54 which is older model with b/w display. Very good video about it: https://www.youtube.com/watch?v=Q2HDuv84mkw. eHam review score: 4.9/5.
• And this article’s feature, FA-VA5. £175, 0.001-600Mhz. One port, BNC. Can sweep once, can sweep constantly. Graphical display. Can be used in a field, can be plugged into a PC. Uses what looks like professional software, VNWA, which works on Windows, Linux and possibly Mac. Can determine the sign of reactance. Has audio buzzer mode. Can measure reflection coefficient and return loss. Can do time-domain measurements (only when connected to a PC). Can work as a signal generator, square wave only. Comes as a simple kit. User-upgradable firmware. HF SOL calibration kit included. Designed in Germany. There is a very good video by the author, DG5MK, https://www.youtube.com/watch?v=X8Z7veGV57o. The technical datasheet is available at http://sdr-kits.net/documents/FA-VA5_Technical_Datasheet.pdf. eHam review score: 5.0/5.

So after looking at all that I chose FA-VA5. There are some proper articles about it, in RadCom, September 2018 and Practical Wireless too. A very good video mentioned above. This is not the first analyzer the author has built but rather a product of many improvements over the previous models.

At £175 it’s excellent value for money and you can get it from www.SDR-Kits.net. It’s a new product and it’s very popular so you may need to wait about a month until it comes into stock. Well worth making a reservation now if you are interested to get one. After it comes in stock for your batch, an email comes around and you can order it then and it arrives literally in one or two days. It is supplied with the HF-friendly short, open and load calibration kit. You might also want to get a better set of SOL calibration kit which works up until 600MHz. You can buy it from the same company, order code “BNC Cal Kit – 3pcs”.

Every high precision calibration kit is slightly different so if you order one you get an email with the link to the calibration file for it, which you can use in VNWA software to get precise measurements. You also get that as a print-out. It was interesting to know that my 50 Ohm load is in fact 49.86 Ohms and has a delay of 244.33 picoseconds and capacitance of zero femtofarad and inductance of 3.77 nanohenry. I don’t pretend to understand all that but it feels very professional, so £13 well spent.

The assembly is not that hard. You get a printed and well written assembly and use manual (pdf copy). They say it takes three hours to build it but it took me about an hour and a half. You get a PCB with all SMD components already on it. All you need to do is to solder some LCD strips, a BNC connector, a switch, buttons etc. It even comes with nice aluminium enclosure and warning stickers. After the assembly you put two AA batteries in and do a master calibration and you are done.

The software which you use when the analyzer is connected to the PC, VWNA, is very powerful. It was originally developed for DG8SAQ VNWA 3 Low Cost 1.3 GHz Vector Network Analyzer. It’s so advanced that I understand only 10% of what it does. The help PDF is 500 pages long which should be a nice read in the coming months.

An example of the same sweep in software and on the analyzer itself:

When sweeping on a PC you can have many more measurement points so the graph is much smoother.

Example of time domain measurement with 5m of open end coax:

The fact that it is a kit I see both as an advantage and disadvantage at the same time. I am not sure what the warranty arrangements are or how easy it is to get a component if you break something during the assembly. But again because it’s a kit, the price is low.

All in all I am very happy with it. I have measured every antenna and coax I had access to. It might even help to finish building my own SWR sweep meter. I would be interested to know if anyone was to buy an antenna analyzer which one would you went for and what is your experience with it. Maybe you can explain to me what the Smith charts are.

Posted in Uncategorized | Tagged | Leave a comment

How to rsync files into docker containers

Being very used to rsync project files into remote systems when working on them, I wanted to do the same with docker containers.

Of course there is docker cp, but it’s just not good enough. It copies over everything which takes time and bandwidth.

So this is what you want:

rsync -e "docker exec -i" --blocking-io -avz --delete --exclude=".git" . containerName:/projectPath/

You will need to have

--blocking-io

, otherwise sync will stop at random point.

What’s your experience with it?

Posted in Uncategorized | Leave a comment

Live dump of HTTP request/response headers

Run on the machine in question:

live HTTP response headers
tcpdump -v -n -S -s 0 -A 'tcp src port 80'

live HTTP request headers
tcpdump -v -n -S -s 0 -A 'tcp dst port 80'

In case of nginx being the proxy use ‘lo’ interface:
tcpdump -v -n -S -s 0 -A 'tcp src port 80' -i lo

Posted in Uncategorized | Tagged | Leave a comment

Making an SSH tunnel to a third machine behind the middle one

ssh -L 8080:host3:80 -N user@host2

Then you can use localhost:8080 to open host2:80

Posted in Uncategorized | Tagged | Leave a comment

Behat: Setting cURL options with Guzzle and Goutte

If when running your Behat tests on a https website you ever seen these errors:

[curl] 51: SSL: certificate subject name ‘ubuntu’ does not match target host name ‘mycoolwebsite’

or

[curl] 60: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed [url]

then you might want to set up Guzzle (PHP HTTP client and framework) and Goutte (screen scraping and web crawling library for PHP) in a way that it ignores strict SSL rules.

When you use Mink Goutte browser emulator it uses Guzzle to make requests and that actually uses cURL to archive that. To pass cURL parameters to Goutte you need to add them into curl.options section of default/extensions/Behat\MinkExtension\Extension/goutte/guzzle_parameters. You will need to set ssl.certificate_authority to system as well, otherwise the Guzzle\Http\Client::initSsl will reset CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER parameters to some other values.

So let’s modify your behat.yml according to this:

    default:
      extensions:
        Behat\MinkExtension\Extension:
          goutte:
            guzzle_parameters:
              curl.options:
                 CURLOPT_SSL_VERIFYPEER: 0
                 CURLOPT_CERTINFO: 0
                 CURLOPT_SSL_VERIFYHOST: 0
              ssl.certificate_authority: system

After this pull request https://github.com/guzzle/guzzle/pull/498 will get merged you will be able to just do:

    default:
      extensions:
        Behat\MinkExtension\Extension:
          goutte:
            guzzle_parameters:
              ssl.certificate_authority: false

After that you won’t see any SSL errors. Bingo!

This was tested with behat v2.5.1, mink-goutte-driver v1.0.9 and guzzle v3.7.4.

Posted in Uncategorized | Tagged , | Leave a comment

Fixing eAccelerator “open_basedir restriction. in Unknown on line 0″ error

If you are using PHP eAccelerator with open_basedir enabled you could have huge amount of these notices in your PHP log files:

open_basedir restriction. in Unknown on line 0

The reason behind it that at the moment eAccelerator tries to open the cached file which is usually in /var/cache/eaccelerator while open_basedir directive is still active and prevents it from doing so.

I don’t know why it is not fixed yet in the next release of eAccelerator but there is a bug about it.

Patch for v0.9.6.1 is there, but just in case, I put it on my host as well. You can download it here.

Having the patch handy, compile and install eAccelerator as usual, just patch it first:

root@video:~# cd eaccelerator-0.9.6.1
root@video:~/eaccelerator-0.9.6.1# patch eaccelerator.c eaccelerator.c.2.patch
patching file eaccelerator.c
root@video:~/eaccelerator-0.9.6.1# phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
root@video:~/eaccelerator-0.9.6.1# ./configure
.........
root@video:~/eaccelerator-0.9.6.1# make
root@video:~/eaccelerator-0.9.6.1# make install

Then create /etc/php5/conf.d/eaccelerator.ini:

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

Create cache directory

mkdir -p /var/cache/eaccelerator

Restart apache

/etc/init.d/apache2 restart

To check that it is used in CLI PHP, do

root@video:/etc/php5/conf.d# php -v
PHP 5.3.2-1ubuntu4.7 with Suhosin-Patch (cli) (built: Jan 12 2011 18:36:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator

To double check it in Web, you may need to create a phpinfo file.

Tha’s it, after that you should not have any more open_basedir notices

Posted in Uncategorized | Tagged , , | 1 Comment

Chmod files but not directories and vice versa

Files:

find top/directory -type f -exec chmod 0644 '{}' \;

Directories:

find top/directory -type d -exec chmod 0755 '{}' \;
Posted in Uncategorized | Leave a comment

Installing PHP 5.3.3/5.3.4/5.3.5 on Ubuntu 10.04

One other problem I faced recently was a very strange Segmantation fault in unit tests which was very difficult to trace.

The problem was fixed by upgrading to PHP 5.3.3.

Unfortunately Ubuntu guys are quite slow of updaing packages so to get PHP 5.3.3 under Ubuntu 10.04 LTS do:

add /etc/apt/sources.list.d/php533.list file with:

deb http://ppa.launchpad.net/nginx/php5/ubuntu lucid main 
deb-src http://ppa.launchpad.net/nginx/php5/ubuntu lucid main

in it.

Run:

apt-get update
apt-get install php5

And you’re done!

If you want to fix apt-get warnings, you need to add they key specified on this page: http://launchpad.net/~nginx/+archive/php5 (look under Technical details about this PPA->the Signing key-what’s this)

Posted in Uncategorized | Tagged , | 11 Comments

Find and replace contents of files recursively

find ./ -name '*.pm' -exec sed -i -e 's/oldtext/newxtext/' "{}" \;
Posted in Uncategorized | Tagged | Leave a comment

Configuring your OpenVZ containers and backing up using vzdump

The main parameter I’ve toched so far is:

privvmpages (Private VM Pages in webvz)- RAM size in memory pages. Usually memory page is 4Kb, so to give your container 256Mb, set it to 65536
(Guaranteed Minimum CPU in webvz)

installing vzdump to create backups:

apt-get install liblockfile-simple-perl
wget http://download.openvz.org/contrib/utils/vzdump/vzdump_1.2-4_all.deb

and make it restart automatically after rebooting inside the system:

put a “touch /reboot” in /etc/init.d/reboot (function do_stop())

Posted in Uncategorized | Tagged | Leave a comment