==
ZS406, oct 21 firmware
==
?
This firmware's trigger menu has some more options than explained in the wiki: beep, interval and autosave.
?
-Beep seems to not beep, or do you have to use headphones? Or is this for 407 hardware?
-interval blocks the UI, jogwheel as well as screen. You have to press for at least T-interval and release to get the menu to appear, and another T-interval to get to the interval input screen.
-re-arming single does not clear the screen. Might be intentional though.
?
Could not find any mentioning of this in the changelog other than that thes options were implemented.
?
Anyone have thoghts on this?
?
Regards?
?
Henk
|
Re: Mesure IMD with Two Tone and TinySA Ultra
Use 30 dB extra attenuation between the -40 dB sniffer and the tinySA input
Set LEVEL/EXT GAIN to -70 dB
Use the MEASURE/OIP3 and enter the two test frequencies (in case of USB: 14245700 Hz and 14246900 Hz, do not use the decimal dot when entering frequencies)
and set the span to 25 kHz
?
?
--
Designer of the tinySA For more info go to
|
Re: Issues with TinySA USB Connection in C#
Let me provide more details about my setup.
I have a USBService class that manages communication with a device using a serial connection. Here’s how I create the USB connection:
SerialPortStream CreateSerialPort(string portName, int baudRate) { ? ? return new SerialPortStream(portName, baudRate) ? ? { ? ? ? ? Parity = Parity.None, ? ? ? ? StopBits = StopBits.One, ? ? ? ? DataBits = 8, ? ? ? ? WriteTimeout = 500, ? ? ? ? ReadTimeout = 10000, ? ? ? ? Handshake = Handshake.None ? ? }; }
To send and receive commands, I use the following method:
public async Task<string> SendCommandAsync(string command) { ? ? await _sendCommandSemaphore.WaitAsync(); ? ? try ? ? { ? ? ? ? using (var serialPortStream = CreateSerialPort(PortName, BaudRate)) ? ? ? ? { ? ? ? ? ? ? if (!serialPortStream.IsOpen) ? ? ? ? ? ? { ? ? ? ? ? ? ? ? serialPortStream.Open(); ? ? ? ? ? ? } ? ? ? ? ? ?? ? ? ? ? ? ? command += "\r"; ? ? ? ? ? ? byte[] commandBytes = Encoding.ASCII.GetBytes(command); ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ? ? ? ? ? ? serialPortStream.Write(commandBytes, 0, commandBytes.Length); ? ? ? ? ? ? string echoResponse = ReadUntil(serialPortStream, "\r"); ? ? ? ? ? ?? ? ? ? ? ? ? if (echoResponse.Trim() == command.Trim()) ? ? ? ? ? ? { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? string data = ReadUntil(serialPortStream, "ch>"); ? ? ? ? ? ? ? ? data = data.TrimEnd("\r\nch>".ToCharArray()); ? ? ? ? ? ? ? ? return data; ? ? ? ? ? ? } ? ? ? ? ? ? else ? ? ? ? ? ? { ? ? ? ? ? ? ? ? string errorStr = $"Unexpected echo response: {echoResponse}"; ? ? ? ? ? ? ? ? Logger.Log(errorStr); ? ? ? ? ? ? ? ? return errorStr; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? ? ? ? ? ? ? } ? ? } ? ? finally ? ? { ? ? ? ? _sendCommandSemaphore.Release(); ? ? } }
?
Here’s the ReadUntil method used for reading data:
private string ReadUntil(SerialPortStream serialPort, string terminator) { ? ? byte[] buffer = new byte[1]; ? ? ? ? ? ? ? ? ? ? StringBuilder responseBuilder = new StringBuilder(); ? ? while (true) ? ? { ? ? ? ? int bytesRead = serialPort.Read(buffer, 0, buffer.Length); ? ? ? ? if (bytesRead > 0) ? ? ? ? { ? ? ? ? ? ? char currentChar = (char)buffer[0]; ? ? ? ? ? ? responseBuilder.Append(currentChar); ? ? ? ? ? ? if (responseBuilder.ToString().EndsWith(terminator)) ? ? ? ? ? ? { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return responseBuilder.ToString(); ? ? ? ? ? ? } ? ? ? ? } ? ? ? ? else ? ? ? ? { ? ? ? ? ? ? throw new TimeoutException("Read operation timed out."); ? ? ? ? } ? ? } }
In my application, I run the following loop to receive data continuously:
private async void Loop() { ? ? while (_isRunning) ? ? { ? ? ? ? ? ? ? ? ? ? ? ? try ? ? ? ? { ? ? ? ? ? ? var frequenciesString = await UsbService.SendCommandAsync("frequencies"); ? ? ? ? ? ? var dataList1 = UsbService.SendCommandAsync("data 1"); ? ? ? ? ? ? var dataList2 = UsbService.SendCommandAsync("data 2"); ? ? ? ? ? ? var marker = await UsbService.SendCommandAsync("marker 1"); ? ? ? ? } ? ? ? ? catch (Exception ex) ? ? ? ? { ? ? ? ? ? ? Logger.Log($"Error: {ex.Message}"); ? ? ? ? } ? ? ? ?? ? ? ? ? await Task.Delay(500);? ? ? } }
The Issue: After running this loop for a few thousand iterations, the program stops receiving data and only returns timeout exceptions.
|
Re: Mesure IMD with Two Tone and TinySA Ultra
Firstly, 100 watts is 50 dBm, so the output power after your attenuator (50dBm - 40dB = 10dBm) will exceed the permitted 6 dBm for the TinySA. Although I would highly recommend not to exceed 0dBm at the input, for all signals including harmonics.
|
Mesure IMD with Two Tone and TinySA Ultra
Hi Group, I'm an Ham Radio operator and I need to mesure the IMD for the modulation in SSB. I just built a two tone generator so I can inject 700hz and 1900hz at the same time to mesure the IMD but, I'm at my first steps with RF electonics and the TinySA Ultra. Does anybody can take me by the hand and tell my what setting I need to do with the TinySa Ultra in order to mesure the IMD.? Let's say for the test that I will? transmit at 14.245Mhz USB 100Watts in a dummy load. I built a RF sampler 40db attenuator so I can feed the TinySa without blowing it.? thanks? ?73 from VE2IBN (Canada).
|
Re: How to test and measure THD with Ultra?
|
Re: Issues with TinySA USB Connection in C#
Two quick things you can try.? Firstly Handshake should be None.? Secondly try a Linux machine (real, not a VM).? Admittedly it has been many years since I used Windows but for serial comms it used to be flaky giving the same kind of issue you describe.
?
Assuming those two suggestion don't help then in getting to the bottom of it the first place to start is what is the minimum you have to do restore operation?? Can you resume comms just by restarting you program, disconnect the USB connection, or do you have to power cycle either the PC or TinySA?
?
Often the key to robust serial comms is in how you handle timeouts, but I have never had problems writing to a device, like your WriteAsync() call, so I do wonder if your serial driver is stalling from waiting on the non-existent hardware transmission handshaking you are requesting.
|
Re: Issues with TinySA USB Connection in C#
On Sat, Jan 4, 2025 at 05:28 AM, <voloshyn.v.v@...> wrote:
I'm writing a C# program to receive data from TinySA and analyze it.
I need to retrieve data from these three commands every second:
frequencies
data 1
data 2
The issue is that, from time to time, TinySA does not return data over USB. After this happens, it stops responding to any commands I send over USB.
Check the following:
1. The command is terminated with "\r" (i.e. "frequencies \r").
2. After a write command, the command is echo'd and you have to handle this properly before reading the data.
3. The data is terminated with a 'ch>' prompt which also has to be handled properly.
?
See Erik's tinySA python class for an example of proper read/write functions.
?
Herb
?
|
Re: New FW release: TinySA-App controll working again
you are not looking in the same directory that Hugen posted, you are in the tinysa2, the old one.
|
Re: Pre-sale, tinySA ULTRA plus
Hi Richard
Small world with the TinySA and the radio amateurs community! I have the previous one which is fine for what I do.
All the very best for 2025 and I hope you enjoy your Ultra +.
Alain
|
Issues with TinySA USB Connection in C#
Hi, I'm writing a C# program to receive data from TinySA and analyze it.
I need to retrieve data from these three commands every second:
frequencies
data 1
data 2
The issue is that, from time to time, TinySA does not return data over USB. After this happens, it stops responding to any commands I send over USB.
I suspect this might be because I need to set the correct parameters during the connection process with TinySA over USB. Unfortunately, I couldn’t find the required parameters in the documentation to properly connect to TinySA using USB.
Could you please let me know the correct way to establish a USB connection with TinySA?
I've tried several methods, and the following setup has been the most stable so far:
?
PortName = "COM3"; ? ? ? ? ? BaudRate = 115200;
new SerialPortStream(portName, baudRate) ? ? ? ? ? ? { ? ? ? ? ? ? ? ? Parity = Parity.None, ? ? ? ? ? ? ? ? StopBits = StopBits.One, ? ? ? ? ? ? ? ? DataBits = 8, ? ? ? ? ? ? ? ? WriteTimeout = 500, ? ? ? ? ? ? ? ? ReadTimeout = 5000, ? ? ? ? ? ? ? ? Handshake = Handshake.DtrRts ? ? ? ? ? ? };?
?
await serialPortStream.WriteAsync(commandBytes, 0, commandBytes.Length);
?
Thanks in advance!
|
Re: New FW release: TinySA-App controll working again
Hi Hugen...
?
Well, I feel a right twit now (embarrassed smile).? I had been going to the wrong directory, the /tinySA/DFU one, where I should have been going to the /tinySA4/DFU one (!).? My excuse is that I have been "burning the midnight oil" and found the directory by following the link in the "where_is_the _DFU_file.txt", instead of looking at the Firmware info in the wiki.
Anyway, it is all good.
I have updated the firmware to: Version: tinySA4_v1.4-192-g73fe677 Build Time: Dec 23 2024 - 13:25:46
... and now the display in the TinySA-App v1.1.20.1 appears to be working fine.
?
I should get some sleep, I think...
|
Re: New FW release: TinySA-App controll working again
|
Re: New FW release: TinySA-App controll working again
Hey @Hugen, Thanks for trying to help by giving that link, but it is actually HTTP (not HTTPS) and I already put the link in my post, but the latest DFU file is not there.? I even looked in the "beta" sub-directory, but that just has old stuff from 2021. 
|
Re: New FW release: TinySA-App controll working again
|
Re: New FW release: TinySA-App controll working again
Hi Erik I have a tinySA-ULTRRA ZS-406 Version: tinySA4_v1.4-187-gc385f30 Build Time: Nov 25 2024 - 12:14:35
I have been having problems using it with the TinySA-App v1.1.20.1 running under Windows 10 Pro Version 22H2 (OS Build 19045.5247).? Basically, I can use the "Capture tinySA screen image" button at the top and turn on the Auto Refresh and the screen mimics that of the tinySA-ULTRA.?? I can also click the right of the display to bring up the menu and go through and change stuff.
?
The problem is with the main screen graph.? When I try and use the Single Span button, it sends the scan to the app from the USB comms: 50.601 tx: sweep start 145000000 50.642 rx: ch> ch>? 50.655 tx: sweep stop 146000000 50.689 tx: scanraw 145000000 146000000 1000 .... I then see: 52.753 rx: {x[ffffffd0][07]x`[07]x[ffffffa0][07]x[.... etc. but this fails with: 07.760 rx link timeout .. disconnecting
I managed to get a trace showing on that screen once, out of all the times I have tried it, but not sure why it worked that time and never again?
Is this the "TinySA-App can not control tinySA" problem, or something else?
Your post talks of new firmware release: "Version V1.4189" (presumably "tinySA4_v1.4-189-gc....), but I don't know where do download that from??? When I look at the latest version there appears to be "tinySA_v1.4-175-g1419a93.dfu".
Sorry if I am missing something obvious?
Thanks, Richard.
|
There is currently no way to input an external trigger.
In theory it should be possible to implement such an external trigger using the internal serial RX input for triggering a scan and anyone is welcome to add that to the code.
--
Designer of the tinySA For more info go to
|
Re: Pre-sale, tinySA ULTRA plus
I have just received my tinySA ULTRA Plus ZS-406
?
Version: tinySA4_v1.4-187-gc385f30
Build Time: Nov 25 2024 - 12:14;35
?
|
Hello,
?
Is there any way to trigger the Tinysa from an external trigger separate from the signal source?
?
I don't see this capability in the wiki, but I'd thought I would check to be sure.
?
-N
|
Re: Tiny Ultra fail in signal generator mode
U22 replaced. It now passes all self tests and appears to be fully functional.
I too, screwed up the battery connector when disassembling the unit. I? soldered the battery wires to the circuit board..
|