¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date

Re: Firmware Differences

 

Many thanks! I now understand it just means "(644/1000) + (53.2/1000)", just as in milliNumber nothing more than that thus the "644m + 53.2m" notation is totally appropriate, IMHO.

--
Thanks Again!
Tom, VA7TA


Re: Menu Structure Map for V1.2.14? #firmware #menu

 

On Thu, Oct 27, 2022 at 05:59 PM, Ho-Ro wrote:
This is my current python code:
Hello Ho-Ro,
Thank you very much for this great improvement of your nanoVNA menu-map program :-)

I am working with MacOS Mojave, and tried it now with Python 3.9.
The files ui.c and plot.c are from
Unfortunately I got a traceback:

$ python3 Ho-Ro_nanoVNA_menu_readout-2.py
DISPLAY
TRACE
TRACE 0
TRACE 1
TRACE 2
TRACE 3
STORE/CLEAR TRACE
STORE/CLEAR TRACE A
STORE/CLEAR TRACE B
STORE/CLEAR TRACE C
<- BACK
FORMAT S11 (REFL)
LOGMAG
PHASE
DELAY
SMITH
Traceback (most recent call last):
File "/Volumes/DAT/HDA8/INSTALL/Develop/Afu/NanoVNA/Menu_map/Ho-Ro_nanoVNA_menu_readout-2.py", line 127, in <module>
show_menu( 'menu_top', 0 )
File "/Volumes/DAT/HDA8/INSTALL/Develop/Afu/NanoVNA/Menu_map/Ho-Ro_nanoVNA_menu_readout-2.py", line 124, in show_menu
show_menu( next_menu, level + 1 )
File "/Volumes/DAT/HDA8/INSTALL/Develop/Afu/NanoVNA/Menu_map/Ho-Ro_nanoVNA_menu_readout-2.py", line 124, in show_menu
show_menu( next_menu, level + 1 )
File "/Volumes/DAT/HDA8/INSTALL/Develop/Afu/NanoVNA/Menu_map/Ho-Ro_nanoVNA_menu_readout-2.py", line 124, in show_menu
show_menu( next_menu, level + 1 )
File "/Volumes/DAT/HDA8/INSTALL/Develop/Afu/NanoVNA/Menu_map/Ho-Ro_nanoVNA_menu_readout-2.py", line 106, in show_menu
menu_text = f'{ms_dict[ param ]}'
KeyError: 'MS_LIN'

Your python code is very clever, but too complicated for me to follow :-(

Could you please have a look what is the cause of the tracebak?
73, Rudi DL5FA


Re: Menu Structure Map for V1.2.14? #firmware #menu

 

On Thu, Oct 27, 2022 at 05:59 PM, Ho-Ro wrote:


This is my current python code:
Now available on GitHub:


Re: Firmware Differences

 

Not that I have any real need to know but I am just curious what the "m" abbreviation stands for in the raw data example of "644m + 53.2m"? Does it happen to represent milliVolts RMS, milliVolts PTP calculated from the ADC output >measurement values or possibly something else?
m - milli
u - micro
M - mega
G - giga
And so on

Re Im value - just complex number
644m + 53.2mj = 0.644 + 0.0532j


Re: Firmware Differences

 

Additional:
Re Im - base measured value
All other values calculated from it


Re: Firmware Differences

 

Greetings,
Not that I have any real need to know but I am just curious what the "m" abbreviation stands for in the raw data example of "644m + 53.2m"? Does it happen to represent milliVolts RMS, milliVolts PTP calculated from the ADC output measurement values or possibly something else?
--
Best Regards,
Tom, VA7TA


Re: Firmware Differences

 

On Thu, Oct 27, 2022 at 07:45 AM, John N0TA wrote:


This begs the question: Why does the Nano Smith chart default to Re Im, rather
than R + jX? It appears to me that Re Im is pretty useless.
- John
Base Smitch diagram value: Re Im


Also Re Im more universal for S11 and S21 some (so i use it as default)
R+jX calculation depend from channel and connect mode (for S21 serial or shunt)


Re: Firmware Differences

 

The chart setting defaults to the value it was set to at the last Save (for
a given slot), so you can set it the way you like.

On Thu, Oct 27, 2022, 7:45 AM John N0TA <reillyjf@...> wrote:

This begs the question: Why does the Nano Smith chart default to Re Im,
rather than R + jX? It appears to me that Re Im is pretty useless.
- John






Re: Menu Structure Map for V1.2.14? #firmware #menu

 

On Wed, Oct 26, 2022 at 06:31 PM, Jim Lux wrote:


if I don't have ui.c,
Then the menu parser doesn't make sense at all. It is a development tool living in my local source code git repository that is a fork from DiSlord's GitHub.

But nevertheless, I made some code improvements and output reformatting. Most strings come directly from the source code, but some tweaks are needed. It should work also for the next versions.
The output shows all _possible_ menu entries, even if they are disabled in the config file nanovna.h.
This is my current python code:

#!/usr/bin/python


# parse the source code for DiSlord's NanoVNA-H / -H4 firmware
# show all possible menu entries regardless if they are enabled / disabled
# in nanovna.h
# copy this file in the source code directory

# parse 'plot.c' and create a directory from lines like this
# [MS_SERIES_RX] = {"R+jX SERIES","%F%+jF" S_OHM, s21series_r, s21series_x },
# key = entry in brackets and value = 1st string
# e.g.: { "MS_SERIES_RX" : "R+jX SERIES" }

ms_dict = {} # start with an empty dictionary

with open( 'plot.c' ) as plot_c:
lines = plot_c.read().splitlines()
for line in lines:
if 'marker_info_t' in line:
continue
if '[MS_' in line:
line = line.strip()
key = line.split()[0].strip('[]') # get string in brackets
val = line.split('"')[1] # get 1st string in double quotes
ms_dict[ key ] = val # put in dictionary


# read the file 'ui.c' which contains the menu structure
with open( 'ui.c' ) as ui_c:
ui = ui_c.read().splitlines()


# format a string like 'menu_XXXXX_acb' or 'menu_XXXXX_cb' and return only 'XXXXX'
def strip_menu( name ):
if '_acb' in name:
return name[5:-4] # strip 'menu_' and '_acb'
elif '_cb' in name:
return name[5:-3] # strip 'menu_' and '_cb'
else:
return name[5:] # strip 'menu_'


def show_menu( this_menu, level ):
menu = None
for line in ui:
# skip declaration lines
if 'extern' in line:
continue
# find menu
# format: "const menuitem_t menu_config[] = {"
if f'const menuitem_t {this_menu}[]' in line:
menu = this_menu
continue

# parse menu entries
# { MT_SUBMENU, 0, "DISPLAY", menu_display },
if menu:
if "MT_NONE" in line: # last entry -> back
if level: # no "<- BACK" button in level 0
print( (' ' * ( 4 * ( level-1 ) ) ) + ' <- BACK' ) # indent according to level
return
if "MT_SUBMENU" in line \
or "MT_CALLBACK" in line \
or "MT_ADV_CALLBACK" in line:
line = line.strip(' {},')
what, param, text, next_menu = line.split( ',' )
param = param.strip()
text = text.strip()
text_1 = text
next_menu = next_menu.strip()
menu_text = None

if 'MT_CUSTOM_LABEL' == text:
#print( line )
if next_menu == '':
menu_text = ''
elif 'F_S11' in param:
next_menu = 'menu_marker_s11smith'
menu_text = 'SMITH'
elif 'F_S21' in param:
next_menu = 'menu_marker_s21smith'
menu_text = 'SMITH'
elif 'menu_save_acb' == next_menu:
menu_text = f'SAVE {param}'
elif 'menu_recall_acb' == next_menu:
menu_text = f'RECALL {param}'
elif 'menu_power_sel_acb' == next_menu:
menu_text = 'POWER'
elif 'menu_cal_range_acb' == next_menu:
menu_text = 'RESET CAL RANGE'
elif 'menu_keyboard_acb' == next_menu:
menu_text = 'JOG STEP'

menu_name = strip_menu( next_menu )
if '"' in text:
text_1 = text.split('"')[1]
if 'MORE' in text:
menu_text = '-> MORE'
elif 'VNA_MODE_SEARCH' == param:
menu_text = 'SEARCH MIN/MAX'
elif 'MK_SEARCH_LEFT' == param:
menu_text = 'SEARCH <- LEFT'
elif 'MK_SEARCH_RIGHT' == param:
menu_text = 'SEARCH -> RIGHT'
elif 'marker_smith' == menu_name:
menu_text = f'{ms_dict[ param ]}'
#print( ' ' * (4*level-1), menu_text )
elif 'pause' == menu_name:
menu_text = 'PAUSE/RESUME SWEEP'
elif 'format' in menu_name:
menu_text = text_1
elif 'stored_trace' == menu_name:
menu_text = text_1 % 'STORE/CLEAR'
elif '%d' in text_1 and param.isnumeric():
menu_text = text_1 % int( param )
elif '%s' in text_1:
menu_text = text_1 % param
if menu_text == None:
menu_text = text_1
# remove '\n' and duplicate spaces
menu_text = menu_text.replace( '\\n', ' ' ).replace( ' ', ' ' )
print( ( ' ' * ( 4 * level ) + menu_text ) ) # print indented according level
# recurse into next level
show_menu( next_menu, level + 1 )

# start from top level menu
show_menu( 'menu_top', 0 )


#############################

It gives:

DISPLAY
TRACE
TRACE 0
TRACE 1
TRACE 2
TRACE 3
STORE/CLEAR TRACE
STORE/CLEAR TRACE A
STORE/CLEAR TRACE B
STORE/CLEAR TRACE C
<- BACK
FORMAT S11 (REFL)
LOGMAG
PHASE
DELAY
SMITH
LIN
LOG
Re + Im
R + jX
R + L/C
G + jB
G + L/C
Rp + jXp
Rp + L/C
<- BACK
SWR
RESISTANCE
REACTANCE
|Z|
-> MORE
POLAR
LINEAR
REAL
IMAG
Q FACTOR
CONDUCTANCE
SUSCEPTANCE
|Y|
-> MORE
Z PHASE
SERIES C
SERIES L
PARALLEL R
PARALLEL X
PARALLEL C
PARALLEL L
<- BACK
<- BACK
<- BACK
FORMAT S21 (THRU)
LOGMAG
PHASE
DELAY
SMITH
LIN
LOG
Re + Im
R+jX SHUNT
R+jX SERIES
<- BACK
POLAR
LINEAR
REAL
IMAG
-> MORE
SERIES R
SERIES X
SERIES |Z|
SHUNT R
SHUNT X
SHUNT |Z|
Q FACTOR
<- BACK
<- BACK
CHANNEL
SCALE
SCALE/DIV
REFERENCE POSITION
E-DELAY
S21 OFFSET
SHOW GRID VALUES
DOT GRID
<- BACK
TRANSFORM
TRANSFORM 0
LOW PASS IMPULSE
LOW PASS STEP
BANDPASS
WINDOW
VELOCITY FACTOR
<- BACK
BANDWIDTH
DATA SMOOTH
SMOOTH
SMOOTH OFF
x1
x2
x4
x5
x6
<- BACK
PORT-Z
<- BACK
MARKER
SELECT MARKER
MARKER 0
MARKER 1
MARKER 2
MARKER 3
MARKER 4
MARKER 5
MARKER 6
MARKER 7
ALL OFF
DELTA
<- BACK
SEARCH MIN/MAX
SEARCH <- LEFT
SEARCH -> RIGHT
OPERATIONS
START
STOP
CENTER
SPAN
E-DELAY
<- BACK
TRACKING
<- BACK
STIMULUS
START
STOP
CENTER
SPAN
CW FREQ
JOG STEP
SWEEP POINTS
<- BACK
CALIBRATE
CALIBRATE
OPEN
SHORT
LOAD
ISOLN
THRU
E-DELAY
DONE
DONE IN RAM
<- BACK
POWER
SAVE
SAVE TO SD CARD
SAVE 0
SAVE 1
SAVE 2
SAVE 3
SAVE 4
SAVE 5
SAVE 6
SAVE 7
<- BACK
RESET CAL RANGE
RESET
APPLY
<- BACK
RECALL
LOAD FROM SD CARD
RECALL 0
RECALL 1
RECALL 2
RECALL 3
RECALL 4
RECALL 5
RECALL 6
RECALL 7
<- BACK
MEASURE
OFF
L/C MATCH
CABLE (S11)
RESONANCE (S11)
SHUNT LC (S21)
SERIES LC (S21)
SERIES XTAL (S21)
MEASURE Rl =
<- BACK
SD CARD
LOAD
LOAD BMP
LOAD S1P
LOAD S2P
LOAD CAL
<- BACK
SAVE S1P
SAVE S2P
SCREENSHOT
SAVE CALIBRATION
AUTO NAME
<- BACK
CONFIG
TOUCH CAL
TOUCH TEST
EXPERT SETTINGS
THRESHOLD
TCXO
VBAT OFFSET
IF OFFSET
REMEMBER STATE
FLIP DISPLAY
SET DATE
SET TIME
-> MORE
MODE
SEPARATOR
DUMP FIRMWARE
LOAD COMMAND SCRIPT
LOAD CONFIG.INI
CLEAR CONFIG
CLEAR ALL AND RESET
<- BACK
<- BACK
<- BACK
SAVE CONFIG
CONNECTION
CONNECTION
SERIAL SPEED
<- BACK
VERSION
BRIGHTNESS
DFU
RESET AND ENTER DFU
<- BACK
<- BACK
PAUSE/RESUME SWEEP


Re: Firmware Differences

John N0TA
 

This begs the question: Why does the Nano Smith chart default to Re Im, rather than R + jX? It appears to me that Re Im is pretty useless.
- John


Re: Firmware Differences

 

Hello Tom,

I noticed the format change just after I sent the post:-(
However the frequency difference was what caught my eye and I got "blind sided".
I agree with your comment, however, given other posts on component testing, defining a "pure resistance" is an interesting concept:-)
There was no mention of the test fixture or of resistor type, carbon, metal film or wire wound. A 10 ohm carbon film or wirewound resistor would have a very different response at 30Mhz compared to 1Mhz.
I repaired a piece of kit used to high voltage test sub station power transformers many years ago and it had a Philips 100 ohm 1 watt carbon resistor in series with the vertical input to the integrated CRO in the instrument.
The resistor was fried by a flash over and I was a bit puzzled at first because it was such a low series resistance in what was a high impedance input. I then twigged that it was, in fact, being used as a peaking coil.
Those Philips resistors had the carbon film deposited on the tubular ceramic substrate and then laser etched in a spiral to the required value. Lovely stable inductance!
However, the Smith Chart marker in the post is still on the real axis in both screenshots, negligible +j component. Like said, blind sided:-(

73...Bob VK2ZRE

On 27/10/2022 1:04 am, Tom Thompson W0IVJ wrote:
Hi Bob,

The issue was the values appearing on? S11(Smith chart) which DiSlord cleared up nicely.? By? the way, if you have the S11 port terminated in a pure resistance with no transmission line, the frequency makes no difference.? Even though the resistance is other than 50 ohms, the reading will be the same independent of frequency.

Tom?? W0IVJ

On 10/26/2022 7:00 AM, Bob Ecclestone VK2ZRE wrote:
Hi All,
I may have missed something here, but these screenshots are not comparing apples to apples.
In the first screenshot the marker is at 1MHz and in the second it is at 30MHz.
Given all the posts in this group about component testing and test fixtures, may I humbly suggest the "error" has more to do with marker frequency than software version.
73...Bob VK2ZRE


On 25/10/2022 8:06 pm, Tom Thompson wrote:
Here are the results of the two different firmware with a 10 ohm resistor attached to the S11 port.
Tom?? W0IVJ

On 10/24/2022 9:42 PM, DiSlord wrote:
Smitch chart marker value must be correct in all versions.

I think you select different smith marker format (Re+Im for example)

Provide screenshot















Re: Menu Structure Map for V1.2.14? #firmware #menu

 

On 10/26/22 8:17 AM, Rudi wrote:
On Wed, Oct 26, 2022 at 05:12 PM, Jim Lux wrote:

Worked fine for me.. I copied the python into a file, did a git clone:
git clone
Hello Jim,
Thank you for the hint.
It works now.
73, Rudi DL5FA
yeah, quick and dirty often doesn't have extensive checking... on my environment, if I don't have ui.c, it gives me this:

documents jimlux$ python parsenanomenu.py
Traceback (most recent call last):
File "parsenanomenu.py", line 42, in <module>
with open( 'ui.c' ) as ui:
FileNotFoundError: [Errno 2] No such file or directory: 'ui.c'

But I can easily see it "failing silently".



I'll make a pitch here that I use Spyder as my IDE for python. It seems to work fairly well. Jupyter is also nice if you're doing multiple iterations of something.


Re: Menu Structure Map for V1.2.14? #firmware #menu

 

On Wed, Oct 26, 2022 at 05:12 PM, Jim Lux wrote:

Worked fine for me.. I copied the python into a file, did a git clone:
git clone
Hello Jim,
Thank you for the hint.
It works now.
73, Rudi DL5FA


Re: Menu Structure Map for V1.2.14? #firmware #menu

 

On 10/26/22 7:17 AM, Jim Lux wrote:
On 10/26/22 6:08 AM, Rudi wrote:
On Mon, Oct 24, 2022 at 07:06 PM, Ho-Ro wrote:

with open( 'ui.c' ) as ui:
Hello Ho-Ro,

Thank you for providing the useful python3 program.

I have tried it, and it stops at the line:
with open( 'ui.c' ) as ui:

Could you please deliver the missing python code to make it work?

what error message are you getting?
Is the file ui.c in the directory you're running the python in?
That's just a vanilla python file open call.
Worked fine for me.. I copied the python into a file, did a git clone:
git clone

copied ui.c into the directory with the python, and ran it. It works just fine.


(base)Documents jimlux$ python parsenanomenu.py
TOPMENU
display "DISPLAY" 0
trace "TRACE" 0
trace "TRACE %d" 0
trace "TRACE %d" 1
trace "TRACE %d" 2
trace "TRACE %d" 3
stored_trace_ "%s TRACE" 0
stored_trace_ "%s TRACE A" 0

etc


Re: Menu Structure Map for V1.2.14? #firmware #menu

 

No
On Wed, 26 Oct 2022 at 23:08, Rudi<reuterr@...> wrote: On Mon, Oct 24, 2022 at 07:06 PM, Ho-Ro wrote:

with open( 'ui.c' ) as ui:
Hello Ho-Ro,

Thank you for providing the useful python3 program.

I have tried it, and it stops at the line:
with open( 'ui.c' ) as ui:

Could you please deliver the missing python code to make it work?

73, Rudi DL5FA


Re: Menu Structure Map for V1.2.14? #firmware #menu

 

On 10/26/22 6:08 AM, Rudi wrote:
On Mon, Oct 24, 2022 at 07:06 PM, Ho-Ro wrote:

with open( 'ui.c' ) as ui:
Hello Ho-Ro,
Thank you for providing the useful python3 program.
I have tried it, and it stops at the line:
with open( 'ui.c' ) as ui:
Could you please deliver the missing python code to make it work?
what error message are you getting?

Is the file ui.c in the directory you're running the python in?
That's just a vanilla python file open call.


Re: Firmware Differences

 

Hi Bob,

The issue was the values appearing on? S11(Smith chart) which DiSlord cleared up nicely.? By? the way, if you have the S11 port terminated in a pure resistance with no transmission line, the frequency makes no difference.? Even though the resistance is other than 50 ohms, the reading will be the same independent of frequency.

Tom?? W0IVJ

On 10/26/2022 7:00 AM, Bob Ecclestone VK2ZRE wrote:
Hi All,
I may have missed something here, but these screenshots are not comparing apples to apples.
In the first screenshot the marker is at 1MHz and in the second it is at 30MHz.
Given all the posts in this group about component testing and test fixtures, may I humbly suggest the "error" has more to do with marker frequency than software version.
73...Bob VK2ZRE


On 25/10/2022 8:06 pm, Tom Thompson wrote:
Here are the results of the two different firmware with a 10 ohm resistor attached to the S11 port.
Tom?? W0IVJ

On 10/24/2022 9:42 PM, DiSlord wrote:
Smitch chart marker value must be correct in all versions.

I think you select different smith marker format (Re+Im for example)

Provide screenshot











Re: nanoVNA android app issue

 

Hi Tim. I use a standard USB C to USB C cable. I found out it would work with a USB a to USB C adapter I bought on Amazon....



73 Jeff kb2m

On 10/25/2022 2:34 PM, Tim Reimers KA4LFP wrote:
Hey Jeffery ---

I have a SamSung S10 (soon to be S22)..

Did this question mean that you were able to use a normal (non-OTG) male USB-C to male USB-C cable?

I've had a hard time on Amazon locating a male USB-C to male USB-C OTG cable.
Seems like most all of the OTG cables assume Micro-USB to USB-C -- for old Micro phones to new USB-C based phones.

Did you get a male USB-C to male USB-C OTG cable, or a non-OTG male to male cable?

Happen to have an Amazon URL for what you got, or an ebay auction# ?

73, Tim KA4LFP



Re: nanoVNA android app issue

 

Thanks Colin, Clyde!

Good to know I don't need OTG since that's only relative to USB-Micro.

I did get an OTG cable, but may be able to use it for other things.

One thought I'd had was to use one of my several other Android phones lying around to keep in the case with the antenna analysis
tools. I have a few old phones that don't have cell service anymore having been replaced by newer ones.
I could keep one of those in the case. Trick would be having it charged, since most of them go dead just sitting there.
But maybe the NanoVNA could power the phone up to 1-2%, enough to boot and run the NanoVNA app.

Of course, I'll also have my regular phone with me, so maybe that's overkill

73, Tim KA4LFP


Re: Menu Structure Map for V1.2.14? #firmware #menu

 

On Mon, Oct 24, 2022 at 07:06 PM, Ho-Ro wrote:

with open( 'ui.c' ) as ui:
Hello Ho-Ro,

Thank you for providing the useful python3 program.

I have tried it, and it stops at the line:
with open( 'ui.c' ) as ui:

Could you please deliver the missing python code to make it work?

73, Rudi DL5FA