aboutsummaryrefslogtreecommitdiffstats
path: root/src/bnetz
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-07-06 16:11:24 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2016-07-06 16:19:01 +0200
commitab9aba1a8464a24ac7e710bc0f6b9f0770a1e9bc (patch)
tree0af2671b721d0d9816c6506f1c2c6e1aa6232715 /src/bnetz
parent54266a993745b91171e3492bf45ae3872b723a8b (diff)
B-Netz: Reply the station ID correctly
It must be replied right after it has been received the first time. It does not matter if this happens a bit later, even a second later. Thanx to Hans Wigger for providing recording from his B-Netz tester to figure this out.
Diffstat (limited to 'src/bnetz')
-rw-r--r--src/bnetz/bnetz.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bnetz/bnetz.c b/src/bnetz/bnetz.c
index 16f4ac8..6c75997 100644
--- a/src/bnetz/bnetz.c
+++ b/src/bnetz/bnetz.c
@@ -560,15 +560,16 @@ void bnetz_receive_telegramm(bnetz_t *bnetz, uint16_t telegramm, double level, d
bnetz->dial_mode = DIAL_MODE_NUMBER;
memset(bnetz->dial_number, 0, sizeof(bnetz->dial_number));
bnetz->dial_pos = 0;
+ /* reply station ID */
+ PDEBUG(DBNETZ, DEBUG_INFO, "Sending station id back to phone: %s.\n", bnetz->station_id);
+ bnetz_set_dsp_mode(bnetz, DSP_MODE_TELEGRAMM);
+ bnetz->station_id_pos = 0;
}
break;
case DIAL_MODE_NUMBER:
if (digit == 'e') {
PDEBUG(DBNETZ, DEBUG_INFO, "Received number from mobile phone: %s\n", bnetz->dial_number);
bnetz->dial_mode = DIAL_MODE_START2;
- PDEBUG(DBNETZ, DEBUG_INFO, "Sending station id back to phone: %s.\n", bnetz->station_id);
- bnetz_set_dsp_mode(bnetz, DSP_MODE_TELEGRAMM);
- bnetz->station_id_pos = 0;
break;
}
if (digit < '0' || digit > '9') {