Closed Endaris closed 1 year ago
I can confirm this bug and replacing sleep(WRITE_SLEEP) with sleep(2) fixes it for me too, having a genuine NanoVNA v2 Plus4 with firmware v1.0.2 20211227.
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!
Bug Report
NanoVNA-Saver version: https://github.com/NanoVNA-Saver/nanovna-saver/commit/d654ea0441939e4e1c599d1333b587a185394fbe I followed the instructions here to run the project: https://github.com/NanoVNA-Saver/nanovna-saver/blob/main/docs/INSTALLATION.md Current behavior: After starting up, the application notices the device and shows it under Serial Port Control. After I click connect, the application closes with the following crash:
Expected behavior:
NanoVNA_V2.py does not run into a timeout upon trying to read the version. I started debugging this and as I slowly stepped through, it worked. I have now added a sleep to
_read_version
so the timeout no longer occurs.Steps to reproduce:
Might be difficult without my specific NanoVNA.
Related code:
I added a
sleep(2)
at the start ofdef _read_version(self, cmd_0: int, cmd_1: int):
inside of NanoVNA_V2.py and the timeout no longer occurs. It sometimes works with justsleep(1)
as well but not as reliably.Other information:
I had NanoVNASaver originally installed for the first time in November with v0.5.3 I think. I vaguely remember having to install some packages extra before it ran but I didn't have the same issue back then.
After the NanoVNA changed to USB mode, I can restart the application without the sleep and disconnect and connect it as often as I want. I would assume that my device is just a bit slow with entering USB mode and transmitting the information NanoVNA-Saver needs on initial connection.