TCPIP slice - flexradio/smartsdr-api-docs GitHub Wiki
Create a slice receiver. See SmartSDR Supported Modes for a complete list of supported modes
C[D]<seq_number>|slice create [freq=<MHz>] [pan=<streamID>] [ant=<rx_antenna_port>] [txant=<tx_antenna_port>] [mode=<mode>] [clone_slice=<source_slice>] [load_from=<source>]
<MHz> = frequency in MHz, up to 15 significant digits
<streamID> = stream ID of the panadapter to place the slice on
<rx_antenna_port> = RX antenna name, e.g. ANT1, ANT2, RXA, RXB, XVTR (the slice's ant_list status field lists the valid ones)
<tx_antenna_port> = TX antenna name: ANT1, ANT2, or a transverter port (the slice's tx_ant_list status field lists the valid ones)
<mode> = alphanumeric mode designator: usb, lsb, cw, am ...
<source_slice> = slice whose settings the new slice copies
<source> = persistence, to restore the slice remembered by band persistence for this band; any other value, or omitting it, creates the slice normally (cloning <source_slice> if clone_slice= is given)
Examples:
C21|slice create pan=0x40000000 freq=7.074 mode=digu txant=ANT2
C22|slice create clone_slice=0 pan=0x40000000 load_from=clone
load_from=clone is not needed when clone_slice= is given: in that
case the radio clones the source slice by default. Include it only if
you want the command to be explicit.
Antenna arguments
- The RX antenna argument on
slice createisant=, even though the slice status andslice setcall the same settingrxant.slice createdoes not acceptrxant=. Like any unrecognized argument, it is silently ignored. - When
pan=is given, the slice always uses that panadapter's RX antenna andant=has no effect. To use a different RX antenna, change the panadapter's antenna, or sendslice set <slice_rx> rxant=<antenna_port>after the create. Either way, every slice on that panadapter moves with it. - When
pan=is omitted,ant=selects the closest panadapter already on that antenna. If none matches, the radio opens a new panadapter on that antenna. If no receiver is free for a new panadapter, it switches an existing panadapter to that antenna, which moves every slice on that panadapter. -
txant=sets the slice's TX antenna in the same command. Panadapters have no TX antenna, so a slice created withouttxant=does not follow its RX antenna. It uses the TX antenna remembered by band persistence for that band, or ANT1 for a new slice. -
txant=is applied after the slice is created, so the response reports only the create. If the TX antenna can't be applied (for exampletxant=RXA, which can't transmit), the slice is still created and the response is still success. Checktxantin the slice status to confirm it.
With band persistence enabled (the default), the radio may restore a remembered slice for the band instead of using everything passed here. Check the slice status rather than assuming the requested values took effect.
See Response Format for details on the format of the response messages from the radio
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | <slice_rx> | Slice receiver created |
| 50000001 | Unable to get foundation receiver assignment | |
| 50000003 | All slice receivers are in use | |
| 50000004 | Slice parameter error | |
| 50000005 | The number or type of parameters supplied is incorrect | |
| 50000016 | Malformed Command | |
| 5000002A | Unknown antenna port in ant= or txant=
|
|
| 5000002C | Incorrect number of parameters | |
| 50000032 | Bad Mode | |
| 50000059 | Invalid panadapter stream ID in pan=
|
Responses
<slice_rx> = the slice receiver number assigned to this slice receiver
Response Example:
R21|0|2
Returns the frequency error of a slice. Slices are tuned using a set of digital tuning elements that can be slightly off-frequency. This command will report the known difference in the requested and actual frequency. Note that this command is only useful if the radio is GPS locked or locked to a 10MHz reference. The result does not take into account any drift in the internal OCXO or TCXO. Note that the FLEX-6500 and FLEX-6700(R) use a PLL master oscillator with a very narrow loop bandwidth (10Hz) that will have around a 3-4 cycle-per-minute sinusoid that will modulate the receiver and transmitter. Typical error induced by the oscillation is in the vicinity of 3mHz peak-to-peak. Long-term averaging should null out this error (v1.10.8 and later)
C[D]<seq_number>|slice get_error <slice_rx>
<slice_rx> = the slice receiver number that has the error. Slice receivers are numbered starting with zero (0)
Example:
C21|slice get_error 0
See Response Format for details on the format of the response messages from the radio
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | <rx_error_value>,<tx_error_value> | <rx_error_value> is the frequency offset in mHz for the receiver (tx for transmitter). Negative values indicate the receiver or transmitter is tuned low in frequency. |
| 50000004 | Incorrect number of parameters | |
| 50000005 | The number or type of parameters supplied is incorrect | |
| 5000000D | Invalid Slice Receiver | |
| 5000002C | Incorrect number of parameters |
Responses
Response Example:
R21|0|+3.564320,-11.346234
Remove (delete) a slice receiver
C[D]<seq_number>|slice remove <slice_rx>
<slice_rx> = the slice receiver number to be removed. Slice receivers are numbered starting with zero (0)
slice r is accepted as a short form.
Example:
C19|slice remove 0
See Response Format for details on the format of the response messages from the radio
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | Successfully deleted slice receiver | |
| 50000005 | The number or type of parameters supplied is incorrect | |
| 5000000D | Invalid Slice Receiver | |
| 5000002C | Incorrect number of parameters |
Responses
Response Example:
R19|0|
Tune the slice receiver to a new frequency
C[D]<seq_number>|slice tune <slice_rx> <frequency> [autopan=<0|1>]
<slice_rx> = the slice receiver number to be tuned. Slice receivers are numbered starting with zero (0)
<frequency> = the new frequency for the slice receiver specified in MHz
autopan specifies if panadapters should be tuned to keep slice in view
slice t is accepted as a short form. A GUI client can only tune its
own slices (v4.3.16 and later); tuning another client's slice returns
5000000D. Non-GUI clients are not restricted. A slice that has been
locked with slice lock cannot be tuned until it is unlocked.
Example:
C12|slice tune 1 14.2055
See Response Format for details on the format of the response messages from the radio
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | Successfully tuned slice receiver | |
| 50000005 | The number or type of parameters supplied is incorrect | |
| 5000000C | The frequency requested is out of range | |
| 5000000D | Invalid slice receiver number | |
| 5000001D | Insufficient resources to tune to that frequency (requires new minimixer, not available) | |
| 50000068 | The slice is locked |
Responses
Response Example:
R12|0|
Retrieve a list of the slice receivers currently in use on the radio,
including those belonging to other clients. Spell out list: unlike
most slice commands it has no one-letter short form, and slice l is
read as slice lock.
C[D]<seq_number>|slice list
Example:
C41|slice list
See Response Format for details on the format of the response messages from the radio
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | list of slice receivers provided | |
Responses
Response Example:
R41|0|0 1 3 4
In this example, slice receivers 0, 1, 3 and 4 are in use. Each slice number is followed by a space, including the last one.
Changes various operational parameters specific to the slice receiver.
C[D]<seq_number>|slice set <slice_rx> <parameter=value> [<parameter=value>...]
slice s is accepted as a short form. A GUI client can only change its
own slices (v4.3.16 and later); changing another client's slice returns
5000000D. Non-GUI clients are not restricted.
Example:
C41|slice set 0 nr=1 nr_level=50
Parameters are applied in order. Processing stops at the first one that fails, and the parameters before it stay applied. Only one response is sent per command, so when several parameters are given, an error in a later one can be reported as success. Send one parameter per command if you need to know which one failed.
Boolean values: 1, on, T (or anything starting with t, 1, +
or on) means on; anything else means off. Boolean values are never
rejected.
Many DSP parameters only work in modes whose signal chain includes that process; in other modes they return 50000061.
| Parameter | Value | Description |
|---|---|---|
| active | 0|1 | 1 makes this the client's active slice. 0 has no effect. |
| agc_mode | off|slow|med|fast | AGC speed (lower case). Not used in FM modes. |
| agc_off_level | 0-100 | AGC off level |
| agc_threshold | 0-100 | AGC threshold. Also sets agc_threshold_mode=manual. |
| agc_threshold_mode | auto|manual | auto requires the AGC-T license feature (50004001 without it) |
| anf | 0|1 | Turns the auto notch filter on or off |
| anf_adapt_mode | fast|slow|auto | Auto notch filter adaptation speed |
| anf_delay | 1-512 | Auto notch filter delay |
| anf_isdft_mode | zero|one|half | Auto notch filter inverse-transform mode |
| anf_level | 0-100 | Auto notch filter level |
| anf_wlen | 32-512, power of 2 | Auto notch filter window length |
| anft | 0|1 | Turns the ANFT auto notch filter on or off. Requires the noise reduction license feature. |
| anft_min_db | -150 to -50 | ANFT: minimum tone level, dB |
| anft_tone_db_diff | 1-60 | ANFT: tone level above the noise floor, dB |
| apf | 0|1 | Turns the CW audio peaking filter on or off (CW mode only) |
| apf_level | 0-100 | CW audio peaking filter level (CW mode only) |
| audio_level | 0-100 | Slice audio level |
| audio_mute | 0|1 | Mutes (1) or unmutes (0) the slice audio |
| audio_pan | 0-100 | Left/right audio balance; 50 is centered |
| dax | 0 to number of DAX channels | DAX channel for this slice; 0 = none. Taking a channel removes it from the client's other slices. |
| dfm_pre_de_emphasis | 0|1 | Turns pre-emphasis/de-emphasis on or off (DFM mode only) |
| digl_offset | Hz | DIGL mode offset |
| digu_offset | Hz | DIGU mode offset |
| diversity | 0|1 | Diversity reception: creates or removes a diversity child slice. Two-receiver models only (FLEX-6600/6600M, FLEX-6700, FLEX-6700R, FLEX-8600/8600M, AU-520/520M, CL-9300, ML-9600 series); 50000004 on others. |
| esc | 0|1 | Turns Enhanced Signal Clarity on or off. Requires the diversity ESC license feature and an active diversity pair. |
| esc_gain | 0.0-2.0 | ESC gain (linear) |
| esc_phase_shift | 0.0-6.283 | ESC phase shift, radians (0 to 2π) |
| fm_deviation | Hz | FM deviation (DFM mode only) |
| fm_repeater_offset_freq | MHz | Repeater offset |
| fm_tone_burst | 0|1 | Turns the 1750 Hz tone burst on transmit on or off (FM modes) |
| fm_tone_mode | off|ctcss_tx | CTCSS tone mode (FM modes) |
| fm_tone_value | Hz, e.g. 100.0 | CTCSS tone frequency (FM modes) |
| lms_anf | 0|1 | Turns the LMS auto notch filter on or off |
| lms_anf_delay | 1-512 | LMS auto notch filter delay |
| lms_anf_leakage_level | 0-100 | LMS auto notch filter leakage |
| lms_anf_level | 0-100 | LMS auto notch filter level |
| lms_anf_taps | 1-512 | LMS auto notch filter taps |
| lms_nr | 0|1 | Turns LMS noise reduction on or off |
| lms_nr_delay | 1-512 | LMS noise reduction delay |
| lms_nr_leakage_level | 0-100 | LMS noise reduction leakage |
| lms_nr_level | 0-100 | LMS noise reduction level |
| lms_nr_taps | 1-512 | LMS noise reduction taps |
| loopa | 0|1 | Turns RX loop A on or off (FLEX-6500, FLEX-6700, FLEX-6700R). Applies to the whole receiver. Can't be changed while transmitting. |
| loopb | 0|1 | Turns RX loop B on or off (FLEX-6700, FLEX-6700R). Applies to the whole receiver. Can't be changed while transmitting. |
| mode | mode name | Demodulation mode. See SmartSDR Supported Modes for a complete list of supported modes. Changing the mode may change the meters associated with the slice. |
| nb | 0|1 | Turns the noise blanker on or off |
| nb_level | 0-100 | Noise blanker level |
| nr | 0|1 | Turns noise reduction on or off |
| nr_adapt_mode | fast|slow|auto | Noise reduction adaptation speed |
| nr_delay | 1-512 | Noise reduction delay |
| nr_isdft_mode | zero|one|half | Noise reduction inverse-transform mode |
| nr_level | 0-100 | Noise reduction level |
| nr_wlen | 32-512, power of 2 | Noise reduction window length |
| nrf | 0|1 | Turns the spectral noise reduction filter on or off. Requires the noise reduction license feature. |
| nrf_wlen | 512-8192, power of 2 | Spectral noise reduction filter window length |
| play | 0|1 | Starts (1) or stops (0) playback of the quick recording; 50000071 if nothing is recorded |
| record | 0|1 | Starts (1) or stops (0) quick-recording the slice audio |
| repeater_offset_dir | simplex|up|down | Repeater offset direction (FM modes) |
| rit_freq | -99999 to 99999 | RIT offset, Hz |
| rit_on | 0|1 | Turns RIT on or off |
| rnnoise | 0|1 | Turns RNNoise noise reduction on or off. FLEX-8000 series and Aurora only; requires the noise reduction license feature. |
| rtty_mark | 0-4000 | RTTY mark frequency, Hz |
| rtty_shift | 0-2000 | RTTY shift, Hz |
| rxant | antenna name | RX antenna, e.g. ANT2 (the ant_list status field lists the valid ones). Changes the antenna of the slice's panadapter, so every slice on it moves too. Can't be changed while transmitting. |
| speex_nr | 0|1 | Turns Speex noise reduction on or off. FLEX-8000 series and Aurora only; requires the noise reduction license feature. |
| speex_nr_level | 0-50 | Speex noise reduction level. FLEX-8000 series and Aurora only. |
| squelch | 0|1 | Turns squelch on or off (FM, USB, LSB, AM and SAM modes) |
| squelch_level | 0-100 | Squelch level |
| step | 1-1000000 | Tuning step, Hz. Applies to every slice in the same mode. |
| step_list | Hz,Hz,... | Sets the list of tuning steps offered for this mode, e.g. 1,10,50,100,500,1000. Applies to every slice in the same mode. |
| tnf | 0|1 | Turns tracking notch filters on or off for this slice. TNFs are created with tnf create; radio set tnf_enabled turns them on or off for the whole radio. |
| tx | 0|1 | 1 makes this the transmit slice |
| tx_offset_freq | MHz | Transmit offset from the slice frequency |
| txant | antenna name | TX antenna, e.g. ANT1 (the tx_ant_list status field lists the valid ones). Can't be changed while transmitting. |
| wnb | 0|1 | Turns the wideband noise blanker on or off. Applies to the whole panadapter. |
| wnb_level | 0-100 | Wideband noise blanker level. Applies to the whole receiver. |
| xit_freq | -99999 to 99999 | XIT offset, Hz |
| xit_on | 0|1 | Turns XIT on or off |
See Response Format for details on the format of the response messages from the radio
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | OK - update successful | |
| 5000000F | Invalid DSP process (the process you attempted to set it not in this signal chain) | |
| 50000016 | Malformed command | |
| 5000002D | Bad field | |
| 5000002F | Unimplemented mode (mode recognized, but not yet implemented) | |
| 50000030 | Signal chain error - likely bad mode | |
| 50000032 | Unrecognized mode (string) | |
| 50000033 | Parameter out of range | |
| 5000000D | The slice doesn't exist, or (v4.3.16 and later) a GUI client tried to change another client's slice | |
| 50000061 | The parameter's DSP process isn't available in the slice's current mode | |
| 50000071 | play=1 with nothing recorded | |
| 50004001 | The radio isn't licensed for the feature (anft, nrf, rnnoise, speex_nr, esc, agc_threshold_mode=auto) |
Responses
Response Example:
R41|0|
Click-tune: tune a slice on a panadapter to a frequency, the way SmartSDR does when the user clicks in the panadapter.
C[D]<seq_number>|slice m <frequency> pan=<streamID>
<frequency> = the frequency clicked, in MHz
<streamID> = stream ID of the panadapter that was clicked
- If the active slice is on that panadapter, it is tuned.
- Otherwise the slice on that panadapter closest to the frequency is tuned. If the panadapter has no slice and a slice receiver is free, a new slice is created there.
- The frequency is snapped to the slice's tuning step. In DIGU and DIGL modes, the slice's digu_offset or digl_offset is applied so the clicked frequency lands on the offset.
- The tuned or created slice becomes the active slice.
Example:
C51|slice m 14.074000 pan=0x40000000
Lock a slice's frequency so it cannot be tuned, or unlock it. The
lock field in the slice status reports the state, and band
persistence remembers it.
C[D]<seq_number>|slice lock <slice_rx>
C[D]<seq_number>|slice unlock <slice_rx>
<slice_rx> = the slice receiver number. Slice receivers are numbered starting with zero (0)
While a slice is locked, slice tune returns 50000068.
Example:
C52|slice lock 0
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | Slice locked/unlocked | |
| 50001000 | Invalid slice receiver (the radio returns its generic "unknown" response) |
Restore a slice's DSP settings to the firmware defaults.
C[D]<seq_number>|slice reset <slice_rx> dsp_param=<target>
<slice_rx> = the slice receiver number. Slice receivers are numbered starting with zero (0)
<target> = one of the targets in the table below
| Target | Resets |
|---|---|
| all | Every target below, plus nb_level and apf_level |
| nr | nr_level, nr_delay, nr_wlen, nr_isdft_mode, nr_adapt_mode |
| anf | anf_level, anf_delay, anf_wlen, anf_isdft_mode, anf_adapt_mode |
| lms_nr | lms_nr_level, lms_nr_delay, lms_nr_taps, lms_nr_leakage_level |
| lms_anf | lms_anf_level, lms_anf_delay, lms_anf_taps, lms_anf_leakage_level |
| anft | anft_min_db, anft_tone_db_diff |
| nrf | nrf_wlen |
| speex_nr | speex_nr_level. FLEX-8000 series and Aurora only. |
Only the settings are reset; whether each process is on or off does not
change. The target must be spelled out in full (case does not matter).
dsp_param= can be repeated to reset several targets in one command.
Example:
C53|slice reset 0 dsp_param=nr
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | Settings reset | |
| 5000000D | Invalid slice receiver | |
| 50000016 | Malformed command, or unknown target | |
| 5000002D | Bad field (an argument other than dsp_param=) |
CW auto-tune: tune the slice onto a signal, by default the strongest. Requires the auto-tune license feature.
C[D]<seq_number>|slice auto_tune <slice_rx> [rank=<n>] [int=0|1]
<slice_rx> = the slice receiver number. Slice receivers are numbered starting with zero (0)
rank = tune to the nth strongest signal; 1 (the default) is the strongest
int = 1 turns intermittent mode on, 0 turns it off
rank= is used only on the FLEX-8000 series and Aurora. FLEX-6000
series radios ignore it.
slice a is accepted as a short form. With int=, the radio sets
intermittent mode and then runs the tune; the response reports the
intermittent-mode change.
Example:
C54|slice auto_tune 0
| Hex Response | Message | Debug Output / Meaning |
|---|---|---|
| 00000000 | Auto-tune started | |
| 5000000D | Invalid slice receiver | |
| 50000016 | Malformed command | |
| 50000028 | Slice receiver not in use | |
| 50004001 | The radio isn't licensed for auto-tune |
Send a command to the waveform running on a slice. Everything after the slice number is passed to the waveform unchanged, and the waveform defines the command set and the response.
C[D]<seq_number>|slice waveform_cmd <slice_rx> <command>
<slice_rx> = the slice receiver number running the waveform
<command> = the waveform command text, as defined by the waveform