Hamlib 1.2.12
|
Data Structures | |
struct | tt565_priv_data |
Orion private data. More... | |
Files | |
file | orion.c |
Backend for Tentec Orion 565 / 566. | |
file | orion.h |
Backend for Tentec Orion 565 / 566. | |
Defines | |
#define | TT565_MEM_CAP |
Memory capability. | |
#define | TT565_MODES |
Orion Supported Modes. | |
#define | TT565_RXMODES (TT565_MODES) |
Orion Receiver Modes. | |
#define | TT565_FUNCS (RIG_FUNC_LOCK|RIG_FUNC_TUNER|RIG_FUNC_VOX|RIG_FUNC_NB) |
Orion Supported Functions. | |
#define | TT565_LEVELS |
Orion Supported Levels. | |
#define | TT565_ANTS (RIG_ANT_1|RIG_ANT_2) |
Orion Tx/Rx Antennas. | |
#define | TT565_RXANTS (TT565_ANTS|RIG_ANT_3) |
Orion Rx Antennas. | |
#define | TT565_PARMS (RIG_PARM_NONE) |
Orion Parameters. | |
#define | TT565_VFO (RIG_VFO_A|RIG_VFO_B) |
Orion VFOs - A and B. | |
#define | TT565_VFO_OPS |
Orion VFO Operations. | |
#define | TT565_STR_CAL_V1 |
S-Meter Calibration list. | |
#define | TT565_STR_CAL_V2 |
#define | EOM "\015" |
End of command marker. | |
#define | TT565_USB '0' |
USB Mode. | |
#define | TT565_LSB '1' |
LSB Mode. | |
#define | TT565_CW '2' |
CW normal Mode. | |
#define | TT565_CWR '3' |
CW reverse Mode. | |
#define | TT565_AM '4' |
AM Mode. | |
#define | TT565_FM '5' |
FM Mode. | |
#define | TT565_RTTY '6' |
RTTY Mode. | |
#define | TT565_TONE_MIN 300 |
minimum sidetone freq., Hz | |
#define | TT565_TONE_MAX 1200 |
maximum sidetone freq., Hz | |
#define | TT565_CW_MIN 10 |
minimum CW keyer rate, wpm | |
#define | TT565_CW_MAX 60 |
maximum CW keyer rate, wpm | |
Functions | |
int | tt565_transaction (RIG *rig, const char *cmd, int cmd_len, char *data, int *data_len) |
tt565_transaction, adapted from tentec_transaction (tentec.c) | |
int | tt565_init (RIG *rig) |
Basically, it just sets up *priv. | |
int | tt565_cleanup (RIG *rig) |
tt565_cleanup routine | |
int | tt565_open (RIG *rig) |
tt565_open routine | |
int | tt565_set_freq (RIG *rig, vfo_t vfo, freq_t freq) |
Set a frequence into the specified VFO. | |
int | tt565_get_freq (RIG *rig, vfo_t vfo, freq_t *freq) |
Get the frequency currently set in the specified VFO (A or B) | |
int | tt565_set_vfo (RIG *rig, vfo_t vfo) |
set RIG_VFO_CURR and send info to physical rig. | |
int | tt565_get_vfo (RIG *rig, vfo_t *vfo) |
int | tt565_set_split_vfo (RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) |
Set split operating mode. | |
int | tt565_get_split_vfo (RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) |
Get the current split status and Tx vfo selection. | |
int | tt565_set_mode (RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) |
Set operating mode to RIG_MODE_x with indicated passband width. | |
int | tt565_get_mode (RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) |
Get op. mode and bandwidth for selected vfo. | |
int | tt565_set_ts (RIG *rig, vfo_t vfo, shortfreq_t ts) |
Set Tuning Step for VFO A or B. | |
int | tt565_get_ts (RIG *rig, vfo_t vfo, shortfreq_t *ts) |
Get Tuning Step for VFO A or B. | |
int | tt565_set_rit (RIG *rig, vfo_t vfo, shortfreq_t rit) |
Set Rx incremental tuning Note: command rit != 0 ==> rit "on"; rit == 0 ==> rit "off". | |
int | tt565_get_rit (RIG *rig, vfo_t vfo, shortfreq_t *rit) |
Get Rx incremental tuning. | |
int | tt565_set_xit (RIG *rig, vfo_t vfo, shortfreq_t xit) |
Set Tx incremental tuning (Main TRx only) Note: command xit != 0 ==> xit "on"; xit == 0 ==> xit "off". | |
int | tt565_get_xit (RIG *rig, vfo_t vfo, shortfreq_t *xit) |
Get Tx incremental tuning (Main TRx only) | |
int | tt565_set_ptt (RIG *rig, vfo_t vfo, ptt_t ptt) |
Set push to talk (Tx on/off) | |
int | tt565_get_ptt (RIG *rig, vfo_t vfo, ptt_t *ptt) |
Get push to talk (Tx on/off) | |
int | tt565_reset (RIG *rig, reset_t reset) |
Restart Orion firmware. | |
const char * | tt565_get_info (RIG *rig) |
Get firmware identification, e.g., "Version 1.372". | |
int | tt565_set_level (RIG *rig, vfo_t vfo, setting_t level, value_t val) |
Sets any of Orion's "Level" adjustments. | |
int | tt565_get_level (RIG *rig, vfo_t vfo, setting_t level, value_t *val) |
Get the current value of an Orion "level". | |
int | tt565_set_mem (RIG *rig, vfo_t vfo, int ch) |
This only sets the current memory channel locally. No Orion I/O. | |
int | tt565_get_mem (RIG *rig, vfo_t vfo, int *ch) |
Get the current memory channel number (only) | |
int | tt565_vfo_op (RIG *rig, vfo_t vfo, vfo_op_t op) |
perform a RIG_OP operation | |
int | tt565_send_morse (RIG *rig, vfo_t vfo, const char *msg) |
Send a string as morse characters. | |
int | tt565_set_func (RIG *rig, vfo_t vfo, setting_t func, int status) |
Set an Orion "function". | |
int | tt565_get_func (RIG *rig, vfo_t vfo, setting_t func, int *status) |
get state of an Orion "function" | |
int | tt565_set_ant (RIG *rig, vfo_t vfo, ant_t ant) |
Antenna selection for Orion. | |
int | tt565_get_ant (RIG *rig, vfo_t vfo, ant_t *ant) |
Find what antenna is "attached" to our vfo. | |
Variables | |
struct rig_caps | tt565_caps |
tt565 transceiver capabilities. |
#define TT565_MEM_CAP |
{ \ .freq = 1, \ .mode = 1, \ .width = 1, \ }
Memory capability.
Orion's own memory channel holds a freq, mode, and bandwidth. May be captured from VFO A or B and applied to VFO A or B. It cannot directly be read or written from the computer!
#define TT565_STR_CAL_V1 |
{ 14, { \
{ 1, -47 }, /* padding to match lengths with v2 */ \
{ 10, -47 }, \
{ 13, -42 }, \
{ 18, -37 }, \
{ 22, -32 }, \
{ 27, -27 }, \
{ 32, -18 }, \
{ 37, -11 }, \
{ 42, -4 }, \
{ 47, -1 }, \
{ 52, 10 }, \
{ 57, 20 }, \
{ 65, 30 }, \
{ 74, 40 }, \
} }
S-Meter Calibration list.
List format: { hardware units, dB relative to S9}
These alternate tables must be of equal size, because they may be switched depending on firmware version detection.
Note high end of scale is severely compressed in v1 Table corrected against v 1.372, 11/2007
#define TT565_STR_CAL_V2 |
{ 14, { \ { 10., -48. }, /* S1 = min. indication */ \ { 24., -42. }, \ { 38., -36. }, \ { 47., -30. }, \ { 61., -24. }, \ { 70., -18. }, \ { 79., -12. }, \ { 84., -6. }, \ { 94., 0. }, /* S9 */ \ { 103., 10. }, \ { 118., 20. }, \ { 134., 30. }, \ { 147., 40. }, \ { 161., 50. }, \ } }
Calibration for Version 2.062a firmware, from Rigserve project. Again, this is approximate based on one measurement.
#define TT565_VFO_OPS |
Orion VFO Operations.
Allowed operations
static int tt565_cleanup | ( | RIG * | rig | ) |
tt565_cleanup routine
rig | the serial port is closed by the frontend |
Find what antenna is "attached" to our vfo.
rig | != NULL |
vfo | |
ant | receives antenna identifier |
Get the frequency currently set in the specified VFO (A or B)
rig | must != NULL |
vfo | RIG_VFO_A or RIG_VFO_B |
freq | must != NULL Performs query on physical rig |
get state of an Orion "function"
rig | != NULL |
vfo | must == RIG_VFO_CURR |
func | |
status | receives result of function query |
static const char * tt565_get_info | ( | RIG * | rig | ) |
Get firmware identification, e.g., "Version 1.372".
rig | must != NULL |
Get the current value of an Orion "level".
rig | must be != NULL |
vfo | |
level | identifier for level of interest |
val | Receives level's value, must != NULL |
(RIG_LEVEL_STRENGTH, int calibrated signal strength (dB, S9 = 0) is handled in settings.c)
Get the current memory channel number (only)
rig | != NULL |
vfo | |
ch | to receive the current channel number |
Get op. mode and bandwidth for selected vfo.
rig | must != NULL |
vfo | |
mode | Receives current mode setting, must be != NULL |
width | Receives current bandwidth setting, must be != NULL |
Get push to talk (Tx on/off)
rig | must != NULL |
vfo | |
ptt | Receives RIG_PTT_ON or RIG_PTT_OFF |
static int tt565_get_rit | ( | RIG * | rig, |
vfo_t | vfo, | ||
shortfreq_t * | rit | ||
) |
Get Rx incremental tuning.
rig | must != NULL |
vfo | |
rit | Receives Rx incremental tuning, Hz |
Get the current split status and Tx vfo selection.
rig | must != NULL |
vfo | |
split | Returned with RIG_SPLIT_ON if Tx <> Rx vfo, .._OFF otherwise |
tx_vfo | Returned RIG_VFO_x, signifying selected Tx vfo |
static int tt565_get_ts | ( | RIG * | rig, |
vfo_t | vfo, | ||
shortfreq_t * | ts | ||
) |
Get Tuning Step for VFO A or B.
rig | must != NULL |
vfo | |
ts | Receives Tuning Step, Hz |
rig | must != NULL |
vfo | Set = stored state of current VFO state |
static int tt565_get_xit | ( | RIG * | rig, |
vfo_t | vfo, | ||
shortfreq_t * | xit | ||
) |
Get Tx incremental tuning (Main TRx only)
rig | must != NULL |
vfo | |
xit | Receives Tx incremental tuning, Hz |
static int tt565_init | ( | RIG * | rig | ) |
Basically, it just sets up *priv.
rig |
static int tt565_open | ( | RIG * | rig | ) |
tt565_open routine
rig | Open the rig - check firmware version issues |
Restart Orion firmware.
rig | must != NULL |
reset | (not used) |
Send a string as morse characters.
rig | |
vfo | |
msg | A message string (<= 20 char) |
Orion can queue up to about 20 characters. We could batch a longer message into 20 char chunks, but there is no simple way to tell if message has completed. We could calculate a duration based on keyer speed and the text that was sent, but what we really need is a handshake for "message complete". Without it, you can't easily use the Orion as a code practice machine. For now, we let the user do the batching. Note that rig panel is locked up for duration of message.
Antenna selection for Orion.
rig | != NULL |
vfo | |
ant | antenna identifier RIG_ANT_1 or RIG_ANT_2 |
Set a frequence into the specified VFO.
rig | must != NULL |
vfo | RIG_VFO_A or RIG_VFO_B |
freq | assumes rig->state.priv!=NULL assumes priv->mode in AM,CW,LSB or USB. |
Set an Orion "function".
rig | != NULL |
vfo | |
func | Identifier for function to be performed |
status | data for function |
Supported functions & data
RIG_FUNC_TUNER, off/on, 0/1
RIG_FUNC_VOX, off/on, 0/1
RIG_FUNC_LOCK, unlock/lock, 0/1
RIG_FUNC_NB, off/on, 0/1 (sets Orion NB=0 or =4), compare RIG_LEVEL_NR
Sets any of Orion's "Level" adjustments.
rig | must != NULL |
vfo | |
level | A level id token, e.g. RIG_LEVEL_AF |
val | Value for the level, on a scale or via a token |
Supported Levels and Units
-RIG_LEVEL_RFPOWER, float 0.0 - 1.0
-RIG_LEVEL_AGC, int RIG_AGC_x, x= OFF, FAST, MEDIUM, SLOW, USER
-RIG_LEVEL_AF, float 0.0 - 1.0
-RIG_LEVEL_IF, passband tuning, int Hz
-RIG_LEVEL_RF, IF gain (!), float 0.0 - 1.0
-RIG_LEVEL_ATT, Atten. setting, int dB (we pick 0, 6, 12, or 18 dB)
-RIG_LEVEL_PREAMP, Preamp on/off, 0-1 (main Rx only)
-RIG_LEVEL_SQL, squelch, float 0.0 - 1.0
-RIG_LEVEL_MICGAIN, float 0.0 - 1.0
-RIG_LEVEL_COMP, speech compression, float 0.0 - 1.0
-RIG_LEVEL_CWPITCH, int Hz
-RIG_LEVEL_KEYSPD, int wpm
-RIG_LEVEL_NR, noise reduction/blank, float 0.0 - 1.0
-RIG_LEVEL_VOX, vox delay, float x 1/10 second
-RIG_LEVEL_VOXGAIN, float 0.0 - 1.0
-RIG_LEVEL_ANTIVOX, float 0.0 - 1.0
FIXME: cannot support PREAMP and ATT both at same time (make sens though)
This only sets the current memory channel locally. No Orion I/O.
rig | !=NULL |
vfo | |
ch | Channel number |
Set operating mode to RIG_MODE_x with indicated passband width.
rig | must != NULL |
vfo | |
mode | |
width | passband in Hz or = RIG_PASSBAND_NORMAL (=0) which gives a nominal value Supported modes x= USB, LSB, CW, CWR, AM, FM, RTTY This applies to currently selected receiver (Main Rx=Tx or Sub Rx) |
Set push to talk (Tx on/off)
rig | must != NULL |
vfo | |
ptt | RIG_PTT_ON or RIG_PTT_OFF |
static int tt565_set_rit | ( | RIG * | rig, |
vfo_t | vfo, | ||
shortfreq_t | rit | ||
) |
Set Rx incremental tuning Note: command rit != 0 ==> rit "on"; rit == 0 ==> rit "off".
rig | must != NULL |
vfo | |
rit | Rx incremental tuning, Hz |
Set split operating mode.
rig | must != NULL |
vfo | Rx vfo specifier token |
split | (ignored - why?) |
tx_vfo | Tx vfo specifier token |
static int tt565_set_ts | ( | RIG * | rig, |
vfo_t | vfo, | ||
shortfreq_t | ts | ||
) |
Set Tuning Step for VFO A or B.
rig | must != NULL |
vfo | |
ts | Tuning Step, Hz |
set RIG_VFO_CURR and send info to physical rig.
rig | must != NULL |
vfo | RIG_VFO_MAIN or RIG_VFO_SUB |
static int tt565_set_xit | ( | RIG * | rig, |
vfo_t | vfo, | ||
shortfreq_t | xit | ||
) |
Set Tx incremental tuning (Main TRx only) Note: command xit != 0 ==> xit "on"; xit == 0 ==> xit "off".
rig | must != NULL |
vfo | |
xit | Tx incremental tuning, Hz |
int tt565_transaction | ( | RIG * | rig, |
const char * | cmd, | ||
int | cmd_len, | ||
char * | data, | ||
int * | data_len | ||
) |
tt565_transaction, adapted from tentec_transaction (tentec.c)
rig | Rig descriptor |
cmd | command to send |
cmd_len | length of command string |
data | string to receive return data from Orion (NULL if no return desired) |
data_len | length of data string |
perform a RIG_OP operation
rig | != NULL |
vfo | |
op | Operation to perform, a RIG_OP token |
struct rig_caps tt565_caps |
tt565 transceiver capabilities.
All of the Orion's personality is defined here!
Protocol is documented at Tentec's firmware site http://www.rfsquared.com/
Hamlib documentation for version 1.2.12 -- Wed Feb 2 2011 19:26:48
Project page: http://hamlib.org