From dfbcbe750650147eec88e16f50c6942bf8d6fbd9 Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Wed, 18 Oct 2023 20:57:19 +0200 Subject: [PATCH] functions: Provide a method to read the SIM ID We can use the identifier of the SIM as a stable token to derive a deterministic IMEI rather than the IMSI which is only available once the SIM has been (PIN) unlocked. --- files/lib/blue-merle/functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/lib/blue-merle/functions.sh b/files/lib/blue-merle/functions.sh index f1ed421..1514478 100644 --- a/files/lib/blue-merle/functions.sh +++ b/files/lib/blue-merle/functions.sh @@ -28,6 +28,11 @@ RANDOMIZE_MACADDR () { # You need to restart the network, i.e. /etc/init.d/network restart } +READ_ICCID() { + gl_modem AT AT+CCID +} + + READ_IMEI () { local answer=1 while [[ "$answer" -eq 1 ]]; do