Author Topic: Compiling NanoVNA Firmware  (Read 1580 times)

0 Members and 1 Guest are viewing this topic.

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Compiling NanoVNA Firmware
« on: December 27, 2023, 09:45:15 am »
Has anyone tried it lately?
I spend a couple of hours setting up a Ubuntu USB, and following instructions in Github, and a guide that other sites refer to here:
https://zs1sci.com/blog/nanovna%20build%20source/
many of the command lines simply don't work (such as the command to install DFU-util).

I don't know Linux well at all, so others might know why these commands no longer work, but it's clear to me that authors aren't respecting GPL.
Just try to get a copy of source dated as late as 2022, as quoted on the version page of my eBayed unit.

If compile worked, I'd be reluctant to write it to my unit in case hardware had changed from 2018 enough to break it.

I recall none of this issue when I had a Mini600 analyser.... pictured here running a plasma demo that I use to benchmark anything I can write for... I have almost decided to ditch this and get mini1300 which now has a very nice Aluminium case, and has always had capacitive touch screen.
« Last Edit: December 27, 2023, 10:11:19 am by @rt »
 

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 691
  • Country: au
Re: Compiling NanoVNA Firmware
« Reply #1 on: December 27, 2023, 10:29:16 am »
I don't have a nanovna (I should really get one by now!), but I tried all the commands up to 'make' and everything seems to compile fine.  A few compilation warnings but no errors.
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #2 on: December 27, 2023, 10:55:01 am »
Interesting. I created the ubuntu USB only today from the latest version, and even the first command to install git doesn't work.

"E: Package 'git' has no installation candidate."

I Google searched how to install git on ubuntu, and got past that, but that was only the first command that didn't work.
I created a Github account, but when asked for password in terminal to download from it, it says passwords are not supported!
This is all issues that might be resolved if I knew Linux better as i said, but that only half of what my post was about.

An open source project is only pretending to be open source if software is unavailable, and hardware containing software is sold without links to the software that is newer than five years old.....
So even if someone held my hand through the Linux stuff (which i don't expect), it occurrs to me the NanoVNA project remains a bit of a farce.



 

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 691
  • Country: au
Re: Compiling NanoVNA Firmware
« Reply #3 on: December 27, 2023, 11:11:11 am »
An open source project is only pretending to be open source if software is unavailable, and hardware containing software is sold without links to the software that is newer than five years old.....
So even if someone held my hand through the Linux stuff (which i don't expect), it occurrs to me the NanoVNA project remains a bit of a farce.
Well the nanovna software is not locked behind a password.... the software source code is freely available here:

https://github.com/ttrftech/NanoVNA
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #4 on: December 27, 2023, 11:16:53 am »
I'm not trying to be obtuse, or prefer problems... I can only tell you what the terminal window said.
I believe it was Github asking for user name and password, which is why I created an account.
Then on take 2, I typed the username, and a password couldn't even be entered.
I got a message then saying unable to authenticate user, and that passwords haven't been supported since 20something.

I wonder if anything would be different if Ubuntu was installed on HDD rather than a USB stick, but I'm unconvinced.
 

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 691
  • Country: au
Re: Compiling NanoVNA Firmware
« Reply #5 on: December 27, 2023, 11:34:52 am »
And to confuse you even further,  I'm using Linux Mint which is not Ubuntu, but based on Ubuntu.

Incidentally, I do not have a github account and was never asked for a username or password when I executed the 'git' command to download the nanovna source code.

I'm only guessing, but are you using your USB Ubuntu in single superuser mode?  That's normally how 'live' USB distributions work, but could be the problem.
 

Online nali

  • Frequent Contributor
  • **
  • Posts: 657
  • Country: gb
Re: Compiling NanoVNA Firmware
« Reply #6 on: December 27, 2023, 11:43:55 am »
Out of interest and as it's a wet & windy day here I tried it on a Debian 12 VM and it compiled fine, just cut & pasting the commands but without bothering with the SSH key.

Not tried flashing the target yet, I have a LiteVNA64 on order expected to arrive in a week or so, when that arrives I'll play around with the Nano.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6213
  • Country: ro
Re: Compiling NanoVNA Firmware
« Reply #7 on: December 27, 2023, 11:49:45 am »
"E: Package 'git' has no installation candidate."

You don't have to login anywhere.  To install git you open a terminal (press CTRL+ALT+T), you have to have Internet, and type this command:

sudo apt install git

You will be asked to type your password, to prove you have the rights to install.  It is normal to see that after "sudo", because "sudo" means you want that line to be executed with root rights (similar with "As administrator" from windows).  Your typed password stays in your computer, won't be shown on the internet.

And that's it, now you have git installed.  You may close the terminal window after it finish installing, if you want.  No reboot and no logoff is needed after installing git, it is effective immediately.  Don't try to use graphic installers.  Use the command line as shown above.
« Last Edit: December 27, 2023, 11:58:10 am by RoGeorge »
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #8 on: December 27, 2023, 12:04:55 pm »
I wasn't asked for username and password for the first command installing git.
I posted what it said then in my second post, but then I looked for some instructions and got past that.

it was to do with Github when it came to downloading source. Something earlier also did not work.
(dfu-util).

It appears help has arrived if I asked or not, so to be fair, I'll try again post a screenshot the first time I get stuck.
I noticed already it forgets my wifi password every time I boot, which is worse than Tails!




« Last Edit: December 27, 2023, 12:12:24 pm by @rt »
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6213
  • Country: ro
Re: Compiling NanoVNA Firmware
« Reply #9 on: December 27, 2023, 12:15:53 pm »
Check you have Internet in Ubuntu.  Open a Firefox browser and go to any webpage you like, to check you have Internet in Ubuntu.  Then open a terminal in Ubuntu, and type

sudo apt update

Is that successful?  If yes, continue with

sudo apt install git

Paste here if any error appears in the terminal after trying the above 2 commands.
« Last Edit: December 27, 2023, 12:19:12 pm by RoGeorge »
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #10 on: December 27, 2023, 12:17:27 pm »
I use a laptop with SATA HDDs in caddys, and have a Windows XP drive for old radio software.
Before I come back here, I'll try installing a Ubuntu dual boot on it, which worked a few years ago.
I want a working Libreoffice anyway.

 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #11 on: December 27, 2023, 12:19:29 pm »
Check you have Internet in Ubuntu.  Open a Firefox browser and go to any webpage you like, to check you have Internet in Ubuntu.  Then open a terminal in Ubuntu, and type

sudo apt update

Is that successful?  If yes, continue with

sudo apt install git

Paste here if any error appears in the terminal while trying the above 2 commands.

I think that's how I got it to work the first time after Googling how to install git which I mentioned earlier... but the USB installation might be forgetting that on next boot.
Internet is certainly connected, but I have to enter our wifi key each boot.
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #12 on: December 27, 2023, 01:20:49 pm »
Things went very differently when Ubuntu is installed to HDD.
I followed directions on the GitHub readme itself.

I’ve yet to figure out how to find source files and edit them,
and try writing to the device itself,
but it’s nearly midnight here, so enough for today.

Thanks for the replies!
 

Offline szoftveres

  • Regular Contributor
  • *
  • Posts: 115
  • Country: us
Re: Compiling NanoVNA Firmware
« Reply #13 on: December 27, 2023, 06:49:44 pm »
I've downloaded (https://github.com/DiSlord/NanoVNA-D), built and updated the firmware on Debian (ancestor of Ubuntu) using the dfu-tool as described in the link in the OP, on my cheap $50 standard Nano-VNA roughly a year ago.
The VNA now has a lot more features and frequency range went up to 2.7GHz (albeit useless above 1.2GHz) and is working fine. Notably the firmware update didn't fix the sudden spikes at 300MHz intervals, which was the only reason I've gone into the trouble of doing all this.
 

Online wasedadoc

  • Super Contributor
  • ***
  • Posts: 1371
  • Country: gb
Re: Compiling NanoVNA Firmware
« Reply #14 on: December 27, 2023, 06:57:06 pm »
Dislord's 1.2.20 is available ready to flash at https://github.com/DiSlord/NanoVNA-D/releases
« Last Edit: December 27, 2023, 07:07:07 pm by wasedadoc »
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #15 on: December 27, 2023, 08:42:54 pm »
Notably the firmware update didn't fix the sudden spikes at 300MHz intervals, which was the only reason I've gone into the trouble of doing all this.

Is this an issue with newer hardware? It's supposed to have internal shielding, and maybe it's for this reason,
as it sounds like possibly the harmonics of an internal oscillator.
... speaking of which, I hope this FW assumes the same oscillator, as it no longer states it has a 26MHz TCXO.

I've only used it to plot a couple of antennas, and plots were smooth. How do I check for this easily?
 

Offline Randy222

  • Frequent Contributor
  • **
  • Posts: 643
  • Country: ca
Re: Compiling NanoVNA Firmware
« Reply #16 on: December 27, 2023, 09:45:35 pm »
I tried to compile just for fun. Needed to massage my OS, but it failed on Rocky 8.9

dnf install git
git clone https://github.com/ttrftech/NanoVNA.git
cd NanoVNA
git submodule update --init --recursive  #installs Chibios stuff
dnf install make
#download the gcc arm-none-eabi from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads/11-2-2022-02 (x86_64 linux hosted cross toolchains)
tar -xJf gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz -C /NanoVNA/gcc-arm/
PATH=/NanoVNA/gcc-arm/gcc-arm-none-eabi/bin:$PATH
make

A bunch of compiling through Chibios and then err.

Compiling chprintf.c
chprintf.c: In function 'ftoaS':
chprintf.c:188:3: internal compiler error: Illegal instruction
  188 |   if (num > 1000.0){
      |   ^~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.linaro.org/> for instructions.
make: *** [ChibiOS/os/common/startup/ARMCMx/compilers/GCC/rules.mk:216: build/obj/chprintf.o] Error 1
 

Online wasedadoc

  • Super Contributor
  • ***
  • Posts: 1371
  • Country: gb
Re: Compiling NanoVNA Firmware
« Reply #17 on: December 27, 2023, 11:06:21 pm »
1.  IIRC all measurement points above 300 MHz use harmonics of the oscillator.

2.  Which firmware does not say "26MHz" TCXO?
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #18 on: December 27, 2023, 11:42:16 pm »
The one pertinent to the instructions at the top of this thread… and in my image in last post. I only changed a couple of lines of the version text.
The device did display the clock until now.
« Last Edit: December 28, 2023, 02:47:03 am by @rt »
 

Offline @rtTopic starter

  • Super Contributor
  • ***
  • Posts: 1059
Re: Compiling NanoVNA Firmware
« Reply #19 on: December 29, 2023, 11:07:19 am »
Well yes and no.
Referring to my original post where I mentioned I run a plasma demo to benchmark anything I can write for…
The only place it could be done is in the version screen where sweep is not running continuous.
Memory of both types are at a premium, and there’s no way this could be double buffered.
Plasma is very slow, and a raster is obvious.
The Mini600 (now called mini1300) is based on the STM Discovery board, and is MUCH faster.
It’s relative to cost I suppose.

I found Hugen’s source that belongs on this, but could not compile it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf