A cheap RTL-SDR dongle, a Windows laptop, and one GNU Radio flowgraph, nbiot_rx_plus.grc. It finds an NB-IoT carrier at 935.4 MHz, locks onto it, works out which cell is talking, and reads everything that cell broadcasts to every device in range: its frame clock, its name, its network, and its rules for joining and for paging sleeping meters. Then it goes further. It watches the control channel to see the cell paging devices and answering their knocks, and it subtracts the cell from the signal to find a quieter neighbour hiding underneath. This document covers how the signal is built, how each block of the flowgraph takes it apart, and what the cells told me.
Somewhere above my house a tower is talking to the electricity meters, water meters and trackers around me. It never stops. Every 10 milliseconds it sends a sync pulse, every 10 milliseconds it repeats a piece of its frame number, and every couple of seconds it tells anyone listening who it is and how to join. None of it is encrypted, because a meter that has just woken up has no keys yet. It has to be able to read all of this cold.
That broadcast is NB-IoT (Narrowband Internet of Things): a 180 kHz slice of LTE, cut down for devices that send a few bytes a day and run for ten years on a battery. In my area, Telkomsel runs it in the old 900 MHz GSM band. 180 kHz fits comfortably inside an RTL-SDR's 2 MHz, so this is one LTE-family signal a 10-dollar dongle can actually decode end to end.
I wanted to see it with my own eyes, and as usual I wanted to build the decoder myself in GNU Radio on my Windows laptop, so that every step is something I can look at. No srsRAN, no OOT modules, no compiled helpers.
The first version of the flowgraph read only the broadcast. This version, nbiot_rx_plus, adds three things:
- paging: the moments the tower wakes up a sleeping device;
- random access: the tower's answers when devices knock on the door, which give away how far each device is from the tower;
- neighbour cells: once cell 260 is fully decoded, I can rebuild its signal, subtract it, and look at what is left underneath.
The document is laid out like this:
- Parts 1 to 4 explain the signal: where it sits, how it is modulated, how time is cut up, and what goes in each square of a frame.
- Parts 5 to 9 follow the samples through the flowgraph: front end, sync, FFT, channel estimation, error correction.
- Parts 10 to 14 decode the broadcast messages, line by line, exactly as my console printed them.
- Part 15 watches the control channel: paging and random access.
- Part 16 subtracts cell 260 and finds its neighbour, PCI 259.
- Part 17 is about frequency reuse, and what the per-subframe SINR shows about it.
- Part 18 walks through the GUI, panel by panel, from my screenshots.
- Part 19 is the runs in numbers.
A few DSP and LTE words will show up (OFDM, QPSK, resource element, CRC, Viterbi, ASN.1 and so on). I explain each one the first time I use it. Where I'm interpreting rather than reading a number straight off the log, I say how sure I am.
- RTL-SDR dongle (R820T), tuned to 935.7 MHz, 1.92 MS/s, gain 30 dB, ppm correction 34 (the same value I use in Gqrx).
- A simple antenna for the 900 MHz band, indoors.
- Windows laptop with radioconda (GNU Radio 3.10). Stock blocks, two Embedded Python Blocks, and one Python Module block holding the maths. numpy inside, plus pycrate to print the ASN.1 messages.
- 3GPP TS 36.211, 36.212, 36.213, 36.321, 36.331 and 36.304: the LTE/NB-IoT specifications for the physical layer, the coding, the procedures, the MAC layer, the radio messages and idle-mode behaviour. Everything the decoder does comes from these.
The files:
- nbiot_rx_plus.grc: the flowgraph. It's self-contained: the Python Module and both Python blocks live inside it.
- nbiot_rx_plus_explained.md: the short technical note.
- nbiot_pe_*.svg: the diagrams in this document, plus nbiot_pe_gui.svg, my two GUI screenshots stitched into one. Keep them in the same folder.
Same rule as every one of my GNU Radio projects:
Put each operation in a stock block if one exists. Use an Embedded Python Block (EPB) only for what GNU Radio cannot do natively.
For NB-IoT that split falls in an interesting place. These are all stock blocks: tuning, filtering, gain control, the FFT that turns time into subcarriers, picking out the 12 subcarriers that belong to NB-IoT, and all the displays. None of the following has a stock block, so they are Python: finding the sync pulse at an unknown frequency, cutting the stream into exactly aligned OFDM symbols, estimating the radio channel, undoing the error-correcting code, following the broadcast timetable, blind-decoding the control channel, and rebuilding a cell's signal to subtract it.
Here's the whole receiver on one page:
How to read it:
- Plain boxes are stock GNU Radio blocks.
- Double-bordered boxes are my two Embedded Python Blocks.
- A dashed outline groups the symbols that live inside one GRC block. The mixer and low-pass filter, for example, are both the Frequency Xlating FFT Filter.
- Boxes with a small screen icon are displays.
- Solid arrows carry samples. Dashed arrows with open heads carry messages: decoded text, constellation points, SINR values.
Notice the shape. Samples go into Python (the Sync block), come out again into stock blocks for the FFT, and go back into Python (the Decoder block). The Sync block only has to do the one thing the FFT block can't: decide exactly where each OFDM symbol starts. Once it has, the FFT is an ordinary stock FFT.
The Decoder block is where all the new work in nbiot_rx_plus lives. Behind the same input it runs three jobs: the broadcast decoder (Parts 6 and 8 to 14), the control-channel listener (Part 15) and the neighbour search (Part 16). It also feeds one more display than before: an activity raster showing which subframes the cell actually transmitted in.
Band 8 is the 900 MHz band: towers transmit between 925 and 960 MHz. It was GSM territory for decades, and operators are slowly reusing it for LTE and NB-IoT. Telkomsel's NB-IoT anchor carrier here is at 935.4 MHz. My RTL-SDR, tuned 300 kHz above it, sees 1.92 MHz of the band around it (panel a).
The carrier runs in standalone mode, which my decoder confirmed from the MIB-NB (Part 10). It isn't tucked inside an LTE carrier ("in-band") or in an LTE carrier's edge ("guard-band"). It has its own 200 kHz slot, exactly like one old GSM channel. Standalone carriers sit on the 100 kHz raster, so 935.4 is a legal spot; in LTE channel numbers it's EARFCN 3554.
Panel (b) is traced from my GUI screenshot: one flat-topped block, 180 kHz wide, with steep skirts. The floor at −120 dB is the stopband of my own channel filter, not the band's noise, because the Frequency Sink sits after that filter.
Zoom in 200 times and the 180 kHz block is 12 subcarriers, 15 kHz apart (panel c). Each one is a little carrier of its own, and each one carries one number per OFDM symbol (Part 2). They overlap, as the humps in the picture do, but the peak of each hump falls exactly on the zeros of all the others, so they don't disturb each other. That trick is called orthogonality. It only works if my receiver lands within a small fraction of 15 kHz of the right frequency, which is why the Sync block spends so much effort on frequency (Part 6).
One detail matters later: the subcarriers sit at (k − 5.5) × 15 kHz from the centre, for k = 0 … 11. No subcarrier sits on 935.4 MHz itself; everything is shifted by half a subcarrier (7.5 kHz). Part 7 shows the single stock block that undoes this.
Older networks give neighbouring cells different frequencies: reuse 3, 4 or 7, like colouring a map so no two neighbours share a colour. NB-IoT doesn't have spectrum to spare (Telkomsel wouldn't give it seven 200 kHz slots), so every NB-IoT cell uses the same 935.4 MHz. That's frequency reuse 1 (panel d).
What keeps the cells apart is the cell ID, the PCI (physical cell identity, 0 to 503). The PCI changes:
- the NSSS sequence, which is how a receiver learns which cell it hears (Part 6);
- where the reference signals sit in the grid (PCI mod 6, Part 8);
- the scrambling codes on the broadcast and data channels (Part 9).
The cell I hear best is PCI 260. In a normal cell search nothing else came close enough to be listed. With nbiot_rx_plus I can do better: subtract cell 260, search what is left, and there is PCI 259, a second sector of the same base station (Part 16). The other cells in panel (d) are question marks, because I haven't heard them.
How sure am I that this is reuse 1 and not just one lonely carrier? High. There are four independent pieces of evidence:
- The cell's own SIB3 lists no other frequency to search (Part 13).
- My SINR dips exactly in the subframes every cell broadcasts at once (Part 17).
- PCI 259 sits on the very same frequency, decoded right underneath cell 260 (Part 16).
- NB-IoT networks are designed this way.
OFDM (orthogonal frequency-division multiplexing) sends many slow subcarriers side by side instead of one fast carrier. Panel (a) is the whole idea as a block diagram:
- The tower picks one complex number X[k] for each of the 12 subcarriers.
- It places them in the middle of a 128-bin grid and runs an inverse FFT.
- It adds a cyclic prefix and sends the result as one OFDM symbol, 66.7 µs long (one full cycle of 15 kHz).
- The radio path multiplies and delays it, h[n], and adds noise, w[n].
- My receiver does the opposite: the Sync block cuts off the prefix, a 128-point FFT turns time back into frequency, and I keep the 12 bins that matter.
As long as the FFT window holds one whole symbol, the result is beautifully simple: Y[k] = H[k] · X[k] + W[k]. Each subcarrier is just multiplied by one number. Part 8 measures those numbers and divides them out.
At my sample rate of 1.92 MS/s, one symbol is exactly 128 samples. A 128-point FFT gives me 128 bins, 15 kHz apart, and the 12 in the middle (bins 59 to 70, panel c) are NB-IoT. 1.92 MS/s is the smallest standard LTE rate, and the RTL-SDR handles it happily.
In front of each symbol, the tower sends a copy of the symbol's own last few microseconds: the cyclic prefix (CP). At 1.92 MS/s that's 10 samples for the first symbol of each slot and 9 for the others, so 7 symbols make 10 + 6 × 9 + 7 × 128 = 960 samples = 0.5 ms, one slot (panel b).
Why waste the time? Because the signal reaches me by several paths (straight from the tower, bounced off buildings), and the bounced copies arrive a few microseconds late. Without a prefix, the end of one symbol would smear into the start of the next. With it, as long as I start my FFT window somewhere inside the prefix, the window contains one whole symbol and only that symbol. The close-up in panel (b) shows the copy and where my window starts: 2 samples into the prefix, for margin.
Each subcarrier in each symbol is one resource element (RE), one square of the grid in Part 4. For data, the tower puts one of four values in it: (±1 ± j)/√2. The first bit picks the sign of the real part (I), the second the sign of the imaginary part (Q), with bit 0 meaning "+" (panel d). That's QPSK, quadrature phase-shift keying: 2 bits per RE.
The NB-IoT downlink uses nothing denser. LTE goes up to 256-QAM (8 bits per RE), but NB-IoT is built for meters in basements, and QPSK is the most robust choice that still carries data. Robustness beats speed here. The four dots of my constellation plots are these four values.
NB-IoT time is a set of nested counters, and the decoder has to know all of them, because every channel is scheduled by them:
| Unit | Length | Count | What it's for |
|---|---|---|---|
| Symbol | 66.7 µs + CP | 7 per slot | one column of the grid |
| Slot | 0.5 ms | 2 per subframe | the cyclic-prefix pattern repeats |
| Subframe | 1 ms | 10 per frame | the unit things are scheduled in |
| Frame | 10 ms | SFN 0 … 1023 | NPSS once per frame, so this is the "beat" |
| Hyperframe | 10.24 s | H-SFN 0 … 1023 | for devices that sleep for hours |
| Hyperframe cycle | 2 h 55 min | – | everything repeats |
The SFN (system frame number) counts frames 0 to 1023, then wraps. The H-SFN (hyperframe number) counts those wraps. A smart meter in deep sleep (eDRX, the extended sleep mode NB-IoT is famous for) can be told "wake up in hyperframe 400" and sleep for most of three hours.
Neither counter is ever sent whole in one place:
- The SFN is split between the MIB-NB message and where in a 640 ms cycle that message is received: 12 × 64 + 14 = 782.
- The H-SFN is split between the MIB-NB (2 low bits) and SIB1-NB (8 high bits): 81 × 4 + 3 = 327.
Parts 10 and 11 show how I put them back together.
A frame is 140 symbols × 12 subcarriers = 1680 squares, and each kind of square has a job. Panel (a) is an even frame of cell 260:
| Name | Where | What it carries |
|---|---|---|
| NPSS (narrowband primary sync signal) | subframe 5 of every frame, symbols 3–13, subcarriers 0–10 | the same 11-number Zadoff-Chu sequence in every cell on Earth: "a frame starts here" |
| NSSS (secondary sync) | subframe 9 of even frames, all 12 subcarriers | a sequence chosen by the PCI: "I am cell 260". It also changes every 2 frames, which hints where I am in an 80 ms cycle |
| NRS (narrowband reference signal) | 8 squares in each subframe that has them, at PCI-dependent positions | known values, so the receiver can measure the radio path (Part 8) |
| NPBCH (broadcast channel) | subframe 0 of every frame, 100 squares | the MIB-NB: frame number, where SIB1 is, operating mode (Part 10) |
| NPDSCH carrying SIB1-NB | subframe 4 of even frames (cell 260 has an even PCI) | who the network is and how to join (Part 11) |
| NPDCCH / NPDSCH | subframes 1–3 and 6–8, and 9 in odd frames | control and data when scheduled: the SI messages (Parts 11 and 13), pages and random access answers (Part 15) |
Panel (b) zooms into subframe 0. Symbols 0 to 2 are left empty (that's where an LTE carrier would put its control region). In the other 11 symbols:
- The grey squares are the NPBCH.
- The hatched squares are reserved: NB-IoT always leaves room there for a second antenna port's NRS and for LTE's reference signals, so that the same NPBCH layout works in every mode.
- The black squares are cell 260's pilots.
11 symbols × 12 subcarriers is 132 squares; take out the 32 reserved and pilot squares and 100 remain for the MIB-NB.
For cell 260 (260 mod 6 = 2), the NRS sit on subcarriers 2 and 8 in symbols 5 and 12, and on subcarriers 5 and 11 in symbols 6 and 13. A cell with a different PCI puts them somewhere else, which is the detail Part 17 hangs on.
That's the whole signal. Now the receiver.
The top row of the big-picture diagram. Four stock blocks get the radio signal into shape:
- Soapy RTLSDR Source tunes the dongle to 935.7 MHz, 300 kHz above the carrier, at 1.92 MS/s, with my 34 ppm correction. Why not tune straight to 935.4? Every RTL-SDR has a spike at the exact centre of its spectrum (DC offset and I/Q imbalance). Tuning 300 kHz away moves that spike far outside the 180 kHz I care about.
- Frequency Xlating FFT Filter, drawn in the diagram as what it is: a mixer, e^(−j2π f₀ n / fₛ) with f₀ = 300 kHz, followed by a low-pass filter. The mixer moves NB-IoT to 0 Hz; the filter keeps ±100 kHz with a 30 kHz transition band. It keeps the 1.92 MS/s rate, because the FFT needs exactly 128 samples per symbol. The filter is a little wider than 180 kHz so it doesn't eat the outer subcarriers. The block also has a Fine tune slider, which I leave at 0: the Sync block finds the exact frequency by itself.
- AGC2, slow (about 50 ms), keeps the signal level steady for the displays and the correlator. It's slow enough not to change gain inside an OFDM symbol, and anyway the channel estimate in Part 8 absorbs any level change.
- Frequency Sink shows the spectrum, centred on 935.4 MHz: the flat-topped block of Part 1.
The startup log shows GNU Radio enlarging three buffers (set_min_output_buffer … 2097152 on the AGC). That's deliberate: the decoder sometimes thinks for a while (a Viterbi run, a blind control-channel search, an ASN.1 decode), and a big buffer lets the dongle keep streaming while it does, instead of dropping samples. nbiot_rx_plus thinks harder than the first version, so this matters more now.
There's also a small display branch, the middle row of the big-picture diagram, built only from stock blocks:
- Keep 1 in 8 brings the rate down to 240 kS/s.
- An FFT Filter whose taps are the NPSS waveform acts as a matched filter: h_NPSS[n].
- |·|² of its output is divided by the signal energy over the same length: a second |·|² and a moving average Σ_L.
- The result goes into a Time Raster, one 10 ms row per frame.
That's a stock-block NPSS correlator. If there's an NB-IoT cell, a vertical line appears, one dot per 10 ms row. It plays no part in decoding. It's there so I can see the sync before believing any decoder. (fft::import_wisdom :error at startup is harmless: FFTW just has no saved plans yet.)
The first Python block turns an endless stream of samples into neat frames: 140 symbols × 128 samples, each cut at exactly the right place, with the frequency error removed. Everything downstream depends on this being right to within a sample.
The NPSS is my anchor. It's always the same, always in subframe 5, always 11 symbols long: an 11-number Zadoff-Chu sequence (a complex sequence with the useful property that it only matches itself at one exact alignment), with a ± cover code flipping whole symbols (+ + + + − − + + + − +). I know exactly what it looks like in time, so I slide that template along the incoming samples and measure how well they match: the correlation metric, from 0 (nothing) to 1 (perfect match).
The catch is frequency. My dongle's crystal is off by some ppm, and at 935 MHz each ppm is 935 Hz. A template at the wrong frequency rotates against the signal and the match falls apart. So on startup the Sync block runs what panel (a) draws: a bank of correlators, one per frequency guess, 97 of them covering −12 to +12 kHz in 250 Hz steps.
- Each guess mixes the signal by e^(−j2π f̂ n / fₛ), runs the NPSS matched filter and normalises by the signal energy.
- It's done at 240 kS/s to keep it fast, and with FFTs, so that each frequency guess is just a shifted copy of the same spectrum.
- The bank averages 4 frames (folded at 10 ms), picks the best time and frequency, and accepts it only if it stands at least 12 times above the median.
- Then a fine search at the full 1.92 MS/s refines both.
My log, first line of the run:
[sync] NPSS found: metric 0.97, CFO +912.8 Hz (+0.98 ppm at 935 MHz), half-subcarrier per-symbol, frame start at sample 12391
- metric 0.97: a near-perfect match. Noise gives about 0.02 (panel c).
- CFO +912.8 Hz: carrier frequency offset, how far the signal is from where I expected it. That's +0.98 ppm on top of my 34 ppm setting: small, and the block removes it.
- half-subcarrier per-symbol: there are two ways a transmitter can produce that 7.5 kHz half-subcarrier shift (Part 1). One restarts its phase at every symbol, the other runs continuously. The spec allows reading it either way, so I search with templates for both and let the signal decide. Telkomsel's carrier uses per-symbol.
- frame start at sample 12391: frame boundary found 6.5 ms into the stream.
Once locked, the block switches to what panel (b) draws. Every frame it cuts the next 10 ms at the expected start, derotates it by the current frequency estimate, and measures the NPSS again within ±3 samples of where it should be. Two errors come out: Δt (timing) and Δf (frequency). Each goes through a small gain and an accumulator, the z⁻¹ feedback loop in the diagram:
- timing: 0.4 of each error, in fractions of a sample, collected until they add up to a whole sample;
- frequency: 0.3 of each residual error.
This is a pair of first-order tracking loops, the same idea as a PLL, just updated once per frame instead of once per sample. Every 5 seconds the block reports:
[sync] locked: NPSS metric avg 0.96 (min 0.94), CFO +918.7 Hz, per-symbol
If the metric stays below a quarter of the first peak for 10 frames in a row, the block declares the NPSS lost and goes back to the acquisition bank, searching narrowly around the last frequency first (Part 19 has the times that happened).
Then the block removes the cyclic prefix, keeping a 2-sample margin, and outputs each frame as 140 vectors of 128 samples. It tags the first vector of each frame, so the decoder never has to guess where a frame begins.
The NPSS says "a frame starts here", but every cell sends the same one. To find out which cell, the decoder (block 2) looks at subframe 9 of even frames, where the NSSS sits: 132 numbers, built from three ingredients chosen by the PCI:
- a Zadoff-Chu sequence of length 131 with root u = PCI mod 126 + 3. For PCI 260 that's root 11;
- a ± pattern, row q of a 128 × 128 Hadamard matrix: q = ⌊PCI / 126⌋ = 2 picks row 63;
- a phase ramp θ that changes every 2 frames (four values, so it repeats every 80 ms).
So there are 504 × 4 = 2016 possible NSSS. The decoder correlates the received NSSS against all of them, adds up several even frames, and compares each PCI's score with the median score (panel d). A real cell stands far above the crowd:
[nsss] candidate cells: PCI 260 (11.0x noise floor)
Cell found: PCI (N_ID_cell) = 260
11 times the floor. To be listed as a candidate, a cell would need at least 2.4 × the floor and half of PCI 260's score; nothing else came close. The neighbours are there, as Parts 16 and 17 show, just much weaker than this one.
The third row of the big-picture diagram. Back in stock blocks, four of them turn each 128-sample symbol into 12 numbers:
- Multiply Const (vector): 128 values exp(jπn/128), drawn as a mixer. This undoes the half-subcarrier shift from Part 1. Multiplying sample n of each window by this ramp moves everything up by 7.5 kHz, so the subcarriers at (k − 5.5) × 15 kHz land exactly on FFT bins. Because the ramp restarts at every window, it matches the per-symbol convention the Sync block detected. One stock block, and no extra Python.
- FFT: 128 points, forward, with shift. That gives 128 frequency bins, 15 kHz apart, with 0 Hz in the middle.
- Vector to Stream → Keep M in N (keep 12 of 128, starting at bin 59) → Stream to Vector. The 12 bins from 59 to 70 are NB-IoT's subcarriers k = 0 … 11. The other 116 bins are filter skirt and noise.
Out comes one 12-number vector per OFDM symbol; 140 of them make one frame of the grid in Part 4. A Time Raster shows 10 log₁₀|X|² of every square live (the "resource grid" display).
The grid I now have is right in shape but wrong in value. Every square has been rotated and scaled by the radio channel: the path from the tower's antenna to mine, plus whatever frequency error is left, plus my dongle's own response. Plot the raw numbers and you get a ring, not four dots (panel c). The decoder (Python block 2) has to measure that channel and divide it out.
The NRS squares exist for exactly this (panel b). Their values come from a Gold sequence (a pseudo-random ±1 sequence) seeded by the PCI and the slot number, so once I know I'm listening to PCI 260 I know exactly what was sent in each of them. Received value × the conjugate of the known value = the channel H at that square.
Panel (a) is the chain the decoder runs on every frame:
- Multiply by r*[l,k], the known pilot value: H at every NRS square, 8 per subframe, up to 72 per frame.
- Remove the spin, e^(−jωt): the leftover frequency error makes H rotate a little from symbol to symbol. Comparing pilots 7 symbols apart on the same subcarrier measures that rotation.
- Average per pilot subcarrier: H at subcarriers 2, 5, 8 and 11.
- Interpolate across all 12 subcarriers, with straight lines between those four points, plus a gentle trend over time. Out comes H[l,k] for every square.
- Divide every data square by its H. With two transmit antennas this step becomes a 2 × 2 solve per pair of squares; the MIB-NB says this cell uses one, so here it's a plain division.
The residual, the leftover scatter of the pilots around the model, is the noise estimate σ². It sets the scale of the soft bits for the error-correcting decoder (Part 9), and Part 17 turns the same measurement into a per-subframe SINR.
After equalisation, the constellation plots show four tight clusters (panel d, and the real thing in my GUI, Part 18). The decoder measures their quality with a blind estimator. It compares the average power with the average of power squared, which differ in a known way for clean QPSK. The result is about 13–14 dB for the whole run.
A meter in a basement may hear the tower 20 dB weaker than I do. NB-IoT protects its broadcasts so heavily that they can still be read there, and that protection is what my decoder has to undo.
For the MIB-NB (panel a):
- 34 bits of message;
- + CRC-16: a 16-bit checksum. It's XORed with a mask that says how many antennas the tower uses (all zeros for one, all ones for two), so a receiver learns the antenna count by seeing which mask makes the CRC pass;
- tail-biting convolutional code, rate ⅓ (TBCC). Panel (b) draws it as what it physically is: a 6-stage shift register and three XOR gates. Each input bit u[n] produces three output bits c₀, c₁, c₂, each the XOR of the bit itself and some of the 6 bits before it. Which taps feed which output is given by the three generator polynomials, 133, 171 and 165 in octal (constraint length 7, the classic LTE code). "Tail-biting" means the register starts loaded with the last 6 bits of the message, so it ends where it began and needs no extra tail bits;
- rate matching: the 150 coded bits are interleaved and repeated to fill exactly 1600 bits, so each bit is sent about 10.7 times;
- scrambling: XOR with a Gold sequence seeded by the PCI. This isn't secrecy. It spreads the energy evenly, and it means a receiver tuned to the wrong cell gets garbage instead of the wrong message;
- QPSK gives 800 symbols, split into 8 blocks of 100, one block per NPBCH subframe. Each block is sent in 8 frames in a row, so the full codeword takes 64 frames = 640 ms;
- Rel-14 rotation: since Release 14, each frame's 100 symbols are also multiplied by ±1 or ±j from another Gold sequence that depends on the frame number mod 8, so the 8 copies of a block are no longer identical.
SIB1-NB and the SI messages follow the same pattern with a 24-bit CRC: 208 bits + 24 = 232, coded to 696, rate-matched to 2560 bits = 8 subframes × 160 squares × 2 bits (each subframe has 168 squares minus 8 NRS), and repeated up to 16 times. Pages and random access answers use the same code too (Part 15).
My decoder walks the chain backwards (panel c), but it never decides bits early. It works with soft bits (LLRs, log-likelihood ratios): a positive number means "probably 0", a negative one "probably 1", and the size says how sure. Equalised QPSK gives two soft bits per square for free: the real and imaginary parts, divided by the noise estimate.
Then, in order:
- undo the Rel-14 rotation;
- flip the signs where the scrambler flipped bits;
- add up every copy of every bit (repetitions, all 8 frames of a block, several SIB1 repetitions if needed), so that the noise averages out and the signal adds up;
- run a Viterbi decoder, which finds the most likely path through the code's 64 states (for tail-biting, I run it on the codeword wrapped around itself);
- finally, check the CRC.
The CRC is the judge. If the 16 or 24 check bits don't match, nothing is printed and the decoder waits for more copies. So every value in my log is bit-exact: it passed a checksum computed by the tower.
To read the MIB-NB I have to add the 8 frames of each block into the right block's slot. To do that I need to know where the 640 ms cycle starts. And that's encoded in the frame number, which is inside the MIB-NB. Chicken and egg.
So the decoder guesses (panel c). Every hypothesis combines three guesses:
- "the cycle started o frames ago";
- "one or two antennas";
- "Rel-13 or Rel-14 rotation".
The NSSS already told me which frames are even, which halves the offsets to 32, so 32 × 2 × 2 = 128 hypotheses. For each one, the decoder stacks the frames it has into block slots, de-rate-matches, runs Viterbi and checks the CRC, all 128 in one numpy batch.
Only the right guess passes, almost always. The exception is Rel-13 towers: without the per-frame rotation, all 8 frames of a block are identical, and a guess that's off by a few frames inside a block can still pass. For that case the decoder re-encodes each passing MIB and keeps the one whose bits agree best with what it received.
The first decode needs at least 9 frames, so the stack always straddles a block boundary. Eight identical frames prove nothing about where a block ends.
MIB-NB (Rel-14 rotation, 1 NRS port, combined 15 frames, NPBCH SNR 13.9 dB)
SFN = 782 (systemFrameNumber-MSB 12, H-SFN LSBs 3)
schedulingInfoSIB1 = 2 -> SIB1-NB TBS 208 bits, 16 repetitions, start frame 0
systemInfoValueTag = 9 ab-Enabled = False additionalTransmissionSIB1 = False
operationModeInfo = standalone {}
Panel (a) shows these as the actual 34 bits. Line by line:
- Rel-14 rotation: Telkomsel's software is at least Release 14 for this feature.
- 1 NRS port: the CRC passed with the all-zeros mask, so one transmit antenna.
- combined 15 frames: the winning hypothesis put my newest frame at frame 14 of the cycle (panel b). So only frames 0 to 14 of this cycle could be added: all 8 of block 0 and 7 of block 1. Frames from the previous cycle carry a different codeword (a different frame number), so they can't be added.
- NPBCH SNR 13.9 dB: the equalised NPBCH symbols were very clean.
- SFN = 782: the message carries only the top 4 bits of the 10-bit frame number: 12. The bottom 6 bits are my position inside the 640 ms cycle: frame 14. 12 × 64 + 14 = 782. That's the trick: half the frame number is when you received the message.
- H-SFN LSBs 3: the bottom 2 bits of the hyperframe number. The top 8 come in SIB1-NB.
- schedulingInfoSIB1 = 2: an index into a table in the spec. 2 means SIB1-NB is 208 bits and repeated 16 times per 2.56 s. With 16 repetitions, even PCIs start in frame 0 and odd PCIs in frame 1.
- systemInfoValueTag = 9: a version number for the system information. If Telkomsel changes a setting, it goes up, and every sleeping meter knows to re-read the SIBs when it wakes up.
- ab-Enabled = False: access barring is off. No device class is being told to stay away.
- additionalTransmissionSIB1 = False: no extra SIB1 copies in subframe 3 (a Release 15 option).
- operationModeInfo = standalone: confirms Part 1.
The decoder prints the MIB-NB only when its content (apart from the frame number) changes, which is why it appears once. It still re-checks it every 640 ms in the background.
The MIB-NB pointed to it: SIB1-NB is in subframe 4 of every even frame (panel a). One copy takes 8 subframes (frames 0, 2, 4 … 14), and 16 copies fill the 256-frame (2.56 s) cycle. A device in poor coverage can add up to 16 copies. I didn't need to: every SIB1 decode passed its CRC on a single copy.
There's one more twist: the scrambling. Release 13 and Release 14 seed the scrambler differently, so the decoder tries both. The log says which one worked: r14 scrambling.
SIB1-NB (1 repetition combined, r14 scrambling) payload 40c510a88042ad724304fbd0cb070d0892c20000000000000000
{
message c1 : systemInformationBlockType1-r13 : {
hyperSFN-MSB-r13 '51'H -- Q --,
cellAccessRelatedInfo-r13 {
plmn-IdentityList-r13 { { plmn-Identity-r13 { mcc {5,1,0}, mnc {1,0} },
cellReservedForOperatorUse-r13 notReserved } },
trackingAreaCode-r13 '56B9'H,
cellIdentity-r13 '21827DE'H,
cellBarred-r13 notBarred,
intraFreqReselection-r13 allowed
},
cellSelectionInfo-r13 { q-RxLevMin-r13 -64, q-QualMin-r13 -23 },
freqBandIndicator-r13 8,
schedulingInfoList-r13 { { si-Periodicity-r13 rf512, si-RepetitionPattern-r13 every4thRF,
sib-MappingInfo-r13 { sibType3-NB-r13 }, si-TB-r13 b328 } },
si-WindowLength-r13 ms960,
si-RadioFrameOffset-r13 12,
systemInfoValueTagList-r13 { 1 }
}
}
(Compressed onto fewer lines here; the console prints one field per line.)
| Field | Raw | What it means |
|---|---|---|
| hyperSFN-MSB | '51'H = 81 | top 8 bits of the hyperframe number. With the MIB's LSBs (3): 81 × 4 + 3 = H-SFN 327 |
-- Q -- |
– | just pycrate being helpful: byte 0x51 is the ASCII letter "Q". It means nothing here |
| mcc {5,1,0} | 510 | mobile country code: Indonesia |
| mnc {1,0} | 10 | mobile network code: Telkomsel |
| cellReservedForOperatorUse | notReserved | ordinary devices may use this cell |
| trackingAreaCode | '56B9'H = 22201 | the paging area. The network pages a sleeping device in all cells of its tracking area |
| cellIdentity | '21827DE'H | the 28-bit global cell ID: the first 20 bits are the eNodeB (the base station) = 137255, the last 8 the cell = 222 |
| cellBarred | notBarred | open |
| intraFreqReselection | allowed | if this cell were barred, devices could move to another cell on the same frequency |
| q-RxLevMin | −64 | ×2 dB: devices may camp only if they receive the reference signal at −128 dBm or better |
| q-QualMin | −23 | the signal quality (RSRQ) must be at least −23 dB |
| freqBandIndicator | 8 | Band 8 |
| si-Periodicity | rf512 | SI message 1 repeats every 512 frames = 5.12 s |
| si-RepetitionPattern | every4thRF | inside its window, a new copy starts every 4th frame |
| sib-MappingInfo | sibType3 | SI message 1 carries SIB2 (always, implicitly) plus SIB3 |
| si-TB | b328 | its transport block is 328 bits, which takes 8 subframes |
| si-WindowLength | ms960 | the window lasts 960 ms (96 frames) |
| si-RadioFrameOffset | 12 | the window starts 12 frames into each 512-frame period |
| systemInfoValueTagList | {1} | a version number per SI message |
The payload is 26 bytes (208 bits), as the MIB-NB promised. Part 12 shows how those bytes become this text.
The tower never announces "SI message 1 starts now". The receiver has to compute it from SIB1 (panel b):
- the window starts at frame 12 of every 512 and lasts 96 frames;
- a new copy starts every 4th frame;
- each copy fills the next 8 subframes that are free.
Free means: not subframe 0 (NPBCH), not 5 (NPSS), not 4 in SIB1 frames, not 9 in even frames (NSSS). Starting at frame 12, that's subframes 1, 2, 3, 6, 7, 8 of frame 12 and 1, 2 of frame 13 (panel c).
My decoder recomputes this map for every frame, collects exactly those subframes, and only then decodes. One wrong subframe and the CRC fails. The log shows it worked:
[sinr] SI-message 1 @SFN 12: subframe SINR 13 15 17 16 15 14 16 14 dB -> 8 clean / 0 interfered; QPSK SNR clean 13.3, interfered --
Read as: SI message 1, the copy starting at SFN 12. The 8 subframes it used had SINR between 13 and 17 dB (Part 17); panel (c) prints each value under its own subframe. All 8 were above my 8 dB "clean" line, and the QPSK from them measured 13.3 dB.
This timetable is counted in absolute frames (H-SFN × 1024 + SFN), which is why the decoder needs the hyperframe number too. Here the 512-frame period divides 1024 evenly, so the H-SFN doesn't change the answer, but for a 2048- or 4096-frame period it would.
The decoder re-reads SIB1 every 2.56 s, but it prints it again only when its content changes. The only thing that ever changed was hyperSFN-MSB: '51'H, '52'H, '53'H, '54'H in the long run (pycrate annotating them "Q", "R", "S", "T"). The top 8 bits of the hyperframe number tick every 4 hyperframes (40.96 s). That's my clock running alongside Telkomsel's: H-SFN 327 → 328 … 336.
The braces-and-commas text looks like JSON, but it's ASN.1 value notation. ASN.1 (Abstract Syntax Notation One) is the language 3GPP uses to define its radio messages: "SIB1-NB is a sequence of these fields, this one is an integer from −70 to −22, that one is optional". On the air, the messages are packed with UPER (unaligned packed encoding rules), which is ruthless about bits:
- no field names, no separators, no lengths where the definition already fixes them. The decoder knows the order from the definition;
- an integer from −70 to −22 has 49 possible values, so it takes exactly 6 bits and is sent as an offset from −70. 6 means −64;
- an optional field costs 1 bit up front, saying whether it's there;
- a list costs a few bits of length, then its items;
- an enumeration (like
rf512) is just its index: rf64 = 0, rf128 = 1, rf256 = 2, rf512 = 3.
The picture walks the whole message:
- The first 2 bits say "this is c1, and c1 is SIB1".
- The next 10 say which of SIB1's 10 optional fields are present: only si-RadioFrameOffset and systemInfoValueTagList.
- Then come the hyperframe bits, the PLMN, the tracking area, the cell ID and so on, down to bit 142.
143 bits carry the whole message; the other 65 are zero padding, because the transport block size is fixed at 208.
I checked this walk by hand against pycrate's output, field by field. My Python block hands pycrate the 26 bytes, pycrate does exactly this walk using the official 3GPP ASN.1 definitions, and prints the result. Without pycrate installed, the decoder still prints the hex payload, since the CRC has already proved it right.
SI message 1 is 328 bits and carries two blocks. SIB2-NB is the long one: how to access the cell. SIB3-NB is short: when to look for another cell. The full printout is in my log; here's what the values mean. Part 15 uses many of them: they are exactly what the control-channel listener needs to know where to look.
When a meter has something to send, it first knocks on the door with a random access preamble on the NPRACH (the uplink random access channel). These fields set the rules:
| Field | Value | Meaning |
|---|---|---|
| preambleInitialReceivedTargetPower | dBm-112 | aim the first knock to arrive at the tower at −112 dBm |
| powerRampingStep | dB2 | if nobody answers, try again 2 dB louder |
| preambleTransMax-CE | n4 | at most 4 knocks per coverage level |
| ra-ResponseWindowSize | pp10 | wait 10 control-channel periods for the answer |
| mac-ContentionResolutionTimer | pp64 | wait up to 64 periods to learn whether you won when two devices knock at once |
| nprach-CP-Length | us66dot7 | short preamble prefix: fine for cells up to about 10 km radius |
| rsrp-ThresholdsPrachInfoList | 31, 21 | coverage-level boundaries at −110 and −120 dBm RSRP |
| nprach-Periodicity | ms640 (×3) | a knocking opportunity every 640 ms on each level |
| nprach-StartTime | ms8 / ms64 / ms128 | the three levels take turns inside the 640 ms |
| nprach-SubcarrierOffset / NumSubcarriers | n36 / n12 | 12 of the 48 uplink tones (3.75 kHz each), tones 36–47 |
| numRepetitionsPerPreambleAttempt | n2 / n8 / n32 | each knock repeated 2, 8 or 32 times |
| npdcch-NumRepetitions-RA | r8 / r16 / r128 | the answer's control message repeated up to 8, 16 or 128 times |
| maxNumPreambleAttemptCE | n4 | after 4 failed knocks, move to the next (deeper) level |
That's NB-IoT's coverage enhancement in one table. A device that hears the cell well (RSRP above −110 dBm) uses level 0: 2 repetitions, done in a few milliseconds. One in a basement below −120 dBm uses level 2: 32 repetitions per knock, and answers repeated up to 128 times. Same cell, same frequency, 16 times more air time for the hard case. Part 15 shows which level the devices around me actually used.
| Field | Value | Meaning |
|---|---|---|
| modificationPeriodCoeff | n32 | SIB changes are announced 32 paging cycles ahead: 81.92 s |
| defaultPagingCycle | rf256 | a sleeping device checks for pages every 2.56 s (unless it negotiated longer sleep) |
| nB | one64thT | 4 paging frames per 256-frame cycle; devices are spread over them by ID |
| npdcch-NumRepetitionPaging | r128 | a page can be repeated up to 128 times, for deep coverage |
| nrs-Power | 32 | each NRS square is sent at 32 dBm (1.6 W). All 12 subcarriers at that level make about 43 dBm, roughly 20 W |
| ack-NACK-NumRepetitions-Msg4 | r2 / r8 / r64 | how often a device repeats its acknowledgement, per coverage level |
| groupHoppingEnabled | FALSE | no uplink reference-signal hopping |
| p0-NominalNPUSCH | −100 | uplink power target: −100 dBm at the tower… |
| alpha | al1 | …with full path-loss compensation: a far device transmits louder by exactly its extra path loss |
| deltaPreambleMsg3 | 4 | ×2: the first data message is sent 8 dB relative to the preamble's power |
| t300 | ms60000 | a device gives up connecting after 60 s (an LTE phone waits about 1 s) |
| t301 | ms25000 | 25 s to re-establish a dropped connection |
| t310, n310 | ms2000, n10 | after 10 "out of sync" indications, start a 2 s countdown to radio link failure |
| t311, n311 | ms30000, n1 | then 30 s to find a cell to recover on; one "in sync" is enough to cancel |
| additionalSpectrumEmission | 1 | default emission limits |
| timeAlignmentTimerCommon | infinity | uplink timing never expires. Meters don't move |
The 20 W figure assumes the data squares are sent at the same power as the NRS. That's typical but not guaranteed (how sure: medium). A 20 W NB-IoT carrier is a normal macro-cell setup.
Everything in this table is tuned for patience: 60-second connection timeouts, 128-fold repetitions, timing that never expires. Phones would find that unbearable. A meter that reports once a day doesn't care.
| Field | Value | Meaning |
|---|---|---|
| q-Hyst | dB4 | a neighbour must be 4 dB better before a device moves |
| s-IntraSearchP | 29 | ×2 = 58 dB above the minimum: search for neighbours when RSRP falls below about −70 dBm (−128 + 58) |
| s-NonIntraSearch | 9 | ×2 = 18 dB, the threshold for searching other frequencies, but none are listed |
| q-RxLevMin | −64 | the same −128 dBm minimum for neighbour cells |
| t-Reselection | s3 | a better neighbour must stay better for 3 s before the device moves |
The most interesting thing in SIB3 is what's missing: there's no list of other frequencies, and SIB1 doesn't schedule SIB5 (the block that would carry them). The only neighbours a device can move to are on the same carrier. From inside the protocol, that's frequency reuse 1.
Put together, in plain words:
- I'm listening to eNodeB 137255, cell 222 of Telkomsel (510-10), physical cell ID 260, tracking area 22201.
- It's a standalone NB-IoT carrier at 935.4 MHz in Band 8, with one antenna, about 20 W.
- It accepts devices down to −128 dBm and sorts them into three coverage levels at −110 and −120 dBm.
- It pages sleepers every 2.56 s in one of 4 paging frames.
- It tells them to look for a better cell only when the signal drops below about −70 dBm, and only on the same frequency.
The box at the bottom of the datasheet is new with nbiot_rx_plus. It holds what the cell does rather than what it says: pages to real devices, answers to devices 4.3 to 4.6 km away, and a second sector of the same eNodeB underneath it. The next two parts are about those.
The broadcast is the cell talking to everyone. Most of the time it's talking to someone in particular: a meter it needs to wake up, or a device that just knocked. Those messages travel on two channels:
- NPDCCH (the control channel) says "there is something for RNTI x, in these subframes, coded like this";
- NPDSCH carries the message itself.
An RNTI (radio network temporary identifier) is a 16-bit address. Some RNTIs are fixed: P-RNTI = 0xFFFE means "a page". Others are computed: an RA-RNTI identifies the knocking opportunity a device used.
NPDCCH messages (DCIs, downlink control information) are tiny, 15 or 23 bits, and protected with the same convolutional code as everything else. The twist is that their CRC-16 is XORed with the RNTI they are meant for. A normal device simply checks the CRC against its own RNTI. I don't have one, so the decoder does it backwards:
- It decodes the DCI, computes the CRC the bits should have, and XORs it with the CRC that arrived. What's left is the RNTI the message was sent to.
- A random decode leaves a random 16-bit number. So the decoder accepts the result only if it's an RNTI that makes sense at that moment: P-RNTI in a paging occasion, a valid RA-RNTI in a random-access search space, or a temporary C-RNTI it saw handed out earlier.
- Then it decodes the NPDSCH the DCI points to. That has its own 24-bit CRC, and only a pass counts.
Where to look comes straight from SIB2:
- Paging occasions: nB = T/64 means 4 paging frames per 256-frame cycle, one every 64 frames. The NPDCCH there is repeated up to Rmax = 128 times.
- Random-access search spaces: one per coverage level, repeated up to Rmax = 8, 16 or 128 times, starting on a grid set by npdcch-StartSF-CSS-RA and npdcch-Offset-RA.
And because a DCI can be repeated R = 1, 2, 4 … Rmax times, the decoder tries every allowed repetition level. It adds up the copies for each one, under each scrambling convention it isn't sure of, then runs one batched Viterbi. That's blind decoding, the same thing every NB-IoT device does, just for every RNTI at once.
An activity raster in the GUI shows the mean power of the equalised squares in each subframe: dark when the cell transmitted, white when it was idle or the subframe isn't a data subframe. It's my sanity check that the cell is busy where the decoder finds messages (Part 18).
PAGING H-SFN 328 SFN 129 sf 1 (NPDCCH R=32, NPDSCH 5 subframes x 16 repetitions, TBS 120)
2 paging records: 2 x s-TMSI (identities not shown)
systemInfoModification: no systemInfoModification-eDRX: no
- The pages arrived at SFN 129, 193, 257 and 321: exactly 64 frames apart, the paging-frame spacing SIB2 announced.
- The control message used R = 32 of the 128 allowed repetitions. The page itself took 5 subframes, repeated 16 times: 80 ms of air time for 120 bits.
- Each page carried 2 records, two devices being woken. They were addressed by s-TMSI, the temporary ID the core network gave each device, in all but one record. The page at SFN 321 had one IMSI record, the permanent subscriber ID. Networks fall back to IMSI paging mainly when they've lost track of a device's temporary ID (how sure: medium).
- systemInfoModification: no: nobody is being told to re-read the SIBs.
The decoder counts identities but never prints them. That's deliberate, and it's in the code, not just in this document: subscriber identities are not mine to collect.
When a device knocks (Msg1, the preamble), the tower answers with a random access response (RAR, Msg2). The answer is addressed to the RA-RNTI of the knocking opportunity, and it contains one entry per device it heard:
RANDOM ACCESS RESPONSE H-SFN 328 SFN 31 sf 3, coverage level 2 (NPDCCH R=32, NPDSCH 10 subframes x 16 repetitions, TBS 256)
RA-RNTI 4 -> preamble sent in SFN 12..15 (mod 1024), backoff index 4
device on preamble subcarrier 37: timing advance 56 (~4.37 km from the tower), temporary C-RNTI 0xC01D
Msg3 grant: 15 kHz spacing, subcarrier index 4, delay index 0, 32 repetition(s), MCS 0 (raw 20-bit field 0x88500)
device on preamble subcarrier 43: timing advance 59 (~4.61 km from the tower), temporary C-RNTI 0xC01E
...
Line by line:
- RA-RNTI 4 → SFN 12..15. RA-RNTI = 1 + ⌊SFN/4⌋, so this answers knocks made in frames 12 to 15. Coverage level 2 has its knocking opportunity at 128 ms into every 640 ms period: frames 12, 76, 140, 204, 268 and so on. The three RARs in my log carry RA-RNTI 4, 36 and 68: frames 12, 140 and 268. Those are exactly level-2 opportunities, a nice check that the decoder and SIB2 agree.
- coverage level 2. Every device I saw used the deepest level: RSRP below −120 dBm, 32 repetitions per knock. My guess is meters in basements or meter cabinets (how sure: low to medium; it fits the settings, and I can't see the devices).
- preamble subcarrier 37 … 47: which of the 12 NPRACH tones (36–47) the device's preamble used. The tower echoes it so each device recognises its own entry.
- timing advance 55–59: how much earlier each device must transmit so its signal arrives on time. One unit is 16 basic time units = 0.52 µs of round trip, about 78 m of distance. So 55 to 59 means 4.30 to 4.61 km from the tower. Eight devices across three answers, all within 300 m of each other in range: probably one neighbourhood (how sure: medium).
- temporary C-RNTI: the address the device will use for the rest of this connection attempt.
- Msg3 grant: where the device should send its first real message (Msg3): one 15 kHz subcarrier (index 4 to 7, one per device), 32 repetitions, MCS 0 (the most robust coding). Even the uplink is told to be patient.
- backoff index 4 / 5: if a device isn't in this answer, it waits a random time before knocking again.
One device didn't get through the first time:
[ra] H-SFN 328 SFN 336 sf 2: uplink re-grant (DCI N0) for temporary C-RNTI 0xC349: Msg3 retransmission
The tower sent an uplink grant (DCI format N0) to a temporary C-RNTI it had just handed out in the RAR at SFN 290. That means "I didn't get your Msg3, send it again". The decoder recognised the RNTI because it remembers every temporary C-RNTI from the RARs it decoded.
The next step would be Msg4, the contention resolution and RRCConnectionSetup. The decoder can read it, but none arrived in this short run. Everything after Msg4 runs on keys the device and network agree on, so this is where I stop listening anyway.
A normal cell search finds the strongest cell and stops: everything weaker hides under it. But by now I know everything cell 260 sent on its broadcast channels, bit for bit:
- its NRS (from the PCI);
- its NPBCH (re-encode the MIB-NB with the right frame number);
- its SIB1-NB and SI messages (re-encode the payloads that passed their CRCs);
- its NSSS.
So the decoder rebuilds cell 260's broadcast squares, multiplies them by the measured channel H, and subtracts them from the received grid. What's left, the residual, is everything else on 935.4 MHz plus noise. It's the same trick FT8 decoders use to peel strong stations off and find weak ones underneath.
Then it runs the NSSS search again, on the residual:
[neighbour] NSSS in the residual (serving cell 260 removed), best: PCI 259 5.8x, PCI 490 2.0x, PCI 216 1.9x, PCI 258 1.8x
[neighbour] trying PCI 259 (NSSS 5.8x the median in the residual)
PCI 259 at 5.8 times the median is clear of the 3.0× threshold. The others, around 2×, are noise; pure noise peaks at about 1.6×. The decoder starts a second, complete broadcast decoder for PCI 259, fed with the residual.
[neighbour PCI 259] MIB-NB (Rel-14 rotation, 1 NRS port, combined 10 frames, NPBCH SNR -20.0 dB)
SFN = 1022 (systemFrameNumber-MSB 15, H-SFN LSBs 3)
schedulingInfoSIB1 = 2 -> SIB1-NB TBS 208 bits, 16 repetitions, start frame 1
systemInfoValueTag = 14 ...
- NPBCH SNR −20 dB. That's the blind estimator's floor: per frame, the NPBCH squares look like pure noise. Yet the CRC passed after adding up 10 frames. That's the whole point of NB-IoT's repetitions, seen from the other side: a signal far too weak to see in one frame is still perfectly decodable when you combine enough of them.
- start frame 1: an odd PCI puts its SIB1 in odd frames, so its SIB1 never collides with cell 260's.
- SFN 1022: its frame counter doesn't match cell 260's (cell 260 was in the 800s at that moment). The two cells share frame timing, otherwise its NSSS wouldn't have shown up in the same grid, but not frame numbers (how sure: medium).
Its SIB1-NB needed 2 repetitions (the first period failed its CRC on one):
| Field | PCI 260 | PCI 259 |
|---|---|---|
| cellIdentity | '21827DE'H = eNodeB 137255, cell 222 | '21827D4'H = eNodeB 137255, cell 212 |
| trackingAreaCode | 22201 | 22201 |
| si-RadioFrameOffset | 12 | 6 |
| systemInfoValueTagList | {1} | {0} |
| everything else | same | same |
Same eNodeB, same tracking area: these are two sectors of the same tower, pointing in different directions, with me well inside cell 260's beam.
Look at si-RadioFrameOffset: 12 versus 6. The two sectors start their SI-message windows at different frames, so their SIB2/SIB3 transmissions don't land on top of each other. My reading is that Telkomsel staggers them on purpose (how sure: medium).
Its SI-message 1 needed 12 transmissions combined before the CRC passed. Its payload is byte-for-byte identical to cell 260's: same access rules, same timers, same paging settings. That's what you'd expect from two sectors configured from one template.
How much weaker is PCI 259? I can't give a clean number from this run. Its NSSS score in the residual is about half of cell 260's score in the raw signal, but those two scores are measured against different floors. What I can say is that cell 260's broadcast squares carry a little of PCI 259 on top, which is exactly the effect Part 17 measures.
Panel (a). For every subframe that carries NRS, the decoder compares each pilot Ĥ_p with the smooth frame-wide channel model H from Part 8. The model is built from up to 72 pilots spread over the frame. A pilot that has something extra on top of it (noise, or another cell's signal landing on that square) sticks out from the model. So:
SINR = Σ|H|² ÷ Σ|Ĥ_p − H|² over the subframe's 8 pilots: signal to interference plus noise ratio, one number per subframe. Expect about ±1.5 dB of scatter, because each subframe has only 8 pilots.
Each value goes two ways:
- to the SINR raster: one row per frame, 10 columns for the subframes, dark = good;
- to a switch. If that subframe's SINR is at least the split (8 dB by default, set with a slider before the run), its equalised SIB/SI symbols go to the CLEAN constellation; otherwise to INTERFERED.
One detail visible in my screenshot: if no subframe ever falls below the split, the INTERFERED plot never receives anything, and Qt shows its empty starting buffer: a single dot at (0, 0). That's not a fault. It's the display saying "nothing was interfered".
Every 5 seconds the console prints a summary: for each subframe the median, the 10th percentile (the bad tail), and how often it fell below the split. From the nbiot_rx_plus run:
[sinr] last 5 s, per subframe median/10th-pct dB, % below 8 dB: sf0 14.5/12.8 0% sf1 16.5/13.4 0% sf2 16.0/13.1 0% sf3 16.3/12.8 0% sf4 14.7/12.6 1% sf5 -- sf6 16.6/13.2 0% sf7 16.6/13.0 0% sf8 16.8/13.4 0% sf9 17.2/13.3 0%
Subframe 5 has no NRS (it's all NPSS), so there's no measurement.
Over the 90-second run (panel b), two subframes are consistently lower than the rest:
| Subframe | 0 | 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| median SINR (dB) | 13.9 | 15.4 | 15.6 | 15.6 | 14.2 | 15.9 | 15.8 | 16.2 | 16.1 |
About 1.5 dB lower in subframes 0 and 4, in every 5-second window, for 90 seconds. That isn't chance. The nbiot_rx_plus window above shows the same thing: sf0 and sf4 lowest, everything else 16–17 dB.
Because of reuse 1. Every NB-IoT cell around me transmits on 935.4 MHz, synchronised to the same frame timing, and every one of them broadcasts the same channels in the same subframes (panel c):
- subframe 0: every cell sends its NPBCH, in every frame, always;
- subframe 4: every cell sends its SIB1-NB, in every other frame (even PCIs in even frames, odd PCIs like 259 in odd frames), always;
- subframes 1–3 and 6–8: a neighbour only transmits there when it has traffic for one of its devices.
The neighbours' NPBCH and SIB1 fill almost all of their squares, including the ones where my cell puts its NRS. A different PCI puts its own NRS elsewhere, so it fills mine with data. So in subframes 0 and 4 my pilots always carry a little of every neighbour's broadcast on top. In the other subframes they mostly don't. Part 16 has now put a name on at least one of those neighbours: PCI 259.
1.5 dB is a small hit. Roughly, the neighbours' combined broadcast arrives about 3 to 4 dB below the noise and estimation error I already had (how sure: medium; it depends on how much of the 15.5 dB "floor" is real noise). Small, but constant, and it lines up exactly with the frame structure. If Telkomsel used reuse 3 or 7, subframes 0 and 4 would look like every other subframe.
In the 90-second run, 662 of 664 data subframes I checked were clean, and the two exceptions were just under the line (they print as 8 dB, rounded). In the nbiot_rx_plus run, every SIB1 and SI subframe was clean (8 clean / 0 interfered on every line), so the INTERFERED plot stayed at its dot.
That plot only gets SIB1 and SI symbols, from the first repetition of each period that decodes, so on its own it's a small sample. The 5-second summary covers every subframe, and it agrees: at this spot, cell 260 dominates comfortably. To check that the plot itself works, set the split to about 15 dB and restart. With medians of 14–17 dB, roughly half the subframes then land in INTERFERED as QPSK clusters.
My two screenshots, stitched into one window. Top to bottom, left to right:
-
Controls: carrier 935400000 Hz, RTL ppm 34, RTL gain 30 dB, fine tune 0.
-
Channel (Frequency Sink): the flat-topped 180 kHz block between about 935.31 and 935.49 MHz, 85 dB above the filter's stopband. The small spike near 936.05 MHz is outside my filter's passband and doesn't matter.
-
NPSS correlation raster: each row is 10 ms. The vertical lines near 8.5–9 ms are the correlator finding the NPSS once per frame, at the same place in every row, which is what "locked" looks like. They're faint because this display's colour scale (0 to 0.5) is wide; the Sync block's own metric is 0.96.
-
Resource grid: mostly white, with faint short dashes. This raster's colour scale starts at 15 dB, and with this AGC level most squares fall below it, so only the strongest marks show. That's a display setting, not a decoding problem: every decoder line in the log passed its CRC (how sure: medium that lowering zmin to about 0 dB would fill it in).
-
NPBCH (MIB-NB), equalised: four clusters of 100 points, one frame's worth, at about 14 dB.
-
NPDSCH: CLEAN: four tight clusters. These are the SIB1 and SI symbols from subframes at or above 8 dB, at about 13–14 dB.
-
NPDSCH: INTERFERED: one dot at (0, 0), the "nothing arrived" case from Part 17.
-
Serving-cell SINR raster (300 frames = 3 s on screen, all decoded):
- Columns 1–4 and 6–8 are dark: high SINR.
- Column 5 is white: the NPSS has no pilots to measure.
- Column 9 is striped light and dark row by row. In even frames it carries the NSSS (no pilots); in odd frames it carries NRS and gets measured.
- Column 0 is a little greyer than its neighbours: the reuse-1 dip from Part 17.
-
Activity raster: dark = the cell transmitted NPDCCH or NPDSCH there.
- Columns 0 and 5 are always white, because they're not data subframes.
- Column 4 is striped, because in even frames it's SIB1 (not counted) and in odd frames it's free.
- Columns 1–3 and 6–9 are dark much of the time.
The cell is busy, mostly because NB-IoT repeats everything: each page in Part 15 occupied 80 subframes of NPDSCH plus up to 32 of NPDCCH.
-
Clean/interfered split slider: 8 dB.
The long numbers come from a 93-second run of the earlier, broadcast-only version of this flowgraph. The broadcast decoder is unchanged in nbiot_rx_plus. The nbiot_rx_plus run starts exactly the same way (frame start at sample 12391, SFN 782, the same re-sync at sample 735524), so it was the same signal.
| What | Result |
|---|---|
| Duration | about 93 s |
| Cell | PCI 260, NSSS 11.0 × the noise floor (10.9 after the last re-sync); no other cell above the candidate threshold |
| NPSS metric | 0.95–0.97 average per 5 s, worst frame 0.93 |
| CFO | +913 to +918 Hz at the start, +897 Hz at the end (+0.98 ppm after my 34 ppm setting); it drifted about 20 Hz down as the dongle warmed up |
| MIB-NB | decoded from 15 frames, NPBCH SNR 13.9 dB; SFN 782 at the start |
| SIB1-NB | 60 decodes, every one from a single repetition, 0 CRC failures |
| SI-message 1 (SIB2 + SIB3) | 23 decodes, every one from a single transmission, 0 CRC failures |
| Hyperframes | H-SFN 327 → 336 (hyperSFN-MSB '51'H → '54'H) |
| SINR | 13.9–16.2 dB median by subframe; 662 of 664 data subframes above 8 dB |
| QPSK SNR (equalised data) | 13.4 dB median |
| Re-syncs | 3 (at about 0.4 s, 31.7 s and 67.8 s), each recovered within about 1 s at the same CFO and PCI |
| What | Result |
|---|---|
| Pages | 4, at SFN 129, 193, 257, 321 (64 frames apart); 2 records each, s-TMSI except one IMSI; no SI change announced |
| Random access responses | 3 (RA-RNTI 4, 36, 68), all coverage level 2; 8 devices, timing advance 55–59 = 4.30–4.61 km |
| Msg3 retransmissions | 1 (temporary C-RNTI 0xC349) |
| Msg4 | none in this run |
| Neighbour | PCI 259 = eNodeB 137255 cell 212, found at 5.8 × in the residual; MIB-NB from 10 frames, SIB1-NB from 2 repetitions, SI-message 1 from 12 transmissions |
| SIB/SI subframes clean | all of them (0 interfered on every line) |
The first one is at startup: the Sync block locked within the first 7 ms, lost it, and locked again at 0.38 s. That's most likely the AGC and the dongle still settling. The other two, at about 31 s and 67 s, came out of nowhere: the metric was 0.93 or better right before. Losing lock means 10 frames in a row missed the NPSS by more than ±3 samples, which looks like a jump in the sample stream rather than a fading signal. My guess is a short USB hiccup that dropped samples (how sure: low; there's no overflow message in the log, so I can't prove it).
Either way, recovery was quick. The Sync block searches narrowly around the last known frequency first, finds the NPSS within a second, and the decoder starts over: NSSS, MIB-NB, SIB1. It remembers what it already printed, so the console doesn't fill with repeats. The control-channel listener and the neighbour search restart with it.
I expected the frame number to be in the MIB-NB. Only its top 4 bits are. The other 6 are where in the 640 ms cycle you received it, which you can only work out by trying every possibility until a CRC passes. It's an elegant way to save 6 bits, and the reason the MIB decoder is the most "search-like" part of the whole receiver.
The 7.5 kHz half-subcarrier offset can be generated with the phase restarting at every symbol or running continuously. The difference is a phase step of a few degrees per symbol. Small, but enough to tilt a correlation. Rather than guess, the Sync block carries templates for both and reports which one fits: half-subcarrier per-symbol for this cell.
Release 14 changed both the NPBCH (the per-frame rotation) and the SIB scrambling seed. The MIB decoder tries both versions as part of its 128 hypotheses, and the SIB decoder tries both scramblers. This cell uses Release 14 for both, and so does PCI 259.
My first thought on seeing hyperSFN-MSB-r13 '51'H -- Q -- was that I'd decoded something wrong. It's pycrate printing the ASCII character for byte 0x51 next to bit strings, which it does for any 8-bit string. The next prints said R, S and T: the hyperframe number spelling out the alphabet.
SIB1 says SI message 1 contains sibType3-NB-r13, and the decoder labels it that way, but the message starts with SIB2. That's the spec: SIB2 is always in the first SI message and is never listed. The mapping only lists the extra blocks.
While counting SIB1 decodes in the first version, I noticed that after every hyperframe boundary SIB1 got decoded three times instead of once. The decoder was rebuilding the H-SFN from SIB1's top bits plus the MIB's last bottom bits. The MIB is only re-checked every 640 ms, so for a few hundred milliseconds after each boundary the H-SFN was 3 too high. nbiot_rx_plus takes the bottom 2 bits from its own running counter instead. The flicker is gone, and the paging and random-access timing in Part 15, which needs the exact H-SFN, depends on that fix.
PCI 259's NPBCH measured −20 dB per frame, which is the estimator's floor: in one frame, pure noise. Ten frames later the CRC passed. I knew the repetitions were there for meters in basements; I didn't expect to watch them work for me on a cell I couldn't otherwise see at all.
All eight devices in the random access responses used coverage level 2, the one meant for RSRP below −120 dBm, with 32 repetitions per knock. They're 4.3 to 4.6 km out. Whatever they are, they're hearing this tower badly, and the network spends a lot of air time on each of them.
- The uplink. Everything devices send is 45 MHz lower, on a different channel structure. I didn't listen there. The random access responses tell me about the devices only from the tower's side.
- Downlink traffic to devices. After Msg4, everything is protected with keys the device and network agree on, and above the radio layer it's someone's data. I wouldn't decode it even if I could. The broadcast is meant for everyone; the traffic isn't.
- Subscriber identities. Pages carry s-TMSIs and sometimes IMSIs. The decoder counts them and never prints them.
- In-band cells. The decoder handles their sync and MIB-NB, but SIB decoding would need to skip LTE's control region and reference signals, which I haven't done. Telkomsel's carrier here is standalone, so it didn't matter.
- Absolute power. An RTL-SDR isn't calibrated, so I can't say what RSRP my antenna gets in dBm. The SINR and the SNR are ratios, and those I trust.
- Plug in the RTL-SDR and find the carrier in Gqrx first: a flat-topped block about 180 kHz wide. Note its centre and your dongle's ppm.
- Open nbiot_rx_plus.grc in GRC (GNU Radio 3.10, radioconda).
- Set:
- NB-IoT carrier [Hz]: the centre, 935.4e6 here. Standalone carriers sit on the 100 kHz raster.
- RTL ppm: the same value as in Gqrx (34 for my dongle).
- RTL gain: about 30 dB. Too much gain and the strong GSM/LTE neighbours overload the dongle.
- Fine tune: 0. The Sync block searches ±12 kHz by itself.
- Clean/interfered split: 8 dB (read only at start).
- For the full SIB, page and RAR text, install pycrate once:
radioconda\python.exe -m pip install pycrate. Without it you still get the MIB-NB and the SIB payloads in hex, but pages and RARs need it. - Run. You should see these, in order:
- within a second or two,
[sync] NPSS found, thenCell found; - the MIB-NB within about a second;
- SIB1 within 3 s;
- SI message 1 within about 5 s (it comes every 5.12 s);
- after that, pages and random access responses whenever the cell sends them, and after a few seconds the
[neighbour]search.
- within a second or two,
- For offline work, there's a disabled File Source + Throttle pair (a 1.92 MS/s complex64 recording tuned to f_nb + 300 kHz). Enable them and disable the RTL source.
On the GUI, see Part 18 for what each panel should look like.
A few notes:
[sync] searching...forever: check the frequency and the ppm. The block needs a peak at least 12 times its typical value (theratioit prints); a ratio of 2–3 means it found nothing but noise.- Cell found, but no MIB-NB: the decoder tries other candidate cells after about a second. A very low NPBCH SNR (it's printed while searching) means the signal is too weak; move the antenna.
[sync] WARNING: … s of samples queuedorOcharacters in the console: the laptop can't keep up. Close other programs. nbiot_rx_plus does much more work per frame than the broadcast-only version. If it struggles, setneighboursto False in the Decoder block; that's the heaviest part.
There's still a lot of room for improvement:
- Catch a Msg4 and see an RRCConnectionSetup-NB on the air (the decoder supports it; this run was too short).
- Log a whole day: pages, random access and activity per hour, to see whether the traffic follows meter-reading schedules.
- Measure PCI 259 properly: its own SINR and level relative to cell 260, from the residual.
- Fix the resource-grid raster's colour scale so it shows the frame at this AGC level.
- Measure RSRP with a calibrated reference, so q-RxLevMin and the coverage thresholds mean something for my own antenna.
- In-band cells, for operators that run NB-IoT inside LTE.
- The GNU Radio project, and radioconda for making it painless on Windows.
- 3GPP, for specifications detailed enough that a receiver can be built from them alone.
- srsRAN, whose open NB-IoT code I read to understand the parts the spec leaves to interpretation.
- pycrate (Benoit Michau), for the ASN.1 compiler and the 3GPP definitions that turn 26 bytes into readable text.
- Telkomsel's cells 260 and 259, for broadcasting cleanly and patiently, every 10 ms, to anyone who cares to listen.
