--- license: mit pretty_name: Twin6G — Over-the-Air 5G NR PHY Dataset tags: - 5g - 5g-nr - physical-layer - rf - iq - sigmf - srsran - open5gs - ran-telemetry - wireless - digital-twin - fake-base-station size_categories: - 1K/ tier1_iq/ raw IQ bursts (.sc16) + SigMF sidecars (.sigmf-meta) tier2_metrics/ gnb_sched_ue.csv, ue_nr_adb.csv, ue_adb.ndjson pcap/ gnb_mac.pcap (MAC-NR), gnb_ngap.pcap (NGAP + 5G NAS) logs/ srsRAN console + srslog, per-burst sniffer logs, phone radio logcat, keepalive ping config/ exact Open5GS core and srsRAN gNB configs used meta/ final size report run_info.yaml run metadata timeline.ndjson ground-truth event timeline (UTC) ``` ## Tier 1 — raw IQ (`tier1_iq/`) Duty-cycled over-the-air capture of the live cell: a **2-second burst every 20 seconds** across the whole run, so samples span the full session at a practical size. For the run above: 46 bursts, ~7.9 GB. - `iq__c_r.sc16` — interleaved signed 16-bit complex samples (I, Q, I, Q, …), little-endian. One 2-second burst = 46,080,000 complex samples = 184.32 MB. Sample rate 23.04 Msps, center frequency 2593.35 MHz. - `iq__c_r.sigmf-meta` — a [SigMF](https://github.com/sigmf/SigMF) metadata sidecar (`core:datatype: ci16_le`, sample rate, center frequency, hardware serial, UTC datetime, label). Read one burst in Python: ```python import numpy as np x = np.fromfile("iq_….sc16", dtype=np.int16).astype(np.float32).view(np.complex64) fs, fc = 23.04e6, 2593.35e6 # sample rate, center frequency ``` Typical uses: RF fingerprinting (carrier-frequency offset, IQ imbalance, phase noise), synchronization-signal (SSB / PSS-SSS) analysis, spectrograms, and physical-layer inputs to a digital-twin or anomaly model. ## Tier 2 — PHY telemetry (`tier2_metrics/`, `pcap/`) **`gnb_sched_ue.csv`** — per-UE physical-layer metrics from the base-station scheduler: | column | meaning | |---|---| | `pci`, `rnti` | cell identity, UE radio identifier | | `dl_cqi`, `dl_ri`, `dl_mcs`, `dl_brate` | downlink channel quality, rank, modulation-and-coding, bitrate | | `dl_ok`, `dl_nok`, `dl_bler_pct` | downlink HARQ ACK / NACK and block error rate | | `ul_pusch_snr`, `ul_rsrp` | uplink SNR and received power at the base station | | `ul_ri`, `ul_mcs`, `ul_brate`, `ul_ok`, `ul_nok`, `ul_bler_pct` | uplink rank, MCS, bitrate, HARQ, BLER | | `ul_bsr`, `ul_ta`, `ul_phr` | buffer status, timing advance, power headroom | **`ue_nr_adb.csv`** — the phone's own NR radio measurements, polled every 2 seconds over adb: | column | meaning | |---|---| | `ts`, `reg` | timestamp, registration state | | `ss_rsrp`, `ss_rsrq`, `ss_sinr` | synchronization-signal received power, quality, SINR (the UE's downlink view) | | `csi_rsrp`, `csi_rsrq`, `csi_sinr` | CSI-RS equivalents when reported | `ue_adb.ndjson` is the raw per-poll source for that CSV. The `tier2_metrics/*.csv` are derived from the raw logs and can be regenerated. **Packet captures** (`pcap/`): `gnb_mac.pcap` is MAC-NR (per-transport-block MCS, grants, HARQ); `gnb_ngap.pcap` is NGAP control plane and contains the **5G NAS (5GMM)** signaling, including the full registration sequence (Registration Request, Authentication Request/Response, Identity Request/Response, Security Mode Command). Read with Wireshark or `tshark -r gnb_ngap.pcap -Y nas-5gs`. ## Loading in `datasets` The IQ files are binary and are referenced by their SigMF sidecars; load them with NumPy as shown above. The CSV metrics are exposed as dataset-viewer configs: ```python from datasets import load_dataset gnb = load_dataset("/Twin6G", "gnb_metrics") # per-UE PHY metrics ue = load_dataset("/Twin6G", "ue_nr") # phone-side NR measurements ``` ## Intended uses - Physical-layer feature extraction and RF fingerprinting of 5G base stations. - Training and validating digital-twin / anomaly models on real radio telemetry. - Fusing physical-layer features with higher-layer (NAS / RRC) detectors, for example to reduce false positives in fake-base-station detection. ## Limitations and honest notes - **Benign only.** This run is a single legitimate cell. It is **not** a fake-base-station capture; that requires a separate two-transmitter benign-versus-fake handover scenario. - **IQ is duty-cycled**, 2 seconds every 20 seconds. It spans the full run but totals about 92 seconds of samples per 20-minute run, not continuous. This bounds storage and avoids radio contention with the live cell. - A minority of IQ bursts logged a transient hardware overflow (a few dropped samples at the start of the burst). Files are full-size and usable; the per-burst sniffer logs in `logs/` record which bursts. - Identifiers are test values on a private PLMN (99970). Subscriber keys are not included; the UE config in `config/` has credentials stripped. ## Citation Part of the Twin6G project (digital twin for 5G/6G). If you use this dataset, please cite the project and link this repository.