Some cleanups of FAX modem tone handling

This commit is contained in:
Steve Underwood 2013-01-19 23:55:23 +08:00
parent 8e6460fed3
commit 6cb3be7d8b
14 changed files with 238 additions and 285 deletions

View File

@ -291,7 +291,7 @@ SPAN_DECLARE(void) at_call_event(at_state_t *s, int event)
{ {
/* FAX modem connection */ /* FAX modem connection */
at_set_at_rx_mode(s, AT_MODE_DELIVERY); at_set_at_rx_mode(s, AT_MODE_DELIVERY);
at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) FAX_MODEM_CED_TONE); at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) FAX_MODEM_CED_TONE_TX);
} }
break; break;
case AT_CALL_EVENT_CONNECTED: case AT_CALL_EVENT_CONNECTED:
@ -315,9 +315,9 @@ SPAN_DECLARE(void) at_call_event(at_state_t *s, int event)
/* FAX modem connection */ /* FAX modem connection */
at_set_at_rx_mode(s, AT_MODE_DELIVERY); at_set_at_rx_mode(s, AT_MODE_DELIVERY);
if (s->silent_dial) if (s->silent_dial)
at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) FAX_MODEM_NOCNG_TONE); at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) FAX_MODEM_NOCNG_TONE_TX);
else else
at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) FAX_MODEM_CNG_TONE); at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) FAX_MODEM_CNG_TONE_TX);
s->dte_is_waiting = TRUE; s->dte_is_waiting = TRUE;
} }
} }

View File

@ -323,12 +323,8 @@ static void fax_set_tx_type(void *user_data, int type, int bit_rate, int short_t
break; break;
case T30_MODEM_CED: case T30_MODEM_CED:
case T30_MODEM_CNG: case T30_MODEM_CNG:
if (type == T30_MODEM_CED) tone = (type == T30_MODEM_CED) ? FAX_MODEM_CED_TONE_TX : FAX_MODEM_CNG_TONE_TX;
tone = MODEM_CONNECT_TONES_FAX_CED; fax_modems_start_slow_modem(t, tone);
else
tone = MODEM_CONNECT_TONES_FAX_CNG;
modem_connect_tones_tx_init(&t->connect_tx, tone);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &modem_connect_tones_tx, &t->connect_tx);
fax_modems_set_next_tx_handler(t, (span_tx_handler_t) NULL, NULL); fax_modems_set_next_tx_handler(t, (span_tx_handler_t) NULL, NULL);
t->transmit = TRUE; t->transmit = TRUE;
break; break;

View File

@ -261,11 +261,32 @@ SPAN_DECLARE(void) fax_modems_start_slow_modem(fax_modems_state_t *s, int which)
{ {
case FAX_MODEM_V21_RX: case FAX_MODEM_V21_RX:
fsk_rx_init(&s->v21_rx, &preset_fsk_specs[FSK_V21CH2], FSK_FRAME_MODE_SYNC, (put_bit_func_t) hdlc_rx_put_bit, &s->hdlc_rx); fsk_rx_init(&s->v21_rx, &preset_fsk_specs[FSK_V21CH2], FSK_FRAME_MODE_SYNC, (put_bit_func_t) hdlc_rx_put_bit, &s->hdlc_rx);
fax_modems_set_rx_handler(s, (span_rx_handler_t) &fsk_rx, &s->v21_rx, (span_rx_fillin_handler_t) &fsk_rx_fillin, &s->v21_rx);
fsk_rx_signal_cutoff(&s->v21_rx, -39.09f); fsk_rx_signal_cutoff(&s->v21_rx, -39.09f);
s->rx_frame_received = FALSE; s->rx_frame_received = FALSE;
break; break;
case FAX_MODEM_CED_TONE_RX:
modem_connect_tones_rx_init(&s->connect_rx, MODEM_CONNECT_TONES_FAX_CED, s->tone_callback, s->tone_callback_user_data);
fax_modems_set_rx_handler(s, (span_rx_handler_t) &modem_connect_tones_rx, &s->connect_rx, (span_rx_fillin_handler_t) &modem_connect_tones_rx_fillin, &s->connect_rx);
break;
case FAX_MODEM_CNG_TONE_RX:
modem_connect_tones_rx_init(&s->connect_rx, MODEM_CONNECT_TONES_FAX_CNG, s->tone_callback, s->tone_callback_user_data);
fax_modems_set_rx_handler(s, (span_rx_handler_t) &modem_connect_tones_rx, &s->connect_rx, (span_rx_fillin_handler_t) &modem_connect_tones_rx_fillin, &s->connect_rx);
break;
case FAX_MODEM_V21_TX: case FAX_MODEM_V21_TX:
fsk_tx_init(&s->v21_tx, &preset_fsk_specs[FSK_V21CH2], (get_bit_func_t) hdlc_tx_get_bit, &s->hdlc_tx); fsk_tx_init(&s->v21_tx, &preset_fsk_specs[FSK_V21CH2], (get_bit_func_t) hdlc_tx_get_bit, &s->hdlc_tx);
fax_modems_set_tx_handler(s, (span_tx_handler_t) &fsk_tx, &s->v21_tx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
case FAX_MODEM_CED_TONE_TX:
modem_connect_tones_tx_init(&s->connect_tx, MODEM_CONNECT_TONES_FAX_CED);
fax_modems_set_tx_handler(s, (span_tx_handler_t) &modem_connect_tones_tx, &s->connect_tx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
case FAX_MODEM_CNG_TONE_TX:
modem_connect_tones_tx_init(&s->connect_tx, MODEM_CONNECT_TONES_FAX_CNG);
fax_modems_set_tx_handler(s, (span_tx_handler_t) &modem_connect_tones_tx, &s->connect_tx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break; break;
} }
} }
@ -490,12 +511,14 @@ SPAN_DECLARE(fax_modems_state_t *) fax_modems_init(fax_modems_state_t *s,
s->use_tep = use_tep; s->use_tep = use_tep;
modem_connect_tones_tx_init(&s->connect_tx, MODEM_CONNECT_TONES_FAX_CNG); modem_connect_tones_tx_init(&s->connect_tx, MODEM_CONNECT_TONES_FAX_CNG);
s->tone_callback = tone_callback;
s->tone_callback_user_data = user_data;
if (tone_callback) if (tone_callback)
{ {
modem_connect_tones_rx_init(&s->connect_rx, modem_connect_tones_rx_init(&s->connect_rx,
MODEM_CONNECT_TONES_FAX_CNG, MODEM_CONNECT_TONES_FAX_CNG,
tone_callback, s->tone_callback,
user_data); s->tone_callback_user_data);
} }
/*endif*/ /*endif*/
span_log_init(&s->logging, SPAN_LOG_NONE, NULL); span_log_init(&s->logging, SPAN_LOG_NONE, NULL);

View File

@ -693,6 +693,12 @@ SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx_fillin(modem_connect_tones_rx_state_t *s, int len)
{
return 0;
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(int) modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s) SPAN_DECLARE(int) modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s)
{ {
int x; int x;

View File

@ -34,9 +34,11 @@ enum
FAX_MODEM_FLUSH = 0, FAX_MODEM_FLUSH = 0,
FAX_MODEM_SILENCE_TX, FAX_MODEM_SILENCE_TX,
FAX_MODEM_SILENCE_RX, FAX_MODEM_SILENCE_RX,
FAX_MODEM_CED_TONE, FAX_MODEM_CED_TONE_TX,
FAX_MODEM_CNG_TONE, FAX_MODEM_CNG_TONE_TX,
FAX_MODEM_NOCNG_TONE, FAX_MODEM_NOCNG_TONE_TX,
FAX_MODEM_CED_TONE_RX,
FAX_MODEM_CNG_TONE_RX,
FAX_MODEM_V21_TX, FAX_MODEM_V21_TX,
FAX_MODEM_V17_TX, FAX_MODEM_V17_TX,
FAX_MODEM_V27TER_TX, FAX_MODEM_V27TER_TX,

View File

@ -142,6 +142,15 @@ SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *
const int16_t amp[], const int16_t amp[],
int len); int len);
/*! Fake processing of a missing block of received modem connect tone samples
(e.g due to packet loss).
\brief Fake processing of a missing block of received modem connect tone samples.
\param s The context.
\param len The number of samples to fake.
\return The number of samples unprocessed.
*/
SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx_fillin(modem_connect_tones_rx_state_t *s, int len);
/*! \brief Test if a modem_connect tone has been detected. /*! \brief Test if a modem_connect tone has been detected.
\param s The context. \param s The context.
\return TRUE if tone is detected, else FALSE. \return TRUE if tone is detected, else FALSE.

View File

@ -82,6 +82,11 @@ struct fax_modems_state_s
/*! \brief */ /*! \brief */
dc_restore_state_t dc_restore; dc_restore_state_t dc_restore;
/*! \brief The callback function used to report detected tones. */
tone_report_func_t tone_callback;
/*! \brief A user specified opaque pointer passed to the tone_callback function. */
void *tone_callback_user_data;
/*! \brief The fast modem type currently in use */ /*! \brief The fast modem type currently in use */
int fast_modem; int fast_modem;

View File

@ -187,7 +187,7 @@ static void hdlc_accept_frame(void *user_data, const uint8_t *msg, int len, int
static void hdlc_accept_t38_frame(void *user_data, const uint8_t *msg, int len, int ok); static void hdlc_accept_t38_frame(void *user_data, const uint8_t *msg, int len, int ok);
static void hdlc_accept_non_ecm_frame(void *user_data, const uint8_t *msg, int len, int ok); static void hdlc_accept_non_ecm_frame(void *user_data, const uint8_t *msg, int len, int ok);
static int silence_rx(void *user_data, const int16_t amp[], int len); static int silence_rx(void *user_data, const int16_t amp[], int len);
static int cng_rx(void *user_data, const int16_t amp[], int len); static int initial_timed_rx(void *user_data, const int16_t amp[], int len);
static void non_ecm_put_bit(void *user_data, int bit); static void non_ecm_put_bit(void *user_data, int bit);
static void non_ecm_put(void *user_data, const uint8_t buf[], int len); static void non_ecm_put(void *user_data, const uint8_t buf[], int len);
static int non_ecm_get(void *user_data, uint8_t buf[], int len); static int non_ecm_get(void *user_data, uint8_t buf[], int len);
@ -223,7 +223,7 @@ static int front_end_status(t31_state_t *s, int status)
} }
/*endif*/ /*endif*/
break; break;
case FAX_MODEM_CED_TONE: case FAX_MODEM_CED_TONE_TX:
/* Go directly to V.21/HDLC transmit. */ /* Go directly to V.21/HDLC transmit. */
s->modem = FAX_MODEM_NONE; s->modem = FAX_MODEM_NONE;
restart_modem(s, FAX_MODEM_V21_TX); restart_modem(s, FAX_MODEM_V21_TX);
@ -1599,7 +1599,6 @@ static int non_ecm_get(void *user_data, uint8_t buf[], int len)
s->non_ecm_tx.final = FALSE; s->non_ecm_tx.final = FALSE;
/* This will put the modem into its shutdown sequence. When /* This will put the modem into its shutdown sequence. When
it has finally shut down, an OK response will be sent. */ it has finally shut down, an OK response will be sent. */
//return SIG_STATUS_END_OF_DATA;
return i; return i;
} }
/*endif*/ /*endif*/
@ -1679,7 +1678,7 @@ static void hdlc_rx_status(void *user_data, int status)
s->audio.modems.rx_trained = TRUE; s->audio.modems.rx_trained = TRUE;
break; break;
case SIG_STATUS_CARRIER_UP: case SIG_STATUS_CARRIER_UP:
if (s->modem == FAX_MODEM_CNG_TONE || s->modem == FAX_MODEM_NOCNG_TONE || s->modem == FAX_MODEM_V21_RX) if (s->modem == FAX_MODEM_CNG_TONE_TX || s->modem == FAX_MODEM_NOCNG_TONE_TX || s->modem == FAX_MODEM_V21_RX)
{ {
s->at_state.rx_signal_present = TRUE; s->at_state.rx_signal_present = TRUE;
s->rx_frame_received = FALSE; s->rx_frame_received = FALSE;
@ -1718,7 +1717,7 @@ static void hdlc_rx_status(void *user_data, int status)
s->audio.modems.rx_trained = FALSE; s->audio.modems.rx_trained = FALSE;
break; break;
case SIG_STATUS_FRAMING_OK: case SIG_STATUS_FRAMING_OK:
if (s->modem == FAX_MODEM_CNG_TONE || s->modem == FAX_MODEM_NOCNG_TONE) if (s->modem == FAX_MODEM_CNG_TONE_TX || s->modem == FAX_MODEM_NOCNG_TONE_TX)
{ {
/* Once we get any valid HDLC the CNG tone stops, and we drop /* Once we get any valid HDLC the CNG tone stops, and we drop
to the V.21 receive modem on its own. */ to the V.21 receive modem on its own. */
@ -2028,7 +2027,7 @@ static int restart_modem(t31_state_t *s, int new_modem)
use_hdlc = FALSE; use_hdlc = FALSE;
switch (s->modem) switch (s->modem)
{ {
case FAX_MODEM_CNG_TONE: case FAX_MODEM_CNG_TONE_TX:
if (s->t38_mode) if (s->t38_mode)
{ {
s->t38_fe.next_tx_samples = s->t38_fe.samples; s->t38_fe.next_tx_samples = s->t38_fe.samples;
@ -2037,35 +2036,34 @@ static int restart_modem(t31_state_t *s, int new_modem)
} }
else else
{ {
modem_connect_tones_tx_init(&t->connect_tx, MODEM_CONNECT_TONES_FAX_CNG); fax_modems_start_slow_modem(t, FAX_MODEM_CNG_TONE_TX);
/* CNG is special, since we need to receive V.21 HDLC messages while sending the /* CNG is special, since we need to receive V.21 HDLC messages while sending the
tone. Everything else in FAX processing sends only one way at a time. */ tone. Everything else in FAX processing sends only one way at a time. */
/* Do V.21/HDLC receive in parallel. The other end may send its /* Do V.21/HDLC receive in parallel. The other end may send its
first message at any time. The CNG tone will continue until first message at any time. The CNG tone will continue until
we get a valid preamble. */ we get a valid preamble. */
t31_v21_rx(s); t31_v21_rx(s);
fax_modems_set_rx_handler(t, (span_rx_handler_t) &cng_rx, s, (span_rx_fillin_handler_t) &span_dummy_rx_fillin, NULL); fax_modems_set_rx_handler(t, (span_rx_handler_t) &initial_timed_rx, s, (span_rx_fillin_handler_t) &span_dummy_rx_fillin, NULL);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &modem_connect_tones_tx, &t->connect_tx);
fax_modems_set_next_tx_handler(t, (span_tx_handler_t) NULL, NULL); fax_modems_set_next_tx_handler(t, (span_tx_handler_t) NULL, NULL);
} }
/*endif*/ /*endif*/
s->at_state.transmit = TRUE; s->at_state.transmit = TRUE;
break; break;
case FAX_MODEM_NOCNG_TONE: case FAX_MODEM_NOCNG_TONE_TX:
if (s->t38_mode) if (s->t38_mode)
{ {
} }
else else
{ {
t31_v21_rx(s); t31_v21_rx(s);
fax_modems_set_rx_handler(t, (span_rx_handler_t) &cng_rx, s, (span_rx_fillin_handler_t) &span_dummy_rx_fillin, NULL); fax_modems_set_rx_handler(t, (span_rx_handler_t) &initial_timed_rx, s, (span_rx_fillin_handler_t) &span_dummy_rx_fillin, NULL);
silence_gen_set(&t->silence_gen, 0); silence_gen_set(&t->silence_gen, 0);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &silence_gen, &t->silence_gen); fax_modems_set_tx_handler(t, (span_tx_handler_t) &silence_gen, &t->silence_gen);
} }
/*endif*/ /*endif*/
s->at_state.transmit = FALSE; s->at_state.transmit = FALSE;
break; break;
case FAX_MODEM_CED_TONE: case FAX_MODEM_CED_TONE_TX:
if (s->t38_mode) if (s->t38_mode)
{ {
s->t38_fe.next_tx_samples = s->t38_fe.samples; s->t38_fe.next_tx_samples = s->t38_fe.samples;
@ -2074,8 +2072,7 @@ static int restart_modem(t31_state_t *s, int new_modem)
} }
else else
{ {
modem_connect_tones_tx_init(&t->connect_tx, MODEM_CONNECT_TONES_FAX_CED); fax_modems_start_slow_modem(t, FAX_MODEM_CED_TONE_TX);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &modem_connect_tones_tx, &t->connect_tx);
fax_modems_set_next_tx_handler(t, (span_tx_handler_t) NULL, NULL); fax_modems_set_next_tx_handler(t, (span_tx_handler_t) NULL, NULL);
} }
/*endif*/ /*endif*/
@ -2121,9 +2118,9 @@ static int restart_modem(t31_state_t *s, int new_modem)
case FAX_MODEM_V29_RX: case FAX_MODEM_V29_RX:
if (!s->t38_mode) if (!s->t38_mode)
{ {
fax_modems_start_fast_modem(t, s->modem, s->bit_rate, s->short_train, use_hdlc);
/* Allow for +FCERROR/+FRH:3 */ /* Allow for +FCERROR/+FRH:3 */
t31_v21_rx(s); t31_v21_rx(s);
fax_modems_start_fast_modem(t, s->modem, s->bit_rate, s->short_train, use_hdlc);
} }
/*endif*/ /*endif*/
s->at_state.transmit = FALSE; s->at_state.transmit = FALSE;
@ -2743,7 +2740,7 @@ static int silence_rx(void *user_data, const int16_t amp[], int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
static int cng_rx(void *user_data, const int16_t amp[], int len) static int initial_timed_rx(void *user_data, const int16_t amp[], int len)
{ {
t31_state_t *s; t31_state_t *s;
@ -2755,12 +2752,9 @@ static int cng_rx(void *user_data, const int16_t amp[], int len)
restart_modem(s, FAX_MODEM_SILENCE_TX); restart_modem(s, FAX_MODEM_SILENCE_TX);
at_modem_control(&s->at_state, AT_MODEM_CONTROL_HANGUP, NULL); at_modem_control(&s->at_state, AT_MODEM_CONTROL_HANGUP, NULL);
t31_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND); t31_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
return 0;
} }
else
{
fsk_rx(&s->audio.modems.v21_rx, amp, len); fsk_rx(&s->audio.modems.v21_rx, amp, len);
}
/*endif*/
return 0; return 0;
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/

View File

@ -867,7 +867,7 @@ static int t38_encode_data(t38_core_state_t *s, uint8_t buf[], int data_type, co
if (s->data_transport_protocol == T38_TRANSPORT_TCP_TPKT) if (s->data_transport_protocol == T38_TRANSPORT_TCP_TPKT)
{ {
/* Fill in the TPKT header (se RFC1006) */ /* Fill in the TPKT header (see RFC1006) */
/* Version */ /* Version */
buf[0] = 3; buf[0] = 3;
/* Reserved */ /* Reserved */

View File

@ -321,16 +321,14 @@ static int set_next_tx_type(t38_gateway_state_t *s)
break; break;
case T38_IND_CNG: case T38_IND_CNG:
t->tx_bit_rate = 0; t->tx_bit_rate = 0;
modem_connect_tones_tx_init(&t->connect_tx, MODEM_CONNECT_TONES_FAX_CNG); fax_modems_start_slow_modem(t, FAX_MODEM_CNG_TONE_TX);
silence_gen_set(&t->silence_gen, 0); silence_gen_set(&t->silence_gen, 0);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &modem_connect_tones_tx, &t->connect_tx);
fax_modems_set_next_tx_handler(t, (span_tx_handler_t) &silence_gen, &t->silence_gen); fax_modems_set_next_tx_handler(t, (span_tx_handler_t) &silence_gen, &t->silence_gen);
fax_modems_set_rx_active(t, TRUE); fax_modems_set_rx_active(t, TRUE);
break; break;
case T38_IND_CED: case T38_IND_CED:
t->tx_bit_rate = 0; t->tx_bit_rate = 0;
modem_connect_tones_tx_init(&t->connect_tx, MODEM_CONNECT_TONES_FAX_CED); fax_modems_start_slow_modem(t, FAX_MODEM_CED_TONE_TX);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &modem_connect_tones_tx, &t->connect_tx);
fax_modems_set_next_tx_handler(t, (span_tx_handler_t) NULL, NULL); fax_modems_set_next_tx_handler(t, (span_tx_handler_t) NULL, NULL);
fax_modems_set_rx_active(t, TRUE); fax_modems_set_rx_active(t, TRUE);
break; break;

View File

@ -312,66 +312,13 @@ static void hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
static int v17_v21_rx(void *user_data, const int16_t amp[], int len)
{
fax_modems_state_t *s;
s = (fax_modems_state_t *) user_data;
v17_rx(&s->fast_modems.v17_rx, amp, len);
fsk_rx(&s->v21_rx, amp, len);
if (s->rx_trained)
{
/* The fast modem has trained, so we no longer need to run the slow
one in parallel. */
span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.17 + V.21 to V.17 (%.2fdBm0)\n", v17_rx_signal_power(&s->fast_modems.v17_rx));
fax_modems_set_rx_handler(s, (span_rx_handler_t) &v17_rx, &s->fast_modems.v17_rx, NULL, NULL);
}
return 0;
}
/*- End of function --------------------------------------------------------*/
static int v27ter_v21_rx(void *user_data, const int16_t amp[], int len)
{
fax_modems_state_t *s;
s = (fax_modems_state_t *) user_data;
v27ter_rx(&s->fast_modems.v27ter_rx, amp, len);
fsk_rx(&s->v21_rx, amp, len);
if (s->rx_trained)
{
/* The fast modem has trained, so we no longer need to run the slow
one in parallel. */
span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.27ter + V.21 to V.27ter (%.2fdBm0)\n", v27ter_rx_signal_power(&s->fast_modems.v27ter_rx));
fax_modems_set_rx_handler(s, (span_rx_handler_t) &v27ter_rx, &s->fast_modems.v27ter_rx, NULL, NULL);
}
return 0;
}
/*- End of function --------------------------------------------------------*/
static int v29_v21_rx(void *user_data, const int16_t amp[], int len)
{
fax_modems_state_t *s;
s = (fax_modems_state_t *) user_data;
v29_rx(&s->fast_modems.v29_rx, amp, len);
fsk_rx(&s->v21_rx, amp, len);
if (s->rx_trained)
{
/* The fast modem has trained, so we no longer need to run the slow
one in parallel. */
span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.29 + V.21 to V.29 (%.2fdBm0)\n", v29_rx_signal_power(&s->fast_modems.v29_rx));
fax_modems_set_rx_handler(s, (span_rx_handler_t) &v29_rx, &s->fast_modems.v29_rx, NULL, NULL);
}
return 0;
}
/*- End of function --------------------------------------------------------*/
int faxtester_rx(faxtester_state_t *s, int16_t *amp, int len) int faxtester_rx(faxtester_state_t *s, int16_t *amp, int len)
{ {
int i; int i;
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
amp[i] = dc_restore(&s->modems.dc_restore, amp[i]); amp[i] = dc_restore(&s->modems.dc_restore, amp[i]);
if (s->modems.rx_handler)
s->modems.rx_handler(s->modems.rx_user_data, amp, len); s->modems.rx_handler(s->modems.rx_user_data, amp, len);
timer_update(s, len); timer_update(s, len);
if (s->wait_for_silence) if (s->wait_for_silence)
@ -432,7 +379,6 @@ void faxtester_set_rx_type(void *user_data, int type, int bit_rate, int short_tr
{ {
faxtester_state_t *s; faxtester_state_t *s;
fax_modems_state_t *t; fax_modems_state_t *t;
int tone;
s = (faxtester_state_t *) user_data; s = (faxtester_state_t *) user_data;
t = &s->modems; t = &s->modems;
@ -445,37 +391,31 @@ void faxtester_set_rx_type(void *user_data, int type, int bit_rate, int short_tr
switch (type) switch (type)
{ {
case T30_MODEM_CED: case T30_MODEM_CED:
fax_modems_start_slow_modem(t, FAX_MODEM_CED_TONE_RX);
s->tone_state = MODEM_CONNECT_TONES_NONE;
break;
case T30_MODEM_CNG: case T30_MODEM_CNG:
tone = (type == T30_MODEM_CED) ? MODEM_CONNECT_TONES_FAX_CED : MODEM_CONNECT_TONES_FAX_CNG; fax_modems_start_slow_modem(t, FAX_MODEM_CNG_TONE_RX);
modem_connect_tones_rx_init(&t->connect_rx,
tone,
tone_detected,
(void *) s);
fax_modems_set_rx_handler(t, (span_rx_handler_t) &modem_connect_tones_rx, &t->connect_rx, NULL, NULL);
s->tone_state = MODEM_CONNECT_TONES_NONE; s->tone_state = MODEM_CONNECT_TONES_NONE;
break; break;
case T30_MODEM_V21: case T30_MODEM_V21:
if (s->flush_handler) if (s->flush_handler)
s->flush_handler(s, s->flush_user_data, 3); s->flush_handler(s, s->flush_user_data, 3);
fax_modems_start_slow_modem(t, FAX_MODEM_V21_RX); fax_modems_start_slow_modem(t, FAX_MODEM_V21_RX);
fax_modems_set_rx_handler(t, (span_rx_handler_t) &fsk_rx, &t->v21_rx, NULL, NULL);
break; break;
case T30_MODEM_V27TER: case T30_MODEM_V27TER:
fax_modems_start_fast_modem(t, FAX_MODEM_V27TER_RX, bit_rate, short_train, use_hdlc); fax_modems_start_fast_modem(t, FAX_MODEM_V27TER_RX, bit_rate, short_train, use_hdlc);
fax_modems_set_rx_handler(t, (span_rx_handler_t) &v27ter_v21_rx, t, NULL, NULL);
break; break;
case T30_MODEM_V29: case T30_MODEM_V29:
fax_modems_start_fast_modem(t, FAX_MODEM_V29_RX, bit_rate, short_train, use_hdlc); fax_modems_start_fast_modem(t, FAX_MODEM_V29_RX, bit_rate, short_train, use_hdlc);
fax_modems_set_rx_handler(t, (span_rx_handler_t) &v29_v21_rx, t, NULL, NULL);
break; break;
case T30_MODEM_V17: case T30_MODEM_V17:
fax_modems_start_fast_modem(t, FAX_MODEM_V17_RX, bit_rate, short_train, use_hdlc); fax_modems_start_fast_modem(t, FAX_MODEM_V17_RX, bit_rate, short_train, use_hdlc);
fax_modems_set_rx_handler(t, (span_rx_handler_t) &v17_v21_rx, t, NULL, NULL);
break; break;
case T30_MODEM_DONE: case T30_MODEM_DONE:
span_log(&s->logging, SPAN_LOG_FLOW, "FAX exchange complete\n"); span_log(&s->logging, SPAN_LOG_FLOW, "FAX exchange complete\n");
default: default:
fax_modems_set_rx_handler(t, (span_rx_handler_t) &span_dummy_rx, s, NULL, NULL); fax_modems_set_rx_handler(t, (span_rx_handler_t) &span_dummy_rx, s, NULL, s);
break; break;
} }
} }
@ -513,25 +453,19 @@ void faxtester_set_tx_type(void *user_data, int type, int bit_rate, int short_tr
break; break;
case T30_MODEM_CED: case T30_MODEM_CED:
case T30_MODEM_CNG: case T30_MODEM_CNG:
if (type == T30_MODEM_CED) tone = (type == T30_MODEM_CED) ? MODEM_CONNECT_TONES_FAX_CED : MODEM_CONNECT_TONES_FAX_CNG;
tone = MODEM_CONNECT_TONES_FAX_CED; fax_modems_start_slow_modem(t, tone);
else
tone = MODEM_CONNECT_TONES_FAX_CNG;
modem_connect_tones_tx_init(&t->connect_tx, tone);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &modem_connect_tones_tx, &t->connect_tx);
s->transmit = TRUE; s->transmit = TRUE;
break; break;
case T30_MODEM_V21: case T30_MODEM_V21:
fax_modems_start_slow_modem(t, FAX_MODEM_V21_TX); fax_modems_start_slow_modem(t, FAX_MODEM_V21_TX);
fsk_tx_set_modem_status_handler(&t->v21_tx, modem_tx_status, (void *) s); fsk_tx_set_modem_status_handler(&t->v21_tx, modem_tx_status, (void *) s);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &fsk_tx, &t->v21_tx);
s->transmit = TRUE; s->transmit = TRUE;
break; break;
case T30_MODEM_V27TER: case T30_MODEM_V27TER:
fax_modems_set_get_bit(t, get_bit_func, get_bit_user_data); fax_modems_set_get_bit(t, get_bit_func, get_bit_user_data);
fax_modems_start_fast_modem(t, FAX_MODEM_V27TER_TX, bit_rate, short_train, use_hdlc); fax_modems_start_fast_modem(t, FAX_MODEM_V27TER_TX, bit_rate, short_train, use_hdlc);
v27ter_tx_set_modem_status_handler(&t->fast_modems.v27ter_tx, modem_tx_status, (void *) s); v27ter_tx_set_modem_status_handler(&t->fast_modems.v27ter_tx, modem_tx_status, (void *) s);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &v27ter_tx, &t->fast_modems.v27ter_tx);
/* For any fast modem, set 200ms of preamble flags */ /* For any fast modem, set 200ms of preamble flags */
hdlc_tx_flags(&t->hdlc_tx, bit_rate/(8*5)); hdlc_tx_flags(&t->hdlc_tx, bit_rate/(8*5));
s->transmit = TRUE; s->transmit = TRUE;
@ -540,7 +474,6 @@ void faxtester_set_tx_type(void *user_data, int type, int bit_rate, int short_tr
fax_modems_set_get_bit(t, get_bit_func, get_bit_user_data); fax_modems_set_get_bit(t, get_bit_func, get_bit_user_data);
fax_modems_start_fast_modem(t, FAX_MODEM_V29_TX, bit_rate, short_train, use_hdlc); fax_modems_start_fast_modem(t, FAX_MODEM_V29_TX, bit_rate, short_train, use_hdlc);
v29_tx_set_modem_status_handler(&t->fast_modems.v29_tx, modem_tx_status, (void *) s); v29_tx_set_modem_status_handler(&t->fast_modems.v29_tx, modem_tx_status, (void *) s);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &v29_tx, &t->fast_modems.v29_tx);
/* For any fast modem, set 200ms of preamble flags */ /* For any fast modem, set 200ms of preamble flags */
hdlc_tx_flags(&t->hdlc_tx, bit_rate/(8*5)); hdlc_tx_flags(&t->hdlc_tx, bit_rate/(8*5));
s->transmit = TRUE; s->transmit = TRUE;
@ -549,7 +482,6 @@ void faxtester_set_tx_type(void *user_data, int type, int bit_rate, int short_tr
fax_modems_set_get_bit(t, get_bit_func, get_bit_user_data); fax_modems_set_get_bit(t, get_bit_func, get_bit_user_data);
fax_modems_start_fast_modem(t, FAX_MODEM_V17_TX, bit_rate, short_train, use_hdlc); fax_modems_start_fast_modem(t, FAX_MODEM_V17_TX, bit_rate, short_train, use_hdlc);
v17_tx_set_modem_status_handler(&t->fast_modems.v17_tx, modem_tx_status, (void *) s); v17_tx_set_modem_status_handler(&t->fast_modems.v17_tx, modem_tx_status, (void *) s);
fax_modems_set_tx_handler(t, (span_tx_handler_t) &v17_tx, &t->fast_modems.v17_tx);
/* For any fast modem, set 200ms of preamble flags */ /* For any fast modem, set 200ms of preamble flags */
hdlc_tx_flags(&t->hdlc_tx, bit_rate/(8*5)); hdlc_tx_flags(&t->hdlc_tx, bit_rate/(8*5));
s->transmit = TRUE; s->transmit = TRUE;

View File

@ -415,15 +415,14 @@ then
fi fi
echo schedule_tests completed OK echo schedule_tests completed OK
#./sig_tone_tests >$STDOUT_DEST 2>$STDERR_DEST ./sig_tone_tests >$STDOUT_DEST 2>$STDERR_DEST
#RETVAL=$? RETVAL=$?
#if [ $RETVAL != 0 ] if [ $RETVAL != 0 ]
#then then
# echo sig_tone_tests failed! echo sig_tone_tests failed!
# exit $RETVAL exit $RETVAL
#fi fi
#echo sig_tone_tests completed OK echo sig_tone_tests completed OK
echo sig_tone_tests not enabled
#./super_tone_rx_tests >$STDOUT_DEST 2>$STDERR_DEST #./super_tone_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
#RETVAL=$? #RETVAL=$?
@ -445,15 +444,14 @@ echo super_tone_rx_tests not enabled
#echo super_tone_tx_tests completed OK #echo super_tone_tx_tests completed OK
echo super_tone_tx_tests not enabled echo super_tone_tx_tests not enabled
#./swept_tone_tests >$STDOUT_DEST 2>$STDERR_DEST ./swept_tone_tests >$STDOUT_DEST 2>$STDERR_DEST
#RETVAL=$? RETVAL=$?
#if [ $RETVAL != 0 ] if [ $RETVAL != 0 ]
#then then
# echo swept_tone_tests failed! echo swept_tone_tests failed!
# exit $RETVAL exit $RETVAL
#fi fi
#echo swept_tone_tests completed OK echo swept_tone_tests completed OK
echo swept_tone_tests not enabled
./t31_tests -r >$STDOUT_DEST 2>$STDERR_DEST ./t31_tests -r >$STDOUT_DEST 2>$STDERR_DEST
RETVAL=$? RETVAL=$?

View File

@ -105,7 +105,7 @@ static const struct command_response_s fax_send_test_seq[] =
RESPONSE("\r\nOK\r\n"), RESPONSE("\r\nOK\r\n"),
EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"), EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
//<DIS frame data> //<DIS frame data>
#if 0 #if 1
RESPONSE("\xFF\x13\x80\x00\xEE\xF8\x80\x80\x91\x80\x80\x80\x18\x78\x57\x10\x03"), // For audio FAXing RESPONSE("\xFF\x13\x80\x00\xEE\xF8\x80\x80\x91\x80\x80\x80\x18\x78\x57\x10\x03"), // For audio FAXing
#else #else
RESPONSE("\xFF\x13\x80\x04\xEE\xF8\x80\x80\x91\x80\x80\x80\x18\xE4\xE7\x10\x03"), // For T.38 FAXing RESPONSE("\xFF\x13\x80\x04\xEE\xF8\x80\x80\x91\x80\x80\x80\x18\xE4\xE7\x10\x03"), // For T.38 FAXing

View File

@ -496,7 +496,7 @@ static int test_org_09(void)
Method: The tester waits for a CI and then sends a 1650Hz signal for 5 seconds. Method: The tester waits for a CI and then sends a 1650Hz signal for 5 seconds.
Pass criteria: 1) The TUT should respond with a 980Hz tone in 0.5±0.1 seconds. Pass criteria: 1) The TUT should respond with a 980Hz tone in 0.5±0.1 seconds.
2) Data should be transmitted and received at 300 bit/s to comply with Annex F. 2) Data should be transmitted and received at 300 bit/s to comply with Annex F.
Comments: Comments: The TUT should indicate that V.21 mode has been selected.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -506,8 +506,7 @@ static int test_org_09(void)
static int test_org_10(void) static int test_org_10(void)
{ {
/* /*
III.5.4.2.10 The TUT should indicate that V.21 mode has been selected. III.5.4.2.10 V.23 (1300Hz signal) detection
V.23 (1300 Hz signal) detection
Purpose: To verify that the TUT correctly detects the V.23 upper channel signal during the Purpose: To verify that the TUT correctly detects the V.23 upper channel signal during the
2-second interval between transmission of CI sequences. 2-second interval between transmission of CI sequences.
Preamble: N/A Preamble: N/A
@ -515,7 +514,7 @@ static int test_org_10(void)
Pass criteria: 1) The TUT should respond with a 390Hz tone in 1.7±0.1 seconds. Pass criteria: 1) The TUT should respond with a 390Hz tone in 1.7±0.1 seconds.
2) Data should be transmitted and received at 75 bit/s and 1200 bit/s respectively 2) Data should be transmitted and received at 75 bit/s and 1200 bit/s respectively
by the TUT to comply with Annex E. by the TUT to comply with Annex E.
Comments: Comments: The TUT should indicate that V.23 mode has been selected.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -525,8 +524,7 @@ static int test_org_10(void)
static int test_org_11(void) static int test_org_11(void)
{ {
/* /*
III.5.4.2.11 The TUT should indicate that V.23 mode has been selected. III.5.4.2.11 V.23 (390Hz signal) detection
V.23 (390 Hz signal) detection
Purpose: To confirm correct selection of V.23 reverse mode during sending of XCI. Purpose: To confirm correct selection of V.23 reverse mode during sending of XCI.
Preamble: N/A Preamble: N/A
Method: The tester should wait for the start of the XCI signal and then send 390Hz to TUT Method: The tester should wait for the start of the XCI signal and then send 390Hz to TUT
@ -536,7 +534,8 @@ static int test_org_11(void)
present. present.
3) Data should be transmitted and received at 1200 bit/s and 75 bit/s respectively 3) Data should be transmitted and received at 1200 bit/s and 75 bit/s respectively
by the TUT to comply with Annex E when connection is indicated. by the TUT to comply with Annex E when connection is indicated.
Comments: Comments: The TUT should indicate that V.23 mode has been selected at least 3 seconds after
the start of the 390Hz tone.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -546,16 +545,14 @@ static int test_org_11(void)
static int test_org_12(void) static int test_org_12(void)
{ {
/* /*
III.5.4.2.12 The TUT should indicate that V.23 mode has been selected at least 3 seconds after III.5.4.2.12 5 bit mode (Baudot) detection tests
the start of the 390 Hz tone.
5 bit mode (Baudot) detection tests
Purpose: To confirm detection of Baudot modulation at various bit rates that may be Purpose: To confirm detection of Baudot modulation at various bit rates that may be
encountered. encountered.
Preamble: N/A Preamble: N/A
Method: The tester transmits the 5-bit coded characters "0" to "9" followed by "abcdef" at Method: The tester transmits the 5-bit coded characters "0" to "9" followed by "abcdef" at
(a) 45.45, (b) 47.6, (c) 50 and (d) 100 bits per second. When TUT indicates a (a) 45.45, (b) 47.6, (c) 50 and (d) 100 bits per second. When TUT indicates a
connection, type at least 5 characters back to the tester so that correct selection of bit connection, type at least 5 characters back to the tester so that correct selection
rate can be confirmed. of bit rate can be confirmed.
Pass criteria: 1) TUT should select Baudot mode and the appropriate bit rate. Pass criteria: 1) TUT should select Baudot mode and the appropriate bit rate.
2) The tester will analyse the bit rate of received characters, which should be at 2) The tester will analyse the bit rate of received characters, which should be at
either 45.45 or 50 bits per second as appropriate. either 45.45 or 50 bits per second as appropriate.
@ -640,7 +637,7 @@ static int test_org_16(void)
Pass criteria: 1) TUT should respond with 1650Hz tone after 1.5±0.1 seconds after start of Pass criteria: 1) TUT should respond with 1650Hz tone after 1.5±0.1 seconds after start of
980Hz tone. 980Hz tone.
2) Data should be transmitted and received at 300 bit/s complying with Annex F. 2) Data should be transmitted and received at 300 bit/s complying with Annex F.
Comments: Comments: The TUT should indicate that V.21 mode has been selected.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -650,8 +647,7 @@ static int test_org_16(void)
static int test_org_17(void) static int test_org_17(void)
{ {
/* /*
III.5.4.2.17 The TUT should indicate that V.21 mode has been selected. III.5.4.2.17 Loss of signal after 980Hz
Loss of signal after 980 Hz
Purpose: To confirm that TUT returns to the Monitor 1 state if 980Hz signal disappears. Purpose: To confirm that TUT returns to the Monitor 1 state if 980Hz signal disappears.
Preamble: N/A Preamble: N/A
Method: The tester sends 980Hz to TUT for 1.2 seconds followed by silence for 5 seconds. Method: The tester sends 980Hz to TUT for 1.2 seconds followed by silence for 5 seconds.
@ -689,7 +685,7 @@ static int test_org_19(void)
Method: The tester sends 1270Hz to TUT for 5 seconds. Method: The tester sends 1270Hz to TUT for 5 seconds.
Pass criteria: 1) TUT should respond with 2225Hz tone after 0.7±0.1 s. Pass criteria: 1) TUT should respond with 2225Hz tone after 0.7±0.1 s.
2) Data should be transmitted and received at 300 bit/s complying with Annex D. 2) Data should be transmitted and received at 300 bit/s complying with Annex D.
Comments: Comments: The TUT should indicate that Bell 103 mode has been selected.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -699,8 +695,7 @@ static int test_org_19(void)
static int test_org_20(void) static int test_org_20(void)
{ {
/* /*
III.5.4.2.20 The TUT should indicate that Bell 103 mode has been selected. III.5.4.2.20 Immunity to network tones
Immunity to network tones
Purpose: To ensure that the TUT does not interpret network tones as valid signals. Purpose: To ensure that the TUT does not interpret network tones as valid signals.
Preamble: N/A Preamble: N/A
Method: The tester will first send a dial tone to the TUT, this will be followed by a ringing Method: The tester will first send a dial tone to the TUT, this will be followed by a ringing
@ -963,7 +958,7 @@ static int test_ans_09(void)
Pass criteria: 1) The TUT should not respond to bursts of 400 or 800 ms. Pass criteria: 1) The TUT should not respond to bursts of 400 or 800 ms.
2) The TUT should immediately begin probing after a burst of 980Hz for 500 or 2) The TUT should immediately begin probing after a burst of 980Hz for 500 or
700 ms followed by 1 second of silence. 700 ms followed by 1 second of silence.
Comments: Comments: The probe sent by the TUT will depend on the country setting.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -973,8 +968,7 @@ static int test_ans_09(void)
static int test_ans_10(void) static int test_ans_10(void)
{ {
/* /*
III.5.4.3.10 The probe sent by the TUT will depend on the country setting. III.5.4.3.10 V.21 detection by timer
V.21 detection by timer
Purpose: To confirm correct selection of V.21 calling modem when the received signal is not Purpose: To confirm correct selection of V.21 calling modem when the received signal is not
modulated, i.e. there is no 1180Hz. modulated, i.e. there is no 1180Hz.
Preamble: N/A Preamble: N/A
@ -1167,7 +1161,7 @@ static int test_ans_20(void)
Pass criteria: 1) The TUT should not respond to bursts of 400 or 800 ms. Pass criteria: 1) The TUT should not respond to bursts of 400 or 800 ms.
2) The TUT should immediately begin probing after a burst of 1300Hz for 500 or 2) The TUT should immediately begin probing after a burst of 1300Hz for 500 or
700 ms followed by 1 second of silence. 700 ms followed by 1 second of silence.
Comments: Comments: The probe sent by the TUT will depend on the country setting.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -1177,8 +1171,7 @@ static int test_ans_20(void)
static int test_ans_21(void) static int test_ans_21(void)
{ {
/* /*
III.5.4.3.21 The probe sent by the TUT will depend on the country setting. III.5.4.3.21 V.23 Reverse mode (1300Hz) detection
V.23 Reverse mode (1300 Hz) detection
Purpose: To ensure correct detection and selection of V.23 reverse mode. Purpose: To ensure correct detection and selection of V.23 reverse mode.
Preamble: N/A Preamble: N/A
Method: The tester sends 1300Hz only, with no XCI signals, to TUT for 5 seconds. Method: The tester sends 1300Hz only, with no XCI signals, to TUT for 5 seconds.
@ -1234,7 +1227,7 @@ static int test_ans_24(void)
by the TUT. by the TUT.
Pass criteria: The TUT should send the user defined probe message for Annexes A, B, and C Pass criteria: The TUT should send the user defined probe message for Annexes A, B, and C
modes followed by a pause of Tm (default 3) seconds. modes followed by a pause of Tm (default 3) seconds.
Comments: Comments: The carrierless modes are those described in Annexes A, B and C.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -1244,8 +1237,7 @@ static int test_ans_24(void)
static int test_ans_25(void) static int test_ans_25(void)
{ {
/* /*
III.5.4.3.25 The carrierless modes are those described in Annexes A, B and C. III.5.4.3.25 Interrupted carrierless mode probe
Interrupted carrierless mode probe
Purpose: To ensure that the TUT continues probing from the point of interruption a maximum Purpose: To ensure that the TUT continues probing from the point of interruption a maximum
of 20 s after a failed connect attempt. of 20 s after a failed connect attempt.
Preamble: The TUT should be configured for the UK country setting. Preamble: The TUT should be configured for the UK country setting.
@ -1291,7 +1283,9 @@ static int test_ans_27(void)
2) The tester will confirm that the 1300Hz carrier is maintained for at least 2) The tester will confirm that the 1300Hz carrier is maintained for at least
4 seconds beyond the normal probe duration, i.e. Tc (= 6 s default) + 4 s = 4 seconds beyond the normal probe duration, i.e. Tc (= 6 s default) + 4 s =
10 seconds total. 10 seconds total.
Comments: Comments: All known V.23 devices need to receive 1300Hz tone before they will respond with
390Hz. When the 1300Hz probe is not being transmitted, a 390Hz tone may be
interpreted as a 400Hz network tone.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 1; return 1;
@ -1301,10 +1295,7 @@ static int test_ans_27(void)
static int test_ans_28(void) static int test_ans_28(void)
{ {
/* /*
III.5.4.3.28 All known V.23 devices need to receive 1300 Hz tone before they will respond with III.5.4.3.28 Interrupted carrier mode probe
390 Hz. When the 1300 Hz probe is not being transmitted, a 390 Hz tone may be
interpreted as a 400 Hz network tone.
Interrupted carrier mode probe
Purpose: To ensure that the TUT continues probing from the point of interruption a maximum Purpose: To ensure that the TUT continues probing from the point of interruption a maximum
of 4 s after a failed connect attempt. of 4 s after a failed connect attempt.
Preamble: The TUT should be configured for the UK country setting. Preamble: The TUT should be configured for the UK country setting.
@ -1739,7 +1730,8 @@ static int test_x_10(void)
transmitted by the TUT. transmitted by the TUT.
3) The tester should confirm that there is remote echo from TUT. 3) The tester should confirm that there is remote echo from TUT.
4) The operator should confirm that there is local echo on the TUT. 4) The operator should confirm that there is local echo on the TUT.
Comments: Comments: This test is only applicable to Minitel Dialogue terminals. Prestel and Minitel
Normal terminals cannot operate in this mode.
*/ */
printf("Test not yet implemented\n"); printf("Test not yet implemented\n");
return 0; return 0;
@ -1749,9 +1741,7 @@ static int test_x_10(void)
static int test_x_11(void) static int test_x_11(void)
{ {
/* /*
III.5.4.5.11 This test is only applicable to Minitel Dialogue terminals. Prestel and Minitel III.5.4.5.11 V.21 character structure
Normal terminals cannot operate in this mode.
V.21 character structure
Purpose: To verify that the TUT uses the character structure in the V.21 mode. Purpose: To verify that the TUT uses the character structure in the V.21 mode.
Preamble: Establish a call from the TUT to the tester in V.21 mode. Preamble: Establish a call from the TUT to the tester in V.21 mode.
Method: The operator should transmit a string from the TUT that is long enough to cause the Method: The operator should transmit a string from the TUT that is long enough to cause the