diff --git a/src/nmt/nmt.c b/src/nmt/nmt.c index 1bd637d..1ab0af0 100644 --- a/src/nmt/nmt.c +++ b/src/nmt/nmt.c @@ -924,7 +924,7 @@ static void tx_mo_complete(nmt_t *nmt, frame_t *frame) nmt_new_state(nmt, STATE_ACTIVE); nmt->active_state = ACTIVE_STATE_VOICE; nmt_set_dsp_mode(nmt, DSP_MODE_AUDIO); - if (nmt->supervisory) { + if (nmt->supervisory && !nmt->dms_call) { super_reset(nmt); timer_start(&nmt->timer, SUPERVISORY_TO1); } @@ -1179,7 +1179,7 @@ static void tx_mt_complete(nmt_t *nmt, frame_t *frame) nmt_new_state(nmt, STATE_ACTIVE); nmt->active_state = ACTIVE_STATE_VOICE; nmt_set_dsp_mode(nmt, DSP_MODE_AUDIO); - if (nmt->supervisory) { + if (nmt->supervisory && !nmt->dms_call) { super_reset(nmt); timer_start(&nmt->timer, SUPERVISORY_TO1); } diff --git a/src/nmt/sms.c b/src/nmt/sms.c index 2c8d311..d1d2fc6 100644 --- a/src/nmt/sms.c +++ b/src/nmt/sms.c @@ -28,6 +28,7 @@ #include "../common/timer.h" #include "nmt.h" +#define SMS_RECEIVE_TO 5.0 #define SMS_RELEASE_TO 2.0 /* TP-Message-Type-Indicator (TP-MTI) */ @@ -331,6 +332,9 @@ int sms_deliver(nmt_t *nmt, uint8_t ref, const char *orig_address, uint8_t orig_ nmt->sms.mt = 1; dms_send(nmt, data, length, 1); + /* start timer */ + timer_start(&nmt->sms_timer, SMS_RECEIVE_TO); + return 0; } @@ -596,6 +600,9 @@ void dms_receive(nmt_t *nmt, const uint8_t *data, int length, int __attribute__( sprintf(debug_text + i * 5, " 0x%02x", data[i]); debug_text[length * 5] = '\0'; + /* restart timer */ + timer_start(&nmt->sms_timer, SMS_RECEIVE_TO); + PDEBUG(DSMS, DEBUG_DEBUG, "Received %d bytes from DMS layer:%s\n", length, debug_text); if (sms->mt && !sms->data_sent) {