开云体育

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

Identifying which serial port the tinySA is attached to


 

The tinySA uses the same VID/PID as the NanoVNA so if you are writing a script or program to communicate with the tinySA, and both a NanoVNA and tinySA are connected to your computer at the same time, you need to perform extra steps to automatically identify which port the tinySA is connected to.

1. The most reliable way is to query a connected port using the 'info' console command.

? ? >info

?

tinySA v0.3

2019-2020 Copyright @Erik Kaashoek

2016-2020 Copyright @edy555

SW licensed under GPL. See: https://github.com/erikkaashoek/tinySA

Version: tinySA_v1.0-49-ga63df47

Build Time: Aug 4 2020 - 17:52:05

Kernel: 4.0.0

Compiler: GCC 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]

Architecture: ARMv6-M Core Variant: Cortex-M0

Port Info: Preemption through NMI

Platform: STM32F072xB Entry Level Medium Density devices


If? 'tinySA' is contained in the response you have found the serial port the tinySA is connected to.

2. If you happen to have two tinySA's connected to the same computer, perhaps for automated frequency response measurements, then I've found the best way to? uniquely identify each tinySA is by using the 'deviceid' command.? Each tinySA is serialized at the factory with an 8-digit serial number.? The serial number is not written in the tinySA firmware, but Erik has included a 'deviceid ' console command that allows the user to set and query a deviceid.? If no deviceid has been set, or after a 'clearconfig 1234' console command, then querying the deviceid returns the following:

?> deviceid
? returns 0000

I always set my deviceid to my factory serial number (20070007):

?> deviceid 2007007
?> saveconfig 1234
?> deviceid
? returns 20007007

Always perform a 'saveconfig 1234' after setting a deviceid so that the id will be retained in flash memory.? Now your program or script can uniquely identify which tinySA is connected to a port by querying its deviceid number.? This works well, but only if the user has assigned a unique deviceid to each tinySA.

- Herb


 

Very good.

Could the firmware not have used the unique CPU serial number to create the device ID ?


 

Yes, to be done