I see exception on this version and newer.
tinySA4_v1.3-438-gd7f97cd
HW Version:167
2025-01-09 14:26:29: 843: (-50.75, 30159987.0)?
An error occurred: could not convert string to float: '1 17 30974320 -50.75'
reseted
?
?
I did some testing over the past day and suspect that in the tight loop that you are running, without doing anything with the amplitude or frequency data, the console 'frequency' and 'data' commands eventually cannot keep up with the data flow and are causing the USB port to lock-up until the tinySA is rebooted.
?
I am not receiving any errors other than, " The operation has timed out", after a variable number of iterations occurring in either the "frequencies", "data 1" or "data 2" console commands.?
?
When only querying the "marker 1" console command in a tight loop I did not receive any time out errors over the course of 6hrs and over 22,000 iterations:
?
Read Marker Value Only
2025-01-09 06:01:10: 1: (-38.8, 105072304)
2025-01-09 06:01:11: 2: (-38.8, 105039346)
2025-01-09 06:01:11: 3: (-38.8, 105038222)
2025-01-09 06:01:12: 4: (-39.3, 105043709)
2025-01-09 06:01:13: 5: (-39.8, 105063102)
2025-01-09 06:01:13: 6: (-39.8, 105038222)
2025-01-09 06:01:14: 7: (-39.8, 105038222)
2025-01-09 06:01:15: 8: (-40.3, 105038222)
..........
2025-01-09 09:58:55: 22107: (-40.3, 105031589)
2025-01-09 09:58:56: 22108: (-40.3, 105059756)
2025-01-09 09:58:57: 22109: (-40.3, 105053965)
2025-01-09 09:58:57: 22110: (-40.3, 105031589)
2025-01-09 09:58:58: 22111: (-40.8, 105031589)
2025-01-09 09:58:59: 22112: (-40.3, 105040357)
2025-01-09 09:58:59: 22113: (-40.3, 105052993)
?
If instead of constantly querying "frequencies", I queried "sweep" and used the returned start, stop and points values to create a frequency array using a "LinSpace" like function, then I did not receive any time out errors over the course of 2hrs and over 5,500 iterations:
?
Read Marker and LinSpace Frequency array Values?
2025-01-09 12:07:55: 1: (-42.8, 105102399)
2025-01-09 12:07:56: 2: (-42.8, 105109582)
2025-01-09 12:07:58: 3: (-42.8, 105073001)
2025-01-09 12:07:59: 4: (-42.8, 105095900)
2025-01-09 12:08:00: 5: (-42.8, 105064811)
2025-01-09 12:08:01: 6: (-42.8, 105076975)
2025-01-09 12:08:03: 7: (-42.8, 105059756)
2025-01-09 12:08:04: 8: (-42.3, 105080071)
2025-01-09 12:08:05: 9: (-42.3, 105053965)
..........
2025-01-09 14:06:10: 5497: (-39.8, 105056503)
2025-01-09 14:06:12: 5498: (-39.8, 105055678)
2025-01-09 14:06:13: 5499: (-39.8, 105082261)
2025-01-09 14:06:14: 5500: (-39.8, 105080641)
2025-01-09 14:06:16: 5501: (-40.3, 105053075)
2025-01-09 14:06:17: 5502: (-39.8, 105104557)
2025-01-09 14:06:18: 5503: (-39.8, 105104557)
?
The "data 1" console command is a holdover from its NanoVNA origins and not of particular use.? The "data 2" console command returns the current trace data but in a tight loop the scanraw command is preferred.? QtTinySA uses the scanraw command to provide a fast and responsive graphical display of trace data.
?
If instead of constantly querying "data 1", I rather queried "scanraw", then I did not receive any time out errors over the course of 4hrs and over 5,600 iterations:
?
Read Marker, LinSpace Frequency array, and Scanraw Values?
2025-01-09 15:02:08: 1: (-38.3, 105035153)
2025-01-09 15:02:11: 2: (-37.3, 105023508)
2025-01-09 15:02:13: 3: (-37.8, 105023508)
2025-01-09 15:02:16: 4: (-38.3, 105013851)
2025-01-09 15:02:18: 5: (-40.2, 105084851)
2025-01-09 15:02:21: 6: (-40.2, 105067951)
2025-01-09 15:02:23: 7: (-40.2, 105067951)
2025-01-09 15:02:26: 8: (-40.3, 105019701)
..........
2025-01-09 19:02:30: 5657: (-38.3, 105005274)
2025-01-09 19:02:32: 5658: (-38.8, 105010397)
2025-01-09 19:02:35: 5659: (-38.3, 105010397)
2025-01-09 19:02:37: 5660: (-38.8, 105011863)
2025-01-09 19:02:40: 5661: (-38.3, 105011863)
2025-01-09 19:02:42: 5662: (-38.3, 105011863)
2025-01-09 19:02:45: 5663: (-38.3, 104978805)
?
Erik has indicated there may be some improvements he can make in the firmware, but I suspect that the way you are using the "frequencies" and "data" console commands in a tight loop that you will still experience some flow control related USB lockup issues when operating over an extended length of time.
?
For the best performance I suggest:
?
1. Create your frequency array in code using "sweep" and LinSpace.
2. Use "scanraw" instead of "data" console command.
3. Verify that your computer does not remove power to your USB ports to save energy.
?
I only program for my own pleasure so hopefully Erik or someone else more knowledgeable than me will correct any errors in my post.
?
Herb