Author Topic: NanoVNA Custom Software  (Read 462369 times)

0 Members and 1 Guest are viewing this topic.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #75 on: August 13, 2019, 08:37:14 pm »
Joe

Just discovered your work here....very nice! Maybe this question has been asked and answered: Are you going to release it into  the wild so others can use it?

Keep up the great work!

Joe
W3JDR

Yes, it's been answered.  Maybe read the last 10 posts or watch the last video.   

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #76 on: August 14, 2019, 12:24:05 pm »
Anyone know if/where the NanoVNA communications interface protocol is documented?

Joe
W3JDR
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #77 on: August 14, 2019, 04:14:12 pm »
Anyone know if/where the NanoVNA communications interface protocol is documented?

Joe
W3JDR

Maybe read the first 5 posts. 

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #78 on: August 14, 2019, 04:40:10 pm »
Thanks for the reply.

Yes, I've seen all of those but none offer a direct or conclusive solution. I'm looking for something that describes the message structure in both directions so I can try to roll my own application, probably in VB.

Joe
W3JDR
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #79 on: August 14, 2019, 05:17:50 pm »
Then you know that I have asked and was unable to locate such a document.   Assuming you took the time to watch that first video where I described what I saw with the BAUD rate and protocol, and you looked at the document containing the list of commands, you should be all set.   Is there something specific you are not understanding?   

If you havn't tried communicating with it, I suggest you just open a dumb terminal and send it the "info" command and see if that works.  Once you have that working, replicate it in what ever language and build from there.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #80 on: August 14, 2019, 06:52:19 pm »
Something is really wrong in the attached picture....

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #81 on: August 14, 2019, 07:21:44 pm »
This list of commands can be sent from a serial terminal program set for 9600 baud and the results will be displayed. Courtesy of the Google Groups site:

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...")
         "done”
         "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
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #82 on: August 14, 2019, 07:29:41 pm »
"This list of commands can be sent from a serial terminal program set for 9600 baud and the results will be displayed. "
 :-DD

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #83 on: August 14, 2019, 07:58:55 pm »
Why do you find this amusing?
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #84 on: August 14, 2019, 08:20:01 pm »
Why do you find this amusing?

Then you know that I have asked and was unable to locate such a document.  Assuming you took the time to watch that first video where I described what I saw with the BAUD rate and protocol, and you looked at the document containing the list of commands, you should be all set.   

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #85 on: August 14, 2019, 08:44:47 pm »
Huh??.

I asked you directly if you had a protocol document. The answer I got seemed snippy, snooty and indirect, but I dismissed it and found what I was looking for elsewhere. I thought others might find it useful, so I posted it here. Mea culpa for my ignorance. I won't trouble you any further.

 
The following users thanked this post: bck

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #86 on: August 14, 2019, 09:17:15 pm »
Huh??.

I asked you directly if you had a protocol document. The answer I got seemed snippy, snooty and indirect, but I dismissed it and found what I was looking for elsewhere. I thought others might find it useful, so I posted it here. Mea culpa for my ignorance. I won't trouble you any further.

I thought my response was direct.  To make it more clear,  I have no such document.   Again, I had asked and wasn't able to find such a document.  The only document I found was the list of commands, which you have included.   

The BAUD rate in the document you posted needs more explication.   I explained I had created a video which covered what I had found in case others wanted to create their own software.  In case of the BAUD rate, for this application it serves no purpose.  If it did, 9600 would not come close to matching the performance required.     
 
Based on your frustration, I assume these answers were not what you were looking for.  Sorry, I can't help with that. 

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #87 on: August 14, 2019, 10:01:06 pm »
I found that adjusting the baud rate in the terminal program had no affect. Being a CDC USB connection, it goes as fast as it can.  Anyway, I hope the list allows others here to jump-start their efforts. I tested every one of the commands and they work as descibed, so no reverse engineering required. So everyone, the race is on! Get those apps going.

BTW, some nice additional features in a new app would be a signal generator mode and a power meter mode.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #88 on: August 14, 2019, 10:39:08 pm »
I found that adjusting the baud rate in the terminal program had no affect. Being a CDC USB connection, it goes as fast as it can. 

Pretty much verbatim of what I had stated in the video.  Good to see you are on your way.

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #89 on: August 15, 2019, 12:05:52 am »
Other wish-list features would be capacitor/inductor measurement at a user--specified spot frequency with digital readout including ESR/EPR resistance values
I found that adjusting the baud rate in the terminal program had no affect. Being a CDC USB connection, it goes as fast as it can.  Anyway, I hope the list allows others here to jump-start their efforts. I tested every one of the commands and they work as descibed, so no reverse engineering required. So everyone, the race is on! Get those apps going.

BTW, some nice additional features in a new app would be a signal generator mode and a power meter mode.
.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #90 on: August 15, 2019, 01:12:08 am »
Looks like this person tried connecting a transfer relay.    This is pretty much where I am heading with the 2-port Touchstone.  The problem I see with their setup is they do not perform a full calibration which could be part of the errors they show.    It seems like they could use the basic cal, then flip the cables, or run two cals and select between the two when switching the transfer relay. 

In my previous picture, you can see the Nano is running without a calibration.  I have a short attached and my software is showing a short.  At this stage, I had pushed the SOL down into my software.  I just finished up with the full SOLT that will handle all four S-parameters.   The software could tell the Nano to switch between cals as it can store more than one, but putting it in the software means that there is no delay when switching. 



Looking at Pasternack, you get some idea on the cost.   I have an old relay similar to what this person shows in their video, but it would be nice to use something lower cost and readily available.   It may be cheaper to buy DPDT RF relay common to scopes and such and layout a board for it. 

https://www.pasternack.com/medium-power-transfer-electromechanical-relay-switches-category.aspx

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #91 on: August 15, 2019, 12:03:32 pm »
Joe

Can you explain the return data pairs in the data array? Eg, if you send "data 1" you get a 2-wide array that corresponds row-by-row with the "frequencies" array. What does each value in a pair represent? It seems that the first value is the raw magnitude of S21 before the 20log scaling is applied. I thought the second value might be the phase of S21, but I'm having a difficult time understanding the scaling.
 

Offline edigi

  • Regular Contributor
  • *
  • Posts: 184
  • Country: hu
Re: NanoVNA Custom Software
« Reply #92 on: August 15, 2019, 12:23:53 pm »
It's good that I found this thread.
Hopefully the developers will fix their SW. After all that's their product/job.

joeqsmith
Running Windows SW using Linux is OK for most of the time, the key is Wine. There can be still issues with Linux like printing and proprietary drivers (e.g. related to HW like WiFi) but that's typically not a show stopper for an app.

It's a pity that you've decided not to release your SW, as in my view the difficulty is not developing communication towards the equipment or GUI but knowing the use cases and making sensible user interface for that. That's a lot more than to be able to interpret Smith chart and only few people can do that, typically not those who are good at SW development.
I also acknowledge that it's a real risk that someone does the real work and other people make profit out of it so your decision is understandable. Probably even GPL helps little in this.
 

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #93 on: August 15, 2019, 01:03:44 pm »
edigi

I agree with JoeQ that releasing his source might be of little value to us except to illustrate how it could be done, though that in itself might have value to others. One of the problems I see is that he developed in a proprietary rapid development environment (I think LabView) that is closed and expensive. To develop with a team requires a license that costs thousands for each developer, so getting his code would have only academic use for most of us. Nonetheless, I don't see this as a difficult project if you have the right toolkit. I've done several similar applications and I think something functional could be knocked out in days if you work in a more general and open rapid development environment. I'm thinking vb.net. There are only 2 things preventing me from diving into this: 1) I'd like not to have to re-invent the Smith Chart GUI and, 2) I already have too many other unfinished projects and little spare time.

JoeR
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #94 on: August 15, 2019, 04:20:26 pm »
Joe

Can you explain the return data pairs in the data array? Eg, if you send "data 1" you get a 2-wide array that corresponds row-by-row with the "frequencies" array. What does each value in a pair represent? It seems that the first value is the raw magnitude of S21 before the 20log scaling is applied. I thought the second value might be the phase of S21, but I'm having a difficult time understanding the scaling.

Yes, I obviously could explain the data format.   There's an old saying, "You can lead a horse to water but you can not make it drink" or as I like to say, "You can lead a whore to culture but you can not make her think".   Today you can walk someone to the edge of the water, and they not only refuse to drink but take offense to it.  The few that drink  jump up and down yelling,  "look at me, I discovered the ocean!"  :-DD   

I will say that I've had to blow out a few cobwebs while working the equations for the Nano but it's been a lot of fun.   

With that link I provided to the home edition of LabView including the application builder being offered for $50, I am seeing even less of a reason to ever use another language to develop Windows apps.   

Good luck with your project.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #95 on: August 15, 2019, 04:30:15 pm »
It's good that I found this thread.
Hopefully the developers will fix their SW. After all that's their product/job.

joeqsmith
Running Windows SW using Linux is OK for most of the time, the key is Wine. There can be still issues with Linux like printing and proprietary drivers (e.g. related to HW like WiFi) but that's typically not a show stopper for an app.

It's a pity that you've decided not to release your SW, as in my view the difficulty is not developing communication towards the equipment or GUI but knowing the use cases and making sensible user interface for that. That's a lot more than to be able to interpret Smith chart and only few people can do that, typically not those who are good at SW development.
I also acknowledge that it's a real risk that someone does the real work and other people make profit out of it so your decision is understandable. Probably even GPL helps little in this.

At this time, I am not too concerned with the financial aspect of it.  For me, it's just a hobby.   It does appear though that the person driving the sales and development is not the original designer.   They have a store setup and I assume are profiting from the creators work. 

I too would really like to see the developers continue to improve the software they supply.  They are certainly free to copy any of the ideas I have thrown out to the public and profit from them.  I would actually be happy if the did as their users would benefit.     

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #96 on: August 15, 2019, 04:54:36 pm »
It appears Mini-Circuits offers a few transfer relays.  The cost is still about 6X higher than the Nano.

https://www.minicircuits.com/WebStore/Switches.html

It appears that the unit I have matches the schematic in the manual from Hugen79.    P2 allows access to VDD, ground and the JTAG signals.  I havn't looked into yet but it seems like the JTAG could be used for general purpose I/O once the part is configured.  Adding the ability to use these pins for a simple SPI port or even just two simple on/off controls, under software control may make adding peripherals to Nano more integrated.

I would like to make a small PCB with a transfer relay and a couple of bias T's on it along with a place holder for a fixed attenuator.  Babbling and havn't thought it through.   First step is to sort out if the firmware for the Nano is available an see if using these pins is even an option without having to involve the current designers.

Part of yesterday's efforts, showing the 10dB attenuator using my software's SOLT routines and shutting off the Nano's calibration.   


 

Offline hagster

  • Frequent Contributor
  • **
  • Posts: 394
Re: NanoVNA Custom Software
« Reply #97 on: August 15, 2019, 05:35:31 pm »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: us
Re: NanoVNA Custom Software
« Reply #98 on: August 15, 2019, 07:00:20 pm »
If your making your own board there are plenty of RF relays available.


E.g

https://www.mouser.co.uk/ProductDetail/Omron-Electronics/G6ZK-1FE-DC3?qs=sGAEpiMZZMt%2FATQILEa77R5xBUwBD43UVicKLmkegz0%3D

I would like to see some sort of breakout board about this size with the bias T's and attenuator build up area.   A small cable to connect it to the Nano.   It would be nice to machine up a metal case that would hold the whole assembly including the nano.  Bolt the SMA bulkheads right to the metal case.   Maybe some of MACOMs GaAs switches.   

Then again..... it's a $50 unit.   

Offline joedarock

  • Contributor
  • Posts: 13
  • Country: us
Re: NanoVNA Custom Software
« Reply #99 on: August 15, 2019, 07:11:40 pm »
Does this mean that you will or that you won't help me by explaining the data array values?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf