mcu messages stage2 made more clear, add new + old IMEI shown in the end to visualy check

This commit is contained in:
nestire 2024-01-30 16:23:58 +01:00
parent a2770e81c3
commit 68e15a863c
No known key found for this signature in database

View File

@ -34,19 +34,24 @@ sleep 1
new_imsi=$(READ_IMSI)
if [[ "$old_imsi" == "$new_imsi" ]]; then
mcu_send_message "WARNING: Old IMSI equals new IMSI."
mcu_send_message "WARNING: Old IMSI equals new IMSI. Did you swap the SIM?"
sleep 3
fi
old_imei=$(READ_IMEI)
mcu_send_message "Setting random IMEI"
timeout 15 python3 /lib/blue-merle/imei_generate.py -r
new_imei=$(READ_IMEI)
if [[ "$old_imei" == "$new_imei" ]]; then
mcu_send_message "WARNING: Old IMEI equals new IMEI."
sleep 3
else
#FIXME old_imei is not the real old imei because in stage1 its already generated a new one
# so this is a bit missleading but for the prupose of visualy see the change it works
mcu_send_message "IMEI Old:...... ${old_imei}IMEI New:...... ${new_imei}"
sleep 5
mkdir -p /tmp/modem.1-1.2
echo "$new_imei" > /tmp/modem.1-1.2/modem-imei
fi