开云体育

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

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?


Re: Translated instructions

 

On Sat, Jun 29, 2019 at 08:40 PM, Larry Rothman wrote:


You can access additional commands by connecting the unit to your PC, opening
a terminal on the VNA's serial port and type the help command at the prompt.
You will get a list of all the commands available through the VNA's console.
I used this to calibrate the touch surface using touchcal.
Unfortunately, it doesn't store the touch calibration update.
You can store the touch calibration us saveconfig command.


Re: Translated instructions

 

Great and good luck. Have Fun. Best 73' Alan

________________________________
From: [email protected] <[email protected]> on behalf of Nuno <Nmbb77@...>
Sent: Sunday, June 30, 2019 7:14 PM
To: [email protected]
Subject: Re: [nanovna-users] Translated instructions

Workedine. Thanks. Now I can make some tests on some handheld antenas. And in a 4m antenna that was about to build.

Best 73


Re: Translated instructions

 

Workedine. Thanks. Now I can make some tests on some handheld antenas. And in a 4m antenna that was about to build.

Best 73


nanoVNA as an AA

 

Works very nice. Just measured a NVIS antenna on 40 meters. Spot on with other devices. Suggest putting unit in a black box unless the Sun is hidden by a cloud.

For the HF band, suggest store pre cal freq segments to improve resolution. I use 3-10 MHz and 7-21 MHz as examples, that way easy to see the SWR null if one exists.

Alan W4AMV


Re: Translated instructions

 

On the calibrate, the firmware routine does not appear quite right.

In any case, what I found that works consistent is the following:


1. Select stimulus and start and stop frequency
2. Select CAL and then CALIBRATE
3. Connect the 50 ohm to CH0
4. Press LOAD and then PRESS ISOLN (Note these are highlighted in black at first and then ISOLN goes green)
5. Then connect a THRU cable form CH0 to CH1 and press THRU
6. The firmware takes you to DONE. IGNORE!!!!
7. Now connect an OPEN to CH0
8. Press OPEN
9. Connect a SHORT to CH0
10. Press SHORT
11. Then finally press DONE
12. And SAVE

That's it. Check and be sure that the open, short and 50 ohm are on the proper side of the chart.

Alan W4AMV

P.S. Let me know if not clear or if I missed something. NOTE, this is for the 2 trace or 2 track VNA. Not the 4 track or S11/S21 measurement device. Although I suspect the cal routine is no different.

________________________________
From: [email protected] <[email protected]> on behalf of Nmbb77@... <Nmbb77@...>
Sent: Sunday, June 30, 2019 1:29 PM
To: [email protected]
Subject: Re: [nanovna-users] Translated instructions

Hello all. I have the same instructions, plan to do someday in Portuguese. At time the most confused part is the calibration, didn’T figure yet if it take long to stabilize, if its like put open, short and load and press calibrate...

73’蝉
CT1JQJ