# osmocom/osmo-bts architecture

> Architecture diagram of the GitHub repository osmocom/osmo-bts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/osmocom/osmo-bts
- Repository: https://github.com/osmocom/osmo-bts

## Overview

osmo-bts implements the BTS-side Layer 2 and higher for GSM over Abis/IP, with a Layer 1 boundary and several hardware or software-radio implementations. A network controller configures and operates the BTS over OML and RSL; radio-channel processing then crosses the L1 interface to the selected PHY backend. The README documents LAPDm and supported hardware families, while the tree identifies further runtime areas such as scheduling, PCU, RTP, and management. Edges beyond README-documented relationships are omitted because the relevant implementation excerpts were not provided.

Main entry points: [`src/common/l1sap.c`](https://github.com/osmocom/osmo-bts/blob/master/src/common/l1sap.c) (L1 service access), [`src/common/rsl.c`](https://github.com/osmocom/osmo-bts/blob/master/src/common/rsl.c) (RSL signaling), [`src/common/abis.c`](https://github.com/osmocom/osmo-bts/blob/master/src/common/abis.c) (Abis transport), [`src/common/oml.c`](https://github.com/osmocom/osmo-bts/blob/master/src/common/oml.c) (OML management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_protocols["Abis protocols"]
  node_oml["OML management<br/>[oml.c]"]
  node_rsl["RSL signaling<br/>[rsl.c]"]
  node_lapdm["LAPDm<br/>[lchan.c]"]
  node_abis["Abis transport<br/>[abis.c]"]
end

subgraph group_radio["Radio processing"]
  node_l1sap["L1 service access<br/>[l1sap.c]"]
  node_scheduler["Radio scheduler<br/>[scheduler.c]"]
  node_frames["Frame scheduling<br/>[scheduler_mframe.c]"]
end

subgraph group_platforms["PHY platforms"]
  node_trx["TRX backend<br/>[trx_if.c]"]
  node_octphy["Octasic PHY<br/>[l1_if.c]"]
  node_sysmo["sysmoBTS PHY<br/>[l1_if.c]"]
  node_litecell["Litecell PHY<br/>[l1_if.c]"]
  node_oc2g["OC-2G PHY<br/>[l1_if.c]"]
  node_virtual["Virtual Um<br/>[virtual_um.h]"]
end

subgraph group_services["BTS services"]
  node_pcu["Packet control<br/>[pcu_sock.c]"]
  node_rtp["Voice transport<br/>[rtp_abstract.c]"]
  node_management["BTS management<br/>[nm_bts_fsm.c]"]
  node_configuration["VTY configuration<br/>[vty.c]"]
end

node_controller(("Network controller"))

node_controller -->|"exchanges Abis/IP"| node_abis
node_abis -->|"carries OML"| node_oml
node_abis -->|"carries RSL"| node_rsl
node_rsl -->|"uses LAPDm"| node_lapdm
node_oml -.->|"configures BTS"| node_management
node_rsl -.->|"radio primitives"| node_l1sap
node_l1sap -.->|"radio requests"| node_scheduler
node_scheduler -.->|"uses frame timing"| node_frames
node_l1sap -->|"crosses L1 boundary"| node_trx
node_l1sap -->|"crosses L1 boundary"| node_octphy
node_l1sap -->|"crosses L1 boundary"| node_sysmo
node_l1sap -->|"crosses L1 boundary"| node_litecell
node_l1sap -->|"crosses L1 boundary"| node_oc2g
node_l1sap -.->|"crosses L1 boundary"| node_virtual
node_l1sap -.->|"packet interface"| node_pcu
node_l1sap -.->|"voice transport"| node_rtp
node_configuration -.->|"sets runtime options"| node_oml

click node_oml "https://github.com/osmocom/osmo-bts/blob/master/src/common/oml.c"
click node_rsl "https://github.com/osmocom/osmo-bts/blob/master/src/common/rsl.c"
click node_lapdm "https://github.com/osmocom/osmo-bts/blob/master/src/common/lchan.c"
click node_abis "https://github.com/osmocom/osmo-bts/blob/master/src/common/abis.c"
click node_l1sap "https://github.com/osmocom/osmo-bts/blob/master/src/common/l1sap.c"
click node_scheduler "https://github.com/osmocom/osmo-bts/blob/master/src/common/scheduler.c"
click node_frames "https://github.com/osmocom/osmo-bts/blob/master/src/common/scheduler_mframe.c"
click node_trx "https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-trx/trx_if.c"
click node_octphy "https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-octphy/l1_if.c"
click node_sysmo "https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-sysmo/l1_if.c"
click node_litecell "https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-lc15/l1_if.c"
click node_oc2g "https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-oc2g/l1_if.c"
click node_virtual "https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-virtual/virtual_um.h"
click node_pcu "https://github.com/osmocom/osmo-bts/blob/master/src/common/pcu_sock.c"
click node_rtp "https://github.com/osmocom/osmo-bts/blob/master/src/common/rtp_abstract.c"
click node_management "https://github.com/osmocom/osmo-bts/blob/master/src/common/nm_bts_fsm.c"
click node_configuration "https://github.com/osmocom/osmo-bts/blob/master/src/common/vty.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_oml,node_rsl,node_lapdm,node_abis toneBlue
class node_l1sap,node_scheduler,node_frames toneAmber
class node_trx,node_octphy,node_sysmo,node_litecell,node_oc2g,node_virtual toneMint
class node_pcu,node_rtp,node_management,node_configuration toneRose
class node_controller toneIndigo
```

## Components

### Abis protocols

- [OML management](https://github.com/osmocom/osmo-bts/blob/master/src/common/oml.c): `src/common/oml.c`
- [RSL signaling](https://github.com/osmocom/osmo-bts/blob/master/src/common/rsl.c): `src/common/rsl.c`
- [LAPDm](https://github.com/osmocom/osmo-bts/blob/master/src/common/lchan.c): `src/common/lchan.c`
- [Abis transport](https://github.com/osmocom/osmo-bts/blob/master/src/common/abis.c): `src/common/abis.c`

### Radio processing

- [L1 service access](https://github.com/osmocom/osmo-bts/blob/master/src/common/l1sap.c): `src/common/l1sap.c`
- [Radio scheduler](https://github.com/osmocom/osmo-bts/blob/master/src/common/scheduler.c): `src/common/scheduler.c`
- [Frame scheduling](https://github.com/osmocom/osmo-bts/blob/master/src/common/scheduler_mframe.c): `src/common/scheduler_mframe.c`

### PHY platforms

- [TRX backend](https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-trx/trx_if.c): `src/osmo-bts-trx/trx_if.c`
- [Octasic PHY](https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-octphy/l1_if.c): `src/osmo-bts-octphy/l1_if.c`
- [sysmoBTS PHY](https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-sysmo/l1_if.c): `src/osmo-bts-sysmo/l1_if.c`
- [Litecell PHY](https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-lc15/l1_if.c): `src/osmo-bts-lc15/l1_if.c`
- [OC-2G PHY](https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-oc2g/l1_if.c): `src/osmo-bts-oc2g/l1_if.c`
- [Virtual Um](https://github.com/osmocom/osmo-bts/blob/master/src/osmo-bts-virtual/virtual_um.h): `src/osmo-bts-virtual/virtual_um.h`

### BTS services

- [Packet control](https://github.com/osmocom/osmo-bts/blob/master/src/common/pcu_sock.c): `src/common/pcu_sock.c`
- [Voice transport](https://github.com/osmocom/osmo-bts/blob/master/src/common/rtp_abstract.c): `src/common/rtp_abstract.c`
- [BTS management](https://github.com/osmocom/osmo-bts/blob/master/src/common/nm_bts_fsm.c): `src/common/nm_bts_fsm.c`
- [VTY configuration](https://github.com/osmocom/osmo-bts/blob/master/src/common/vty.c): `src/common/vty.c`

### Other components

- **Network controller**

## Connections

- Network controller → Abis transport: exchanges Abis/IP
- Abis transport → OML management: carries OML
- Abis transport → RSL signaling: carries RSL
- RSL signaling → LAPDm: uses LAPDm
- OML management → BTS management: configures BTS
- RSL signaling → L1 service access: radio primitives
- L1 service access → Radio scheduler: radio requests
- Radio scheduler → Frame scheduling: uses frame timing
- L1 service access → TRX backend: crosses L1 boundary
- L1 service access → Octasic PHY: crosses L1 boundary
- L1 service access → sysmoBTS PHY: crosses L1 boundary
- L1 service access → Litecell PHY: crosses L1 boundary
- L1 service access → OC-2G PHY: crosses L1 boundary
- L1 service access → Virtual Um: crosses L1 boundary
- L1 service access → Packet control: packet interface
- L1 service access → Voice transport: voice transport
- VTY configuration → OML management: sets runtime options
