开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

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!

Join [email protected] to automatically receive all group messages.