开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

NanoVNA and Linux


 

Is anyone else trying this out ..
My experience so far:

OMG the Com port is not being detected ... read loads of crap on STMicroelectronics Virtual Com Port from ages back ... then noticed instead of /dev/ttyUSB0 it makes /dev/ttyACM0 .... DOH!!

Tried setting up NanoVNASharp with playonlinux ... so far no go but have not tried too hard yet .... UGH!

nanovna.py came with some issues as well but not hard to sort out just a little ugh

so first make sure you install the dependencies:

$ pip install numpy
$ pip install scikit-rf

I found pip install scikit-rf needed sudo so

$ pip install numpy
$ sudo pip install scikit-rf

Then nanovan.py complains about the com port ...

Traceback (most recent call last):
File "./nanovna.py", line 330, in <module>nv.set_port(opt.port)
File "./nanovna.py", line 58, in set_port self.send_command("port %d\r" % port)
File "./nanovna.py", line 48, in send_command self.open()
File "./nanovna.py", line 40, in open self.serial = serial.Serial(self.dev)
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 240, in __init__ self.open()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 268, in open raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))serial.serialutil.SerialException: [Errno 2] could not open port /dev/cu.usbmodem401: [Errno 2] No such file or directory: '/dev/cu.usbmodem401'

Tried passing the port to nanovna.py using the -P switch:
$ ./nanovna.py -P /dev/ttyACM0
Usage: nanovna.py: [options]
nanovna.py: error: option -P: invalid integer value: '/dev/ttyACM0'

Then brain kicked in ... it is the the OMG early hours right now :P and used the -d switch -P must be for setting he channel Port BIG DOH!!

With that working I have been trying to get plots all seems to go ok only I get a screen showing a plot (wish I could attach (admins?))

will try an explain

running ./nanovna.py -d /dev/ttyACM0 -P 0 -v -W gets me a graph in matlib x 0.0 to 3.0 y 1.000 ti 1.025 at this point i was all YAY .. then I zoomed out and moved around no data showing out of these scales ... ok me thinks pass a frequency and perhaps those numbers move so just a test i pluck 7Mhz out of my head and run ./nanovna.py -d /dev/ttyACM0 -P 0 -F 7000000 -v -W and get exactly the same graph .... have i missed something the -h doesn't specify how to send the Freq (i.e. Hz Khz Mhz)

So after my long winded post (sorry all) am am left with:

How do you get a graph of the area you want?
What is the -c scan by script option anyone played with that yet?
And the biggy has anyone coded a live updating graph like the vna/j software ... or better yet a plugin for vna/J?

Cheers All

Tim M0THM


 

Nice description.
just before mine went in the bag for return thought I'd give the same reconfiguration of the com port a go and it was still not picked up the device so as you managed to get it to work that confirmed for me mine needs to go back.

BTW I had look at the nanovna.py code from and the example I think it is in Hz.

72

Dom
M1KTA


 

Hello, I am new to the group and am working through the application of the nanoVNA I received. I am doing some of this work with a ham colleague and both of us are seasoned users of VNA from various other sources. The out of box experience to this point has been excellent. I'll try to report what we have found and what deserves more attention in another message.

Thanks, Alan W4AMV


 
Edited

So ... I have played a little more ... Thanks to Larry for listing the serial commands ... I can now command my nanoVNA from ubnuntu using them .. and after a play and putting putty on the same virutal drive in PlayOnLinux have been able to confimr that simply linking the comport through works ..

ln -s /dev/ttyACM0 ~/PlayOnLinux\'s\ virtual\ drives/'NanoVNA'/dosdevices/com*

where * is whatever com port you wish to use and NanoVNA is the name of your Virtual Drive.

Putty will connect and work :) however NanoVNA Sharp still refuses to connect :(

More fun ... if anyone whishes me to try other software yell ... also getting POL to run the nanovnasharp program was a little fun ... when setting up the virtual drive you need to remove mono completely and then add the dotnet40 or above component .. if the mono compoent is still installed they clash and crash :(

Cheers

Tim M0THM


 
Edited

Ok so tonight was flash the firware night :)

It took me longer than it should of but I got there in the end :)

I am using Ubuntu and to do this you need the dfu-util pacakger so go ahead and

$sudo apt-get install dfu-util

Now put your VNA into DFU mode the same way as elsewhere by shorting boot to vdd and powering up. Now connect your USB cable.

next list the devices with:

$sudo dfu-util -l

I get:

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to

Found DFU: [0483:df11] ver=2200, devnum=21, cfg=1, intf=0, path="5-5", alt=1, name="@Option Bytes /0x1FFFF800/01*016 e", serial="FFFFFFFEFFFF"
Found DFU: [0483:df11] ver=2200, devnum=21, cfg=1, intf=0, path="5-5", alt=0, name="@Internal Flash /0x08000000/064*0002Kg", serial="FFFFFFFEFFFF"

First I took a backup of nanoVNA (paranoid about bricking things)

$sudo dfu-util -a 0 -i 0 -s 0x08000000:leave -U temp.bin

Then I went ahead and flashed the firmware:

$dfu-util -a 0 -D nanoVNA_900_ch_20190505.dfu

It really is that painless :)

Cheers all

Tim M0THM


 

Opps note ... After making the firware backup the device reboots .. so you need to put it back into DFU mode.