EEVblog® Electronics Community Forum

Electronics => Microcontrollers => Topic started by: peter-h on April 27, 2026, 01:01:13 pm

Title: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on April 27, 2026, 01:01:13 pm
How to get time into an embedded box has always been tricky. The options are obviously
- GPS
- timecode signals
- internet (NTP)
- RDS (or other VHF source)
- some super accurate internal clock

One can deffo get time (maybe only local time, not UTC) from the GSM towers but as far as anybody is willing to say publicly this needs a valid SIM card.

I think one can do it without valid (i.e. current contract or prepaid PAYG) SIM card, but nobody who knows the GSM system is willing to discuss it. I've raised this Q over many years in various places. Those who know are keeping quiet because ways to hack GSM (which includes intercepting or transferring calls) are supposed to be confidential. The evidence supporting this idea is that phones without SIM cards (or with expired ones) can still make emergency calls, requiring them to connect to a nearby network and synchronize, which includes updating the time.

But it is obvious that the relevant signals exist if other phones are connecting to a given tower, and this could be picked up.

It has been touched on before
https://www.eevblog.com/forum/chat/cheapest-way-to-get-datetime-from-gps/msg5360249/#msg5360249 (https://www.eevblog.com/forum/chat/cheapest-way-to-get-datetime-from-gps/msg5360249/#msg5360249)
but without any actual information posted.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: PA0PBZ on April 27, 2026, 02:06:18 pm
It looks like NITZ (Network Identity and Time Zone) is a NAS message which is only transmitted after the phone registers to the network, broadcast messages don't contain this information. At least this is what I could find after a bit of searching. Making an emergency call means registering, something you can't do without a SIM card or without making an emergency call.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on April 27, 2026, 02:42:48 pm
I would think, with so many phones connecting and disconnecting while people are driving in and out of the range of a given tower, there would be ample opportunities to pick up that stuff.

You will have an RTC anyway, probably with a ~20ppm grade of xtal, so you need the time only every x days, not every minute.

And even if you don't have an RTC and are running a "software" RTC, your main xtal (25MHz etc) can still be 20ppm sort of level (you just must not power down the target, and in many applications that is OK).

The knowledge how to do this must be out there.

Probably, nobody will make a chip for this, like they have done for the timecode signals (multi standard).
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: PA0PBZ on April 27, 2026, 03:58:23 pm
So basically you'd have to listen in on communication between the base and other phones. I'm sure it can be done and also the knowledge will be out there, but it's not difficult to understand why you won't get this information easily. I remember when cell phones where rather new, I think it was the NMT system on 450MHz, all the data about the (analog) protocol was out there. So I wrote a basic (hey, it's a long time ago) program to create the tones, filled in a random originating number and a destination and I could make phone calls using a 70cm amateur transceiver ;)
Possibly the protocol information is still out there for the current systems, but it would not surprise me if the data between phone and base is quite good encrypted and as long as you don't have the money to spend that some intelligence agencies have it will be a hard task!
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on April 27, 2026, 04:03:51 pm
That is really interesting :)

It is definitely not "securely" encrypted because there are semi-commercial products for intercepting GSM calls. It isn't AES256+RSA or anything like that. The basic crypto, A5/*, is easily cracked.

But to get the time, you may not need this. You are not interested in the calls, the numbers, etc.

Actually, I am probably not wrong, because typing
do you need to crack A5 encryption to get the time from the towers?
into google digs out a ton of material which seems pretty specific ;)

Specifically it states:
AT Commands: If you are using a cellular modem (like those from Quectel or SIMCom), you can retrieve this unencrypted data using simple commands like AT+QNITZ=1 or AT+CCLK?. This triggers the modem to pull the current network time that it has already received from the tower's unencrypted broadcasts.

However, it also states: "A valid SIM card must be registered with the network, as NITZ is a network-provisioned service." So this key ambiguity remains. Maybe the way to approach it is the unofficial one, using an SDR to pick up the RF signals and decoding them to extract the time. More specifically: "Tools like gr-gsm can sniff the Broadcast Control Channel (BCCH) of a tower." So one would need to research that information... "More technical details can be found in the ETSI TR 121 905 V6.7.0 (2004-06) document."
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: fchk on April 28, 2026, 02:37:46 pm
However, it also states: "A valid SIM card must be registered with the network, as NITZ is a network-provisioned service." So this key ambiguity remains. Maybe the way to approach it is the unofficial one, using an SDR to pick up the RF signals and decoding them to extract the time. More specifically: "Tools like gr-gsm can sniff the Broadcast Control Channel (BCCH) of a tower." So one would need to research that information... "More technical details can be found in the ETSI TR 121 905 V6.7.0 (2004-06) document."

Is this for a commercial product? Then you may be liable for fraudulent obtaining of services. Obtaining the time from a cellular network is a paid service requiring a SIM, and obtaining it via breaking a crypto is a felony.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: radiolistener on April 28, 2026, 02:47:29 pm
I think it’s better to use GPS — it provides more precise time and doesn’t depend on network access or a SIM card. Also it has wider coverage...
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on April 28, 2026, 03:01:33 pm
Quote
Is this for a commercial product? Then you may be liable for fraudulent obtaining of services. Obtaining the time from a cellular network is a paid service requiring a SIM, and obtaining it via breaking a crypto is a felony.

No product. I am just curious.

A "felony"? That is a US concept. Maybe Germany has it too? Anyway, as probably shown above, no crypto is involved. The signal is in plain text. Otherwise, the use of a phone with no SIM to make an emergency call would be a "felony" too ;)

Quote
I think it’s better to use GPS

For sure, and I have already done that, for 32F4 RTC sync, and it works great, but even though you don't need a 3D fix, or even a 2D fix, the signal is sometimes too weak. GSM has a lot more penetration indoors.

I wonder if getting the GSM time has to involve multi-frequency? There is 900MHz, 1800MHz, etc.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: ftg on April 28, 2026, 03:11:21 pm
If one wants to receive the BCCH frames in the clear and wants a cheaper option to SDR's, here's two papers of interest:

"Receiving GSM broadcast channels with an ultra-low power sub-GHz transceiver"
https://ieeexplore.ieee.org/document/8230869

"Enhanced GSM Broadcast Receiver Using the Phase Output of a Sub-GHz Transceiver"
https://ieeexplore.ieee.org/document/8541538

The transceiver used is a Texas Instruments CC1200.

GSM has the benefit of being terrestrial and thus more likely to work indoors, compared to GNSS systems that usually have poor indoor coverage.

Dunno if the BCCH, SCH and FCCH frames have enough information to get accurate time and date.
But with a database of cellid's one could at least do rudimentary positioning with them.
Interesting exercise in any case.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: nctnico on April 28, 2026, 03:12:06 pm
I think it’s better to use GPS — it provides more precise time and doesn’t depend on network access or a SIM card. Also it has wider coverage...
Nope. GPS is very prone to all kinds of attacks. GPS can't be relied on at all for anything critical. Using cell towers is a much more viable approach. It seems Ublox have modules which can get time from LTE towers without needing a SIM card. The dataframes used by LTE to get layer1 going (like sending tower IDs) is not encrypted and AFAIK a timestamp is included in some of the frames.

https://wsts.atis.org/wp-content/uploads/2023/03/06-Andrea-Dalla-Torre.Accurate-Time-Distribution-Using-Cellular-Radio-Signal.pdf (https://wsts.atis.org/wp-content/uploads/2023/03/06-Andrea-Dalla-Torre.Accurate-Time-Distribution-Using-Cellular-Radio-Signal.pdf)
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: Doctorandus_P on April 28, 2026, 04:10:38 pm
Some different approaches:

Mains frequency has always been very stable long term. There were some rumors of stopping that, as clocks with synchronous motors are becoming less common, but I don't know if that part got dropped or not. But you would still have to set the time once.

An astronomical clock combined with a light sensor may be an option. It could select the "bright days" and ignore the unexpected thunderstorms. With an astronomical clock you can program in a relatively narrow window to detect sunrise / sunset.

Some of the real time clocks can be as accurate as a handful of seconds per year.

And there are still the good old "time sender" radio bacons. DCF in Germany, and I believe that both France and UK have their own similar systems.


Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on April 28, 2026, 05:20:23 pm
The doc posted by ncnico says it directly: no SIM card required, and it is obviously not illegal. And you get UTC.

I might do an experiment. I spent ages integrating the U-BLOX NEO-M9N which has a totally weird (bodged) SPI interface (I posted about it here) but I got it running OK eventually. So maybe a mobile modem from U-BLOX will be similar. I wonder which one might be best for this?
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: 5U4GB on April 29, 2026, 05:09:42 am
It looks like NITZ (Network Identity and Time Zone) is a NAS message which is only transmitted after the phone registers to the network, broadcast messages don't contain this information. At least this is what I could find after a bit of searching. Making an emergency call means registering, something you can't do without a SIM card or without making an emergency call.

Does this mean registering with a carrier you have an account with or simply registering with any carrier for emergency calls only?  If the latter can you drop in a $5 no-balance SIM and use it for time info only?
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on April 29, 2026, 05:49:05 am
The link above
https://www.eevblog.com/forum/microcontrollers/can-one-extract-time-from-gsm-mobile-data-without-a-sim-card/msg6249495/#msg6249495 (https://www.eevblog.com/forum/microcontrollers/can-one-extract-time-from-gsm-mobile-data-without-a-sim-card/msg6249495/#msg6249495)
explicitly says that you can get LTE time to a high precision, without a SIM.

LTE is not the old basic GSM; it is a much newer thing. But probably all towers in the developed world support LTE.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: 5U4GB on April 29, 2026, 06:34:25 am
Obtaining the time from a cellular network is a paid service requiring a SIM, and obtaining it via breaking a crypto is a felony.

Lest the people from the Ministry of Housinge (https://youtu.be/M5MnyRZLd8A?t=164) come round with the detector vans and find you?
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: Jeroen3 on April 29, 2026, 07:25:29 am
Short google fu learns that cellular networks can emit gps time data in SIB16.
3GPP TS 36.331 version 15.3.0 (https://www.etsi.org/deliver/etsi_ts/136300_136399/136331/15.03.00_60/ts_136331v150300p.pdf)

Quote
SystemInformationBlockType16
The IE SystemInformationBlockType16 contains information related to GPS time and Coordinated Universal Time
(UTC). The UE may use the parameters provided in this system information block to obtain the UTC, the GPS and the
local time.

How and when this is broadcast is not clear. Find a android phone and install wireshark on it?

I suspect this should be possible though, as you should also be able to register an esim.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: voltsandjolts on April 29, 2026, 07:49:56 am
From attached document regarding 5G;

Quote
Over-the-air time synchronization to UTC
The process of synchronizing a 5G device to the absolute 5G network time, typically UTC, is done by direct
messaging over the air interface. 5G uses a simple but accurate method to communicate time of day to
the device. The device (UE) identifies so-called system frames by monitoring the air interface, each with a
system frame number (SFN). Contained within the 5G system information block 9 (SIB9) is the information
related to GPS time and UTC. SIB9 messages are broadcast to inform devices of the exact time at the
boundary between two SFNs. Hence, when the device has locked its internal clock to the system frame
pacing, it can use this message to set its absolute time.
SIB9 contains the time information as well as flags to assist the device to understand the local time
as shown in Figure 6. Reading the SIB9 and acquiring the time-of-day alignment can be performed by
any device even if not subscribed to the 5G service
. It only requires a 5G-capable receiver in the device
as SIB9 can be broadcast in the cell. For fully subscribed devices, the network may also provide the
timing information to each device by means of dedicated signaling (using Radio Resource Control (RRC)
messages).

Does anyone know of a 5G modem that would allow access to the SIB9 time information, relatively cheaply?
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on April 29, 2026, 04:15:28 pm
5G is far from universally available, however.

Maybe in 10 years' time...

It is also very short-range. The old 3G/4G is the way to go if using "mobile data" signal for getting time. Plain old GSM would be the ultimate way (for sheer coverage) but it seems to be a bit harder...
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: voltsandjolts on April 29, 2026, 04:59:31 pm
System Information Block 9 (SIB9) is also available in 4G systems, but as yet I haven't seen it in writing that it doesn't require service subscription.
Ahh, hold on, SIB9 has different info in different network generations.  Chat GPT says that;

5G NR explicitly standardized rich time info in SIB9. The key architectural change is that 5G NR formalized civil-time broadcast much more explicitly in SIB9, whereas 3G/4G relied more heavily on post-registration signaling like NITZ.

Generation Dedicated broadcast UTC/local-time SIB?Readable before subscription/attach?
5G NRYes — SIB9Usually yes
4G LTEPartial / indirectSome parts yes
3G UMTSPartial / indirectSome parts yes

System Information Blocks are broadcast over cell-common channels. A device can usually read them before authentication, SIM validation, or service attachment.
That means a UE/phone/modem with compatible radio hardware and protocol capability can often decode SIBs even with no SIM, an inactive SIM, or no paid subscription.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on May 02, 2026, 10:13:52 am
Isn't that basically saying that if you build an RF receiver which can hop around the frequencies (there aren't too many) until it finds somebody's phone registering, and pick UTC out of that packet, you can do it?

That, however, is kind of obvious. That stuff is not encrypted.

"AI" just goes around looking for patterns in other discussions on the internet. And for sure others have been up this path.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: voltsandjolts on May 02, 2026, 10:36:28 am
After a mobile device with subscription has authenticated to a base station, everything is encrypted. But seems like 5G has a nice standard SIB9 packet for UTC availability to everyone, inc non-subscribers. So in 10 years it should be widely available as coverage improves.

But for the older gen's it seems not standardised. But Jeroen3 above pointed out that UTC is in 3G SIB16, and AFAIK all SIB data is openly available without subscription.

The next question is which modems have an api allowing access to SIB data, prior to authentication.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on May 02, 2026, 01:38:15 pm
And which modems are cheap. I had a quick look but there are lots of potential modules; some pricey. OTOH you can get the U-BLOX NEO-M9N GPS for a fiver and I have all the code for SPI, so that is where I would start looking.

One can probably build an SDR cheaply but it is a lot of software to do it that way.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: mike449 on May 05, 2026, 12:21:59 am
One way to get time from cell network is an old Android phone without SIM. I know from experience that it can get the time even when not connected to WiFi. The RF part of the equation is solved. This kind of phone is usually free or very low cost (unless you do a commercial project and need 100s of them) . Now the next question is how to get this time out of the phone over USB or Bluetooth.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on May 05, 2026, 06:52:40 am
Problem is we don't know whether it is getting it from GSM, GPRS, 3G, 4G, 5G. Probably not 5G :)

Useful data point still.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: indeterminate on May 10, 2026, 11:38:30 pm
Your missing sumthing hear
The mobile device is getting its time signal from a base station that using a  GPS disciplined oscillator
so while your time is derived from a rubidium reference in the base station that reference is kept in sync with all the other base stations & UTC using the satellite navigation systems.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: peter-h on May 11, 2026, 10:49:47 am
The above post seems to not make any sense.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: gargle on May 11, 2026, 11:25:02 am
just be careful, GPS and cell station(UTC) haven't the same time. there is several seconds between.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: voltsandjolts on May 11, 2026, 12:28:21 pm
Your missing sumthing hear
The mobile device is getting its time signal from a base station that using a  GPS disciplined oscillator
so while your time is derived from a rubidium reference in the base station that reference is kept in sync with all the other base stations & UTC using the satellite navigation systems.

I'm guessing your point is 'you may as well use gps, because mobile time is gps derived anyway'.
However, the mobile time signal has much better availability inside buildings.
Or are you trying to make a different point?
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: indeterminate on May 12, 2026, 12:07:41 pm
Quote
I'm guessing your point is 'you may as well use gps, because mobile time is gps derived anyway'.
Yes
But you raise a good point about in building availability
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: GromBeestje on May 12, 2026, 05:00:16 pm
Also, the smart phone without sim card mentioned earlier, is it possible it grabs time from GPS in such case?
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: krakatit on June 20, 2026, 01:00:54 pm
Since the question says "extract a time" it is not clear what "time".
Without a SIM it is not easy, but if we allow a "time" to be a relative flow of oscillations it is possible to get precise timing from the VCXO of every GSM transceiver even without active SIM network registration. The 13 or 26 MHz VCXO is adjusted with every FCCH frame to a BTS GPS or atomic clock disciplined oscillator, the relative accuracy is +-50ppb (cca +-45Hz@900MHz, twice at the phone receiver). Short term variance (phase noise) is high but in a long term is well averaged (said to be < 10^-12), so MCU clock derived from this VCXO and local real time set once is pretty precise.
Title: Re: Can one extract time from GSM mobile data, without a SIM card?
Post by: voltsandjolts on June 20, 2026, 01:04:04 pm
Since the question says "extract a time" it is not clear what "time".

It's quite clear if you read the OP, this topic is about real time, not just frequency.