|
edit SideBar
|
After connecting the tinySA to a PC using the a USB cable a serial interface will become available on the PC. Drivers for the serial interface over USB will be automatically installed on Windows and are already builtin in most Linux kernels
The serial interface supports a large set of commands. You can always use the help command to get a list of the available commands
The tinySA Ultra with firmware V1.4273 or newer has its own USB IDs: VID 0x1781 PID 0x0A44 (before it used 0x0483 0x5740, the ST virtual COM port, which the tinySA still uses). Programs that look for a tinySA by its USB IDs need to know both. Since V1.4252 the tinySA Ultra is a composite USB device, a serial port plus a disk for the USB DISK mode, and since V1.4284 every tinySA has its own USB serial number (on the tinySA Ultra the same as its DFU serial number), so Windows can tell several tinySAs apart. After each of these updates Windows assigns a new COM port once.
There is limited error checking against incorrect parameters of incorrect mode. While a keypad is open on the tinySA, commands that need the sweep (e.g. vbat, sweep) are answered with "keypad active".
- Frequencies can be specified using an integer optionally postfixed with a the letter 'k' for kilo 'M' for Mega or 'G' for Giga. E.g. 0.1M (100kHz), 500k (0.5MHz) or 12000000 (12MHz)
- Levels are specified in dB(m) and can be specified using a floating point notation. E.g. 10 or 2.5
- Time is specified in seconds optionally postfixed with the letters 'm' for mili or 'u' for micro. E.g. 1 (1 second), 2.5 (2.5 seconds), 120m (120 milliseconds)
Commands:
- attenuate
- sets the internal attenuation to automatic or a specific value
usage: attenuate [auto|0-31]
- abort
- enables the previous command abortion of aborts the previous command
usage: abort [off| on] When used without parameters the previous command still running will be aborted. Abort must be enabled before usage using the "abort on" command
- bulk
- send by tinySA when in auto refresh mode
format: "bulk\r\n{X}{Y}{Width}{Height}{Pixeldata}\r\n" where all numbers are binary coded 2 bytes little endian. The Pixeldata is encoded as 2 bytes per pixel
- calc
- sets or cancels one of the measurement modes
usage: calc [{trace#}] off|minh|maxh|maxd|aver4|aver16|aver|quasi (tinySA Ultra also log|lin) the options are those of TRACE > CALC
- caloutput
- disables or sets the caloutput to a specified frequency in MHz
usage: caloutput off|30|15|10|4|3|2|1
- capture
- requests a screen dump to be send in binary format of 320x240 (tinySA) or 480x320 (tinySA Ultra) pixels of each 2 bytes
usage: capture [rle] On the tinySA Ultra any argument, e.g. capture rle, sends the screen RLE8 compressed in the NanoVNA-D format: about 10 times less data.
- channel
- returns the channel powers of the CHANNEL POWER measurement in dBm
usage: channel [1-3] Without a channel number the power of all three channels is listed, channel 2 is the center channel. Start the measurement with measure channel_power. The powers are calculated at the end of every sweep: after the measure command wait for a complete sweep before reading them, e.g. with waitscan 1 (it leaves the sweep paused, resume continues).
- clearconfig
- resets the configuration data to factory defaults
usage: clearconfig 1234
- color
- sets or dumps the colors used
usage: color [{id} {rgb24}]
- correction
- sets or dumps the frequency level correction table
usage: correction {table_name} [(0..9|0..19) {frequency} {level}]
- dac
- sets or dumps the dac value
usage: dac [0..4095]
- data
- dumps the trace data
usage: data 0..2 0=temp value, 1=stored trace, 2=measurement
- deviceid
- sets of dumps a user settable number that can be use to identify a specific tinySA
usage: deviceid [{number}]
- fill
- send by tinySA when in auto refresh mode
format: "fill\r\n{X}{Y}{Width}{Height}{Color}\r\n" where all numbers are binary coded 2 bytes little endian.
- freq
- sets zero span at the frequency, the same as sweep cw
usage: freq {frequency} Before V1.4311 freq only paused the sweep.
- frequencies
- dumps the frequencies used by the last sweep
usage: frequencies
- fwupdate
- (tinySA Ultra) installs a firmware file from the SD card
usage: fwupdate [{file} [flash]] Without a file it shows the version, size and CRC32 of the running firmware. With a file it checks the file without changing anything, with flash it installs the file and restarts. Config, calibration and presets are kept. See UpdatingTheFirmware.
- if
- sets the IF to automatic or a specific value
usage: if ( 0 | 433M..435M ) where 0 means automatic
- info
- displays various SW and HW information
- help
- dumps a list of the available commands
usage: help
- hop (Ultra only)
- measures the input level at each of the requested frequencies
usage: hop {start(Hz)} {stop(Hz)} {step(Hz) | points} [outmask] usage: hop {frequency} [outmask] If the 3rd parameter is 450 or less it is the number of points, the first at start and the last at stop (before V1.4311 there was one point more), otherwise it is the step frequency Outmask selects if the frequency (1) or level (2) is output, the default is both (3). The level is in dBm.
- level
- sets the output level
usage: level -76..13 Not all values in the range are available
- levelchange
- sets the output level delta for low output mode level sweep
usage: levelchange -70..+70
- leveloffset
- sets or dumps the level calibration data
usage: leveloffset low|high|switch [output] {error} For the output corrections first ensure correct output levels at maximum output level. For the low output set the output to -50dBm and measure and correct the level with "leveloffset switch error" where For all output leveloffset commands measure the level with the leveloffset to zero and calculate error = measured level - specified level
- load
- loads a previously stored preset
usage: load 0..4 where 0 is the startup preset
- marker
- sets or dumps marker info
usage: marker {id} on|off|peak|{freq}|{index} where id=1..4 index=0..num_points-1 Merker levels will use the selected unit Marker peak will activate the marker (if not done already), position the marker on the strongest signal and display the marker info The frequency must be within the selected sweep range
- measure
- starts a measurement of the MEASURE menu (since V1.4311)
usage: measure off|harmonic|oip3|phase_noise|snr|3db_width|occupied_width|am|fm|thd|channel_power|linear [value]... On the tinySA Ultra also nf_tinysa|nf_store|nf_validate|nf_amp. The values are the ones the menu asks for with its keypads, in the same order: harmonic {fundamental} [span] (span only on the tinySA Ultra, no span or 0 is the full span) oip3 {left frequency} {right frequency} phase_noise {frequency} {offset} snr {frequency} {bandwidth} occupied_width {dBc} am {frequency} {modulation frequency} fm {frequency} {modulation frequency} {deviation} channel_power {frequency} {channel width} nf_tinysa {noise center frequency}, nf_amp {amplifier gain} The other modes have no values. As in the menu most modes first reset the settings (span, RBW, attenuation, ...), so change other settings after the measure command. A value out of range shows "Incorrect input" on the screen and turns the measurement off. Only in the spectrum analyzer mode. Example: measure channel_power 5800M 20M
- menu
- The menu command can be used to activate any menu item.
usage: menu {#} [{#} [{#} [{#}]]] where # is the menu entry number starting with 1 at the top. Example: menu 6 2 will toggle the waterfall option
- mode
- sets the mode of the tinySA
usage: mode low|high input|output
- modulation
- sets the modulation in output mode
usage: modulation off|am|nfm|wfm|extern|freq 100..6000 (tinySA) usage: modulation off|am|fm|freq|depth|deviation|burst|period|ontime|count|trigger [value] (tinySA Ultra) freq sets the modulation frequency in Hz. On the tinySA Ultra depth sets the AM depth in %, deviation the FM deviation in Hz, burst selects the burst modulation, period and ontime set the burst period and on time in seconds (m and u allowed, e.g. modulation ontime 100u), count the number of bursts (0 = continuous) and trigger starts the bursts.
- ext_gain
- sets the external attenuation/amplification
usage: ext_gain -100..100 Works in both input and output mode. Without a value the current external gain is shown.
- output
- sets the output on or off
usage: output on|off
- pause
- pauses the sweeping in either input or output mode
usage: pause
- rbw
- sets the rbw to either automatic or a specific value
usage: rbw auto|3..600 the number specifies the target rbw in kHz
- recall
- loads a previously stored preset, the same as load, or the factory settings
usage: recall 0..4|defaults recall defaults (since V1.4311) loads the factory settings in the low input mode, as PRESET > LOAD DEFAULTS, but does not store them as the startup preset
- refresh
- enables/disables the auto refresh mode
usage: refresh off|on|rle rle (tinySA Ultra) sends compressed screen updates (rle8 frames in the NanoVNA-D RLE8 format) and the waterfall as scroll frames (scrl), 8 to 16 times less USB data. tinySA-App uses it automatically.
- release
- signals a removal of the touch
usage: release
- remark
- does nothing
usage: remark use any text
- repeat
- sets the number of measurements that should be taken at every frequency
usage: repeat 1..1000 increasing the repeat reduces the noise per frequency, repeat 1 is the normal scanning mode.
- reset
- resets the tinySA
usage: reset [dfu] reset dfu restarts the tinySA in DFU mode for a firmware update over USB (on the tinySA Ultra since V1.4252)
- restart
- restarts the the tinySA after the specified number of seconds
usage: restart {seconds} where 0 seconds stops the restarting.
- resume
- resumes the sweeping in either input or output mode
usage: resume
- save
- saves the current setting to a preset
usage: save 0..4 where 0 is the startup preset
- saveconfig
- saves the device configuration data
usage: saveconfig
- scan
- performs a scan and optionally outputs the measured data
usage: scan {start(Hz)} {stop(Hz)} [points] [outmask] where the outmask is a binary OR of 1=frequencies, 2=measured data, 4=stored data, 8=temp data and points is maximum 290 (tinySA) or 450 (tinySA Ultra). Each level is followed by 0.000000000 (for compatibility with the NanoVNA) scan without arguments scans the current sweep, scan {n} n times. The scan leaves the sweep paused, resume continues it. After a scan with start and stop the sweep uses its own frequencies and points again (since V1.4311), and with MULTI BAND on (tinySA Ultra) such a scan scans the given range instead of the bands
- scanraw
- performs a scan of unlimited amount of points and send the data in binary form
usage: scanraw {start(Hz)} {stop(Hz)} [points] [option] The measured data is the level in dBm and is send as '{' ('x' LSB MSB)*points '}', the 16 bit value least significant byte first. To get the dBm level from the 16 bit data, divide by 32 and subtract 128 for the tinySA and 174 for the tinySA Ultra. The option, when present, can be either 0,1,2 or 3 being the sum of 1=unbuffered and 2=continuous Since V1.4321 the hardware is only set up again after a change of settings, so a repeated scanraw starts without delay, and scanraw {f} {f} 1 measures one point at f as in a sweep instead of a zero span series
- selftest
- performs one or all selftests
usage: selftest 0 0..9
- spur
- enables or disables spur reduction
usage: spur on|off
- sweep
- set sweep boundaries or execute a sweep
usage: sweep [ ( start|stop|center|span|cw {frequency} ) | ( {start(Hz)} {stop(Hz)} [0..290] ) ] sweep without arguments lists the current sweep settings, the frequencies specified should be within the permissible range. The sweep commands apply both to input and output modes
- sweeptime
- sets the sweeptime
usage: sweep {time(Seconds)}the time specified may end in a letter where m=mili and u=micro
- text
- specifies the text entry for the active keypad
usage: text keypadtext where keypadtext is the text used Example: text 12M Currently does not work for entering file names
- threads
- lists information of the threads in the tinySA
- touch
- sends the coordinates of a touchusage: touch {X coordinate} {Y coordinate}
The upper left corner of the screen is "0 0"
- touchcal
- starts the touch calibration
- touchtest
- starts the touch test
- trace
- displays all or one trace information or sets trace related information
usage: trace {dBm|dBmV|dBuV|RAW|V|Vpp|W|dBV} trace {scale|reflevel} auto|{value} trace [{trace#}] value trace [{trace#}] {copy|freeze|subtract|view|value} {trace#}|off|on|[{index} {value}]
- trigger
- sets the trigger type or level
usage: trigger auto|normal|single|{level} the trigger level is in the selected unit
- ui
- (tinySA Ultra) switches the screen drawing off or on while a PC is in control
usage: ui [off ["text"]|on] With ui off the screen shows "Remote only mode. Touch screen to enable UI" and nothing else is drawn, so the commands do not wait for the screen (since V1.4321). ui off "text" shows the text in a line under it, e.g. to tell the tracking generator from the analyzer when a PC uses two tinySA; a plain ui off keeps the text and ui off "" removes it. A touch, the jog, ui on, unplugging USB, USB DISK mode and the commands that need the user (selftest, touchcal, touchtest, menu) give the UI back. When it comes back without ui on, the tinySA sends the line "ui on" in front of the reply to the next command (not in front of the binary data of capture, scanraw and sd_read). While the UI is off, messages such as errors are sent to the console. ui without argument shows the state. The setting is not stored and stays when the mode changes.
- usbdisk
- (tinySA Ultra) switches the USB DISK mode on or off
usage: usbdisk [off|on] In USB DISK mode the SD card is a disk on the PC, the measurement stops and most other commands are answered with "usb disk mode active". Without argument the current mode is shown.
- vbat
- displays the battery voltage
- vbat_offset
- displays or sets the battery offset value
usage: vbat_offset [{0..4095}]
- version
- displays the version text
- wait
- wait for a single sweep to finish and pauses sweep or waits for specified number of seconds
usage: wait [{seconds}]
- waitscan
- wait for the specified number of scans, or the current scan if not specified, to conclude and leaves the device in pause mode. All command execution will be clocked during waiting for the scans to complete
usage: waitscan [{scans}]
|