开云体育

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

Re: Messaging (over USB-C) between nanovna and PC client - documented (or could be)?

 

Hi George,
I scarfed the commands by going through main.c (and a few posts here) and there is some ambiguity on how to format a few of them as well as how executing some might affect others.

If you could verify and/or notate the command list while writing your application, I'm sure others would appreciate it.

Also, there are 3 versions of nanoVNA firmware but no one has released the sources for them (that I can find) and I'm sure there may be new commands or options not listed in the original git repository. For this I'm going to go through the binaries for more info.

Thanks
Larry


Re: Calibration procedure

 

Some photos of my NanoVNA measuring a "6.5MHz" Butterworth LP


Re: Messaging (over USB-C) between nanovna and PC client - documented (or could be)?

 

Hi Larry,

The NanoVNA command listing you posted is all that is needed to communicate with the NanoVNA.

I am writing an article on the NanoVNA as well as writing software to perform all the functions of the NanoVNA Sharp and more. My emphasis is on impedance calculations, checking filters, measuring crystals and equivalent circuit models. I do not care for depending on NET.framework or Python. So my software runs on old/cheap laptops running Win XP. These laptops work well in my lab environment and this low-cost VNA does a good job for me.

Regards,
George


Re: Messaging (over USB-C) between nanovna and PC client - documented (or could be)?

 

David,

Refer to my initial posting (a few posts back from this one) of the NanoVNA Console command listing as well as the Python sourcecode just mentioned.
That should be more than enough info to figure out how to control and extract data from the device over the USB interface.

Regards,
Larry


Re: Messaging (over USB-C) between nanovna and PC client - documented (or could be)?

 

Hi David,
The simplest way is to read the Python source code example.
9600 bauds seems to be a right choice for USB communication speed.
Regards,
David, F4HTQ.


Messaging (over USB-C) between nanovna and PC client - documented (or could be)?

 

This is somewhat prompted by a recent question about PC application function/capabilities.

Is the (USB Communications) messaging between the nanovna unit and the host PC -

1. Documented?
2. Could be documented or reverse engineered (i.e., not encrypted or obfuscated)?

If the messaging is or can be documented, that suggests some new capabilities such as headless/scripted operation in a linux host environment (something I could make use of.)

Thanks,

Dave


List of NanoVNA Console Commands

 

NOTE:
I created this list by reviewing the older Github source code.
This is the first iteration and there WILL be mistakes - but it's a starting point for the documentation of the console commands.

Please keep this thread on topic!
I will edit this list as users inform me of changes.

Please feel free to change/add/correct/comment and use this list to further the usefulness of the NanoVNA.
Cheers,
Larry

NanoVNA Console Commands:
=========================
help – prints most of the following commands (below) – some are not enabled but appear in the source code
exit – exits and then restarts console mode and prints command prompt
info – prints firmware info:
Kernel: 4.0.0
Compiler: GCC 5.4.1 20160919
Architecture: ARMv6-M
Core Variant: Cortex-M0
Port Info: Preemption through NMI
Platform: STM32F072xB Entry Level Medium Density devices
Board: NanoVNA
Build time: May 5 2019 - 08:54:38
echo - Usage: echo "message"
systime – outputs binary time from 1/1/1980: eg: 81225068
threads
reset - Performing reset
freq - frequency(Hz)}
offset - frequency offset(Hz)}
time – get the time in: timespec.year+1980, timespec.month, timespec.day, timespec.millisecond
dac - usage: dac {value(0-4095)}
saveconfig - saves current configuration - and prints "Config saved".
not sure what in total it saves - need to go through source code.
clearconfig - usage: clearconfig {protection key}
where key is predefined as “1234”
and wrong input gives: “Key unmatched” error.
Correct key gives: “Config and all cal data cleared”
data - usage: data [array]
dump - (if enabled) outputs dump buffer
gamma – Prints gamma[0]& gamma[1]
frequencies – prints a long list of all the sweep points from start to stop
port – Sets port of DSP tlv320aic3204
usage: port {0:TX 1:RX}
stat – outputs processor status:
average: -138 -137
rms: 3597 8
callback count: 9126700
awd: 27
gain – sets gain of DSP tlv320aic3204
usage: gain {lgain(0-95)} [rgain(0-95)]
power - usage: power {0-3}
sweep - usage: sweep {start(Hz)} [stop] [points]
if no inputs: then prints current setup eg:300000000 500000000 101
otherwise, can force new sweep settings using the following commands:
start
stop
center
span
cw
set – sets sweep points
start
stop
test – unknown how to use – appears to set freq span from 10MHz to 90MHz and involves one of the LEDs and touchscreen input
touchcal – produces calibration touch points in the upper left and lower right corners
outputs: "first touch upper left, then lower right...")
"诲辞苍别”
"touch cal params: A B C D (upper left and lower right x-y co-ords)
touchtest – test touch accuracy – touch, hold and drag pointer
pause – pause LCD display output
resume – resume LCD display output
cal - usage: cal [load|open|short|thru|isoln|done|reset|on|off|in]
save - save {id} where ‘id’ is from 0 to 4
recall - recall {id} where ‘id’ is from 0 to 4
trace – prints status of either 2 or 4 traces depending on F/W version used:
0 SWR CH0 1.000000000 0.000000000
1 LOGMAG CH1 1.000000000 7.000000000
2 SMITH CH0 1.000000000 0.000000000
3 PHASE CH1 1.000000000 4.000000000
marker – Usage: marker [n] [off|{index}]
edelay – electrical delay in picoseconds


Re: Calibration coefficients - can one change them?

 

Dave, as far as I can tell to this point, there is no ability to enter your own polynomial coefficient of the standards. The unit comes with SOL 3.5 mm and they are described as fairly simple construction. Using independent calibration of a 3.5 mm cal kit on another VNA, I determined the quality of their standards. And based on that response I believe for HF applications the unit is quite acceptable.

Again, my earlier question are the standards they provide described within the firmware, don't know. My initial guess is they are taken as ideal, but I may be wrong. Alan

________________________________
From: [email protected] <[email protected]> on behalf of Dr. David Kirkby from Kirkby Microwave Ltd <drkirkby@...>
Sent: Tuesday, July 2, 2019 12:06 PM
To: nanovna-users
Subject: [nanovna-users] Calibration coefficients - can one change them?

I've got nanoVNA on order, but don't have it yet. It's not due to at least
4th July, so that's no big surprise.

Can anyone tell me if one can change the coefficients of the
open/short/load kit? I just have done a test with 4 sorts of opens. The
connector was a male N, so the calibration standard a female N. But
anyway, here are the results at 902.625 MHz, which is the nearest frequency
I have any data. (I had calibrated to 18 GHz for another job, so don't have
data at exactly 900 MHz, but this is as close as makes no practical
difference)


*Male N plug just open. No female standard*. Phase = +4.64722 degrees @
902.62500
Female open standard from HP 85032B open standard, used without any
extender, as it is NOT supposed to be. Phase = +4.64014 degrees @ 902.62500
MHz
Female open standard from HP 85032B calibration kit, with the extender, as
it SHOULD be used -3.65161 degrees @ 902.62500 MHz
Female Open standard from HP 85054B 18 GHz calibration kit. Phase =
-18.18457 @ 902.62500 MHz

IMPORTANT
The male N plug was a metrology grade male-male adapter from an HP 85054B
VNA calibration kit. Since the shape of the male pin is not well defined,
and commercial grade connectors are recessed by various amounts, I would
not expect this result to be reproducible with different connectors, but
fairly substantial variations

Anyway, the conclusion is that for the female N calibration standards, the
phase varies from +4.6 to -18.2 degrees at 902 MHz. So a phase variation of
22.8 degrees depending on what calibration standard one uses. The variation
would be smaller at lower frequencies, but depending on what the nanoVNA
assumes about the calibration standard, one could get quite different
results.

Ideally, one needs to be able to enter the offset delay of the calibration
standards as an *absolute minimum.* The fringe capacitance would be nice
too, but could just about get away without that, as one could do a rough
job of compensation via changing the offset delay. Better still would be a
third order polynomial, which would make entering coefficients from a
commercial calibration kit easy, without trying to work out any
compensation values.

If the firmware is dumb enough to assume the open standard is ideal (phase
= 0 degrees), and the short is ideal (phase = 180 degrees), then it would
cause significant errors.

Likewise, if the firmware made assumptions about the SMA kit supplied,
those assumptions would be wrong if a different SMA, 3.5 mm, N or APC cali
kit was used.

Even if you are not interested in phase measurements, be aware of the fact
the point of the vector correction is to correct for amplitude variations
too. Anyone that believes that they don't need to worry about vector
correction, as they are only interested in amplitude measurements, is
seriously mistaken.

Dave

--
Dr David Kirkby Ph.D C.Eng MIET
Kirkby Microwave Ltd
Registered office: Stokes Hall Lodge, Burnham Rd, Althorne, CHELMSFORD,
Essex, CM3 6DT, United Kingdom.
Registered in England and Wales as company number 08914892

Tel 01621-680100 / +44 1621-680100


Calibration coefficients - can one change them?

Dr. David Kirkby from Kirkby Microwave Ltd
 

I've got nanoVNA on order, but don't have it yet. It's not due to at least
4th July, so that's no big surprise.

Can anyone tell me if one can change the coefficients of the
open/short/load kit? I just have done a test with 4 sorts of opens. The
connector was a male N, so the calibration standard a female N. But
anyway, here are the results at 902.625 MHz, which is the nearest frequency
I have any data. (I had calibrated to 18 GHz for another job, so don't have
data at exactly 900 MHz, but this is as close as makes no practical
difference)


*Male N plug just open. No female standard*. Phase = +4.64722 degrees @
902.62500
Female open standard from HP 85032B open standard, used without any
extender, as it is NOT supposed to be. Phase = +4.64014 degrees @ 902.62500
MHz
Female open standard from HP 85032B calibration kit, with the extender, as
it SHOULD be used -3.65161 degrees @ 902.62500 MHz
Female Open standard from HP 85054B 18 GHz calibration kit. Phase =
-18.18457 @ 902.62500 MHz

IMPORTANT
The male N plug was a metrology grade male-male adapter from an HP 85054B
VNA calibration kit. Since the shape of the male pin is not well defined,
and commercial grade connectors are recessed by various amounts, I would
not expect this result to be reproducible with different connectors, but
fairly substantial variations

Anyway, the conclusion is that for the female N calibration standards, the
phase varies from +4.6 to -18.2 degrees at 902 MHz. So a phase variation of
22.8 degrees depending on what calibration standard one uses. The variation
would be smaller at lower frequencies, but depending on what the nanoVNA
assumes about the calibration standard, one could get quite different
results.

Ideally, one needs to be able to enter the offset delay of the calibration
standards as an *absolute minimum.* The fringe capacitance would be nice
too, but could just about get away without that, as one could do a rough
job of compensation via changing the offset delay. Better still would be a
third order polynomial, which would make entering coefficients from a
commercial calibration kit easy, without trying to work out any
compensation values.

If the firmware is dumb enough to assume the open standard is ideal (phase
= 0 degrees), and the short is ideal (phase = 180 degrees), then it would
cause significant errors.

Likewise, if the firmware made assumptions about the SMA kit supplied,
those assumptions would be wrong if a different SMA, 3.5 mm, N or APC cali
kit was used.

Even if you are not interested in phase measurements, be aware of the fact
the point of the vector correction is to correct for amplitude variations
too. Anyone that believes that they don't need to worry about vector
correction, as they are only interested in amplitude measurements, is
seriously mistaken.

Dave

--
Dr David Kirkby Ph.D C.Eng MIET
Kirkby Microwave Ltd
Registered office: Stokes Hall Lodge, Burnham Rd, Althorne, CHELMSFORD,
Essex, CM3 6DT, United Kingdom.
Registered in England and Wales as company number 08914892

Tel 01621-680100 / +44 1621-680100


Re: Calibration procedure

 

Alan,
Thanks for message 83. I will try that this morning. Bill


Re: Calibration procedure

 

Thank you! The photos are a great help!
Bill


Re: Calibration procedure

 

See message #83. Alan


Re: Calibration procedure

 

Bill, I wrote up a calibration sequence in an earlier thread. If you cannot find it, I will cut and paste in a reply. Currently this was done on the 2 -track unit but I assume the sequence is no different for the 4 track.

Key is the flow on the unit has you go to DONE and causes you to omit SHORT and OPEN.

Alan W4AMV


Re: Calibration procedure

 

SMA male calibration kit (OPEN / SHORT /LOAD).


Re: Calibration procedure

 

These are pictures of calibration.

Thank you!


Calibration procedure

 

Would someone be willing to publish a pictorial description of the calibration process.
I have read thru the English version of the manual (no photos of the Cal process at all) and am unclear how I should calibrate for a two port filter measurement.

In fact, if someone could show a two port measurement being made, that would be awesome.

Tell you what, if someone illustrates the Cal process, I will publish a two port measurement of an LC low pass Butterworth filter...
Thanks,
Bill


Re: USPS mis-delivery of nanova package - to wrong zip and STATE! Scam or error?

 

Still waiting for my nanovna, but bogus USPS tracking is not at all amazing.
I have had packages wrongly reported delivery to my correct address up to 4 days before actual delivery.
If you have tracking data from a successful delivery for comparison, you may note where bogus
track has missing steps. I suppose these result from wrong barcode scans...


USPS mis-delivery of nanova package - to wrong zip and STATE! Scam or error?

 

I live in Ohio. My nanovna package tracking shows delivery to "Mailbox" in Nebraska on Saturday.
USPS "Email Us" site is "temporarily unavailable" and their phone tree is a complete FAIL.

I think this is not likely the eBay seller's fault, but an amazing USPS error, since tracking is present.
Scam or error?

Anyone with advice or comments?

Thanks, AC8FD


Re: NanoVNA software on windows 10 x64?

 

Has anyone been able to find an alternative program that works better than NanoVNASharp? It is severely lacking capabilities that the vna itself is capable of reading. An example is VNAJ .


Re: Translated instructions

 

Good to know, thanks.
What other settings will the saveconfig command save?