Project

General

Profile

SIMCardDetection » History » Version 3

Denis 'GNUtoo' Carikli, 02/03/2022 01:30 PM
Rework the article with the new information on status messages

1 1 Denis 'GNUtoo' Carikli
h1. SIMCardDetection
2
3 3 Denis 'GNUtoo' Carikli
h2. Tests with simtrace 1 or simtrace 2
4 2 Denis 'GNUtoo' Carikli
5 3 Denis 'GNUtoo' Carikli
About every 30 seconds (29 seconds in some devices) the modem asks about the SIM.
6 1 Denis 'GNUtoo' Carikli
7 3 Denis 'GNUtoo' Carikli
If we observe the traffic with wireshark we can measure the time precisely and we see that when there is no activity, the modem sends packets like that to the SIM card every 30 seconds: @GSM SIM	65	ETSI TS 102.221 STATUS@
8 1 Denis 'GNUtoo' Carikli
9 3 Denis 'GNUtoo' Carikli
Affected devices:
10
* Galaxy Nexus (GT-I9250)
11
* Galaxy SIII (GT-I9300)
12
* Probably many more
13 1 Denis 'GNUtoo' Carikli
14 3 Denis 'GNUtoo' Carikli
In addition some devices also have a GPIO that can be used to detect the removal of the SIM card (see [[XMMBoot#SIM-card-presence-detection]] for more details)
15 2 Denis 'GNUtoo' Carikli
16 3 Denis 'GNUtoo' Carikli
On the Galaxy SIII (GT-I9300), after removing the SIM from SIMtrace (not to trigger the GPIO) after a small amount of time (few minutes?) the modem managed to understand that the SIM card was gone.
17 2 Denis 'GNUtoo' Carikli
18 3 Denis 'GNUtoo' Carikli
h2. Use cases
19 2 Denis 'GNUtoo' Carikli
20 3 Denis 'GNUtoo' Carikli
It might have been interesting to leave your phone at home during a protest for instance but get the SIM card out to be able to call from another phone in case of issues. However that doesn't work as the modem checks if the SIM card is still there.
21
22
With Simtrace 2, it might be possible to remove the SIM and still make simtrace2 send status messages, but at that point getting a second SIM card is probably much easier and cheaper for most people.
23
24
However since the modem sends regular status update commands to the SIM, we can use that to see if the modem firmware is not crashed. That information is interesting for the modem bringup work on top of a mainline kernel.