1xBTS 1xBTS

Configuration

1xBTS uses a per-node config directory plus an optional radio-config override:

cargo run --release -p cdma-nib -- --config-dir config --radio-config config/radio_bladerf_micro2.json

The default config directory contains bts.json, bsc.json, msc.json, pcf.json, pdsn.json, hlr.json, smsc.json, and management.json.

Node Configuration

FileRole
bts.jsonpilot/overhead parameters, downlink/uplink channel config, MCC/IMSI_11_12 digit-string defaults, BTS Abis signaling listener, local bearer address
bsc.jsontraffic assignment, paging retry, traffic retry, BSC Abis signaling target, BSC bearer peer config
msc.jsonA1 listen address, MSC management endpoint, voice policy, voice gateway endpoint, welcome SMS policy
pcf.jsonpacket-control client endpoint for the packet service
pdsn.jsonpacket gRPC listener, packet transport mode (tun, fou, or fou_tcp), tunnel endpoints, mobile gateway, and DNS advertised by IPCP
hlr.jsonHLR gRPC listener and PostgreSQL DSN for subscriber and registration-binding data
smsc.jsonSMSC gRPC listener and PostgreSQL DSN for SMS submissions and delivery attempts
management.jsonmanagement facade listener, tokio-console flag, IQ capture directory

1xbts-web uses MANAGEMENT_GRPC_ADDRESS for the facade endpoint and falls back to BSC_GRPC_ADDRESS for older local setups. MSC-owned call actions and SMS submission are served by the MSC management endpoint from msc.json; SMS coordination flows from MSC to BSC over A1 ADDS messages.

Local Overrides

The configs in config/ are shared defaults. To customize one for your own setup without touching the checked-in file, drop a sibling <name>.local.json next to it:

config/bts.json          # shared default (in git)
config/bts.local.json    # your overrides (gitignored)

At load time the BTS reads the base file, merges your local file on top, and validates the result. Your local file only needs the fields you’re changing — anything you omit keeps the value from the base.

For example, to switch to a different CDMA channel and bump TX gain without touching anything else in bts.json:

{
  "channel": {
    "band_class": "bc0",
    "band_subclass": 0,
    "cdma_channel": 283
  },
  "radio": {
    "tx_gain_db": 60
  }
}

The BTS derives both TX and RX center frequencies from channel (via C.S0057-F band-class formulas). To force a non-standard tune for lab/loopback work, set runtime.tx_freq_hz_override and/or the radio backend’s rx_freq_hz_override.

The same convention works for every config in config/: bts.json, bsc.json, msc.json, pcf.json, pdsn.json, hlr.json, smsc.json, management.json, voice-gw.json, and the radio profiles (e.g. radio_bladerf_micro2.local.json).

Merge behavior

  • Nested objects are merged field by field; fields you don’t set keep the base value.
  • Arrays in your local file replace the base array (they’re not appended).
  • Setting a field to null removes it, falling back to the struct default.

BTS Runtime

{
  "channel": {
    "band_class": "bc0",
    "band_subclass": 0,
    "cdma_channel": 384
  },
  "runtime": {
    "spreading_rate": "sr1",
    "chip_rate_hz": 1228800,
    "tx_sample_rate_hz": 4915200,
    "tx_digital_backoff": 0.5
  }
}

channel is the single source of truth for RF tuning. The BTS supports all 23 band classes defined in C.S0057-F (bc0bc22, except bc17 and bc22 which are “Not specified” in the spec). The band_subclass selects which spectrum-allocation profile is broadcast in handoff messages. The default (BC0 / subclass 0 / N=384) maps to 881.520 MHz TX / 836.520 MHz RX. See the Configuration Reference for the full per-band formula table.

ChannelWalshConfig
PilotW0Gain
SyncW321200 bps, interleaver params
PagingW19600 bps, overhead messages (SPM, APM, ESPM, CCLM, NLM)

Extended System Parameters in bts.json carry the advertised MCC and IMSI_11_12 defaults as decimal digit strings, for example "mcc": "310" and "imsi_11_12": "55". The BTS encodes those strings into the C.S0005-E bit fields, and the BSC uses the same overhead values to reconstruct a complete class-0 registration IMSI when the mobile only sends the short IMSI fields on the access channel.

BSC / MSC / Packet Parameters

SectionControls
bsc.traffic_assignmentsupported forward/reverse RCs, preferred RC pairs, idle timeout, TCH MS Ack timeout, optional SO33 F-SCH rate
bsc.paging_retrypaging ACK timeout and retry count
bts.abis / bsc.abisAbis TCP signaling bind/remote addresses; defaults wire the integrated runtime over localhost 127.0.0.1:5604
bts.bearer / bsc.bearerAbis UDP bearer bind/remote addresses; defaults wire BTS 127.0.0.1:17014 to BSC 127.0.0.1:17022
msc.voicesupported SOs, answer/release timers, A2p bearer behavior, WAV fallback, MSC-owned voice gateway endpoint
msc.welcome_smsfirst-registration/inactivity welcome SMS text, originating number, and threshold
pcf.packet_grpc_endpointBSC/PCF client endpoint for packet service RPCs; default http://127.0.0.1:17021
pdsn.packet_grpc_listen_addrpacket service gRPC listen address; default 127.0.0.1:17021
pdsn.ppp_session_timeout_secsidle lifetime for cached open PPP/LCP/IPCP state across packet traffic-channel changes; default 1800
pdsn.packetpacket transport mode, FOU/FOU-TCP endpoints, mobile gateway IP, DNS advertised to mobiles, optional PDSN-originated VJ compression requests, and opt-in Mobile IPv4 registration
hlr.grpc_listen_addr / smsc.grpc_listen_addrHLR/SMSC service gRPC listen addresses; defaults 127.0.0.1:17019 and 127.0.0.1:17020
hlr.postgres_dsn / smsc.postgres_dsnPostgreSQL connection strings

For SO33 packet-data downlink, bsc.traffic_assignment.enable_f_sch enables F-SCH and f_sch_rate_bps selects 19200, 38400, 76800, or 153600.

Access Channel

ParameterDefault
Channels per paging channel1
Access rate4800 bps
Frame duration20 ms
ARQ ACK timeout400 ms

Radio Configuration

Hardware-specific SDR parameters.

UHD (USRP B200/B210)

{
  "kind": "uhd",
  "device": "type=b200,num_recv_frames=1024,num_send_frames=1024",
  "channel": 0,
  "antenna": "TX/RX",
  "tx_gain_db": 65.0,
  "rx_antenna": "RX2",
  "rx_gain_db": 50.0,
  "rx_sample_rate_hz": 4915200,
  "rx_bandwidth_hz": 5000000,
  "rx_sample_delay": 50
}

LimeSDR (Native)

{
  "kind": "lime",
  "device": "",
  "channel": 0,
  "tx_antenna": "BAND1",
  "tx_gain_db": 60,
  "rx_antenna": "LNAW",
  "rx_gain_db": 20,
  "rx_sample_rate_hz": 4915200,
  "rx_bandwidth_hz": 5000000,
  "rx_sample_delay": 97
}

rx_sample_delay compensates for LimeSDR-specific timing offsets in the receive path.

bladeRF (Native)

{
  "kind": "blade_rf",
  "device": "",
  "channel": 0,
  "fpga_path": null,
  "tx_antenna": "TXA",
  "rx_antenna": "B_BALANCED",
  "tx_gain_db": 50,
  "rx_gain_db": 40,
  "rx_sample_rate_hz": 4915200,
  "rx_bandwidth_hz": 2500000,
  "rx_reference_dbm": null,
  "rx_sample_delay": 0,
  "rx_batch_pcgs": 2,
  "num_buffers": 16,
  "buffer_size": 8192,
  "num_transfers": 8,
  "stream_timeout_ms": 3500
}

fpga_path: null uses libbladeRF’s host auto-load path, typically ~/.config/Nuand/bladeRF/hostedxA4.rbf. Set fpga_path to an explicit .rbf file if you do not want host auto-load. tx_antenna and rx_antenna select bladeRF RF ports; the current Micro 2.0 example uses TXA and B_BALANCED.

Environment Variables

VariablePurpose
CDMA_CONFIG_DIRDefault config directory when --config-dir is omitted
RUST_LOGLog level (info, debug, trace)

Next Steps