From f96994e0e78595bd1885bd44862eead24f3480fb Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 13 Apr 2024 22:53:29 +0200 Subject: [PATCH] SIM: Display SIM version in programming mode on memory location 06 Untested! --- docs/sim.html | 6 +++++- src/sim/sim.c | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/sim.html b/docs/sim.html index 4f508d2..655eefb 100644 --- a/docs/sim.html +++ b/docs/sim.html @@ -427,11 +427,12 @@ Turn on the phone and you will be asked for a PIN. Enter the PIN 9991 to alter the first subscriber data. Enter the PIN 9992 .. 9998 to alter second to eighth subscriber data. The subscriber data is shown in the telephone directory and can be altered by changing the numbers in that directory. +Also the SIM software version is shown on entry 06 of the telephone directory, but it cannot be changed. The Bosch OF 7 does not like to store numbers less than 3 digits. Put zeroes in front, if you want to store a value less than 1000.

-The default subscriber data and where to change them in the telephone directory: +The default subscriber data and SIM version and where to change them in the telephone directory:

@@ -440,9 +441,12 @@ The default subscriber data and where to change them in the telephone directory: +
EntryNameNumber
03Kartenkennung3
04Sonderheitsschl.0
05Wartungsschl.65535
06SIM software versionxxx **

(*) When PIN 9991 was entered. +
+(**) This value represents the software version and cannot be changed.

diff --git a/src/sim/sim.c b/src/sim/sim.c index 6b6be97..0f08357 100644 --- a/src/sim/sim.c +++ b/src/sim/sim.c @@ -609,8 +609,8 @@ static void rd_rufn(sim_sim_t *sim, uint8_t *data, int length) switch (rufn) { case 0: /* send bitmap for service mode */ memset(data, 0xff, 24); - data[0] = 5; /* 5 entries */ - data[1] = 0x07; /* upper 5 bits = 0 */ + data[0] = 6; /* 6 entries */ + data[1] = 0x03; /* upper 6 bits = 0 */ break; case 1: /* FUTLN */ data[0] = eeprom_read(EEPROM_FUTLN_H + sim->card); @@ -647,6 +647,10 @@ static void rd_rufn(sim_sim_t *sim, uint8_t *data, int length) encode_directory(data, number, "Wartungsschl."); LOGP(DSIM7, LOGL_INFO, "service mode: maintenance = %s\n", number); break; + case 6: /* sim version */ + encode_directory(data, SIM_VERSION, SIM_VERSION_NAME); + LOGP(DSIM7, LOGL_INFO, "service mode: display SIM version = %s\n", SIM_VERSION); + break; } tx_sdu(sim, 0, data, 24); return;