Difference between revisions of "TCP/IP radio"

From SmartSDR Wiki
Jump to: navigation, search
(WIP)
(Add radio uptime command)
Line 142: Line 142:
 
Response Example:
 
Response Example:
 
<pre>R21|0|OK</pre>
 
<pre>R21|0|OK</pre>
 +
 +
=== UPTIME ===
 +
Returns the time in seconds since the radio was last turned on.
 +
<pre>
 +
C[D]<seq_number>|radio uptime
 +
</pre>
 +
Example:
 +
<pre>C21|radio uptime</pre>
 +
 +
See [[SmartSDR TCP/IP API#Response Format|Response Format]] for details on the format of the response messages from the radio
 +
 +
{| class="wikitable" style="text-align:center"
 +
|+Responses
 +
|-
 +
! Hex Response !! Message !! Debug Output / Meaning
 +
|-
 +
! 00000000
 +
| <uptime-in-seconds> || align="left" | OK, the radio uptime in seconds is presented
 +
|}
 +
 +
Response Example:
 +
<pre>R21|0|73737</pre>

Revision as of 07:43, 18 November 2016

NAME

Set the name of the radio which will show up in broadcasts and optionally the display.

C[D]<seq_number>|radio name <name>

< name >    = alphanumeric name of the radio

Example:

C21|radio name 6M

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000 <slice_rx> OK radio name set
5000002C   Radio name provided is too long (>15 characters)

Response Example:

R21|0|OK

CALLSIGN

Set or retrieve the callsign of the radio which will show up in broadcasts and optionally the display.

C[D]<seq_number>|radio callsign <callsign>

< callsign >    = alphanumeric callsign of the radio - if left blank, radio will return current callsign

Example:

C21|radio callsign K5FRS

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000 <slice_rx> OK radio callsign set

Response Example:

R21|0|OK

FILTER_SHARPNESS

Set the filter sharpness by mode. The filter sharpness adjusts the number of taps or stages in the filter which are traded off against latency.

C[D]<seq_number>|radio filter_sharpness <mode> <level=0-3> <auto_level=0|1|t|f>

< mode >          = "voice", "cw" or "digital" - indicates which types of modes the sharpness applies to
< level >         = a relative level of sharpness with 0 being least sharp and 3 most sharp.  
                    With each level increase, latency doubles
< auto_level >    = "0" or "1" turns off/on internal algorithm for automatic setting of the filter sharpness

Example:

C21|radio filter_sharpness voice level=2

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000 Filter settings successful
50000016   malformed command / incorrect parameters

Response Example:

R21|0|OK

REBOOT

Restart (reboot) the radio. When this command is issued, the radio will drop any connections and will be unresponsive for approximately one minute while a reboot occurs.

C[D]<seq_number>|radio reboot

Example:

C1|radio reboot

No response to this command will be provided, typically.

SET

Set various radio-wide parameters. See the table below for the details on each parameter, its effects and required parameters.


Parameter Value
leapseconds Low resolution time-stamping uses NTP and the internal linux clock. To make adjustments for leap seconds, enter the number
anf automatic notch filter state (on or off)
anf_level automatic notch filter level: 0=OFF, range 0-100
dax dax channel to be used by the specified slice receiver
mode demodulation mode (See SmartSDR Supported Modes for a complete list of supported modes)
nb noise blanking state (on or off)
nb_level noise blanking level: 0=OFF, range 0-100
nr noise reduction state (on or off)
nr_level noise reduction level: 0=OFF, range 0-100
tx enable (tx=1) or disable (tx=0) transmission via the specified slice
C[D]<seq_number>|radio set leap seconds

< parameters >          = see the individual set commands to see the details

Example:

C21|radio filter_sharpness voice level=2

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000 Filter settings successful
50000016   malformed command / incorrect parameters

Response Example:

R21|0|OK

UPTIME

Returns the time in seconds since the radio was last turned on.

C[D]<seq_number>|radio uptime

Example:

C21|radio uptime

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000 <uptime-in-seconds> OK, the radio uptime in seconds is presented

Response Example:

R21|0|73737