# jetanin/esp32-microlink architecture

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

- Interactive diagram: https://gitdiagram.com/jetanin/esp32-microlink
- Repository: https://github.com/jetanin/esp32-microlink

## Overview

ESP32-MicroLink is ESP32-C6 EchoLink repeater firmware. An operator configures WiFi, then connects to an EchoLink station through the web UI or DTMF; received audio is buffered and played locally, while captured microphone audio is gated by PTT/VOX and sent over the network. The graph retains documented setup, announcements, indicators, and proxy support. Some relationships come from the README or source-index references; unsampled implementations are not treated as inspected.

Main entry points: [`src/echolink_client.cpp`](https://github.com/jetanin/esp32-microlink/blob/main/src/echolink_client.cpp) (EchoLink client), [`src/audio_pipeline.cpp`](https://github.com/jetanin/esp32-microlink/blob/main/src/audio_pipeline.cpp) (Audio pipeline), [`src/web_ui.cpp`](https://github.com/jetanin/esp32-microlink/blob/main/src/web_ui.cpp) (Web interface), [`src/dtmf_controller.cpp`](https://github.com/jetanin/esp32-microlink/blob/main/src/dtmf_controller.cpp) (DTMF commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and status"]
  node_web["Web interface<br/>[web_ui.cpp]"]
  node_wifi["WiFi setup<br/>[wifi_manager.cpp]"]
  node_config[("Persistent settings<br/>[config_manager.cpp]")]
  node_state["System state<br/>[system_state.cpp]"]
  node_led["Status LEDs<br/>[link_led.h]"]
end

subgraph group_control["Operator control"]
  node_dtmf["DTMF detection<br/>[dtmf_detector.cpp]"]
  node_commands["DTMF commands"]
  node_gate["DTMF VOX gate<br/>[dtmf_gate.h]"]
  node_announcer["Announcements<br/>[announcer.cpp]"]
end

subgraph group_audio["Audio processing"]
  node_pipeline["Audio pipeline<br/>[audio_pipeline.cpp]"]
  node_capture["Microphone capture<br/>[audio_in.cpp]"]
  node_playback["DAC playback<br/>[audio_out.cpp]"]
  node_jitter["Jitter buffer<br/>[jitter_buffer.cpp]"]
  node_preroll["VOX pre-roll<br/>[vox_pre_roll.h]"]
  node_codec["GSM codec adapter<br/>[gsm_codec.cpp]"]
  node_encoder["GSM encoder<br/>[Encoder.cpp]"]
  node_decoder["GSM decoder<br/>[Decoder.cpp]"]
end

subgraph group_network["EchoLink networking"]
  node_client["EchoLink client"]
  node_protocol["RTP/RTCP protocol"]
  node_proxy["Proxy support<br/>[echolink_proxy.cpp]"]
end

node_operator(("Operator"))
node_network_actor(("EchoLink network"))

node_operator -->|"manages"| node_web
node_web -->|"updates settings"| node_config
node_web -->|"controls connections"| node_client
node_web -->|"shows status"| node_state
node_wifi -->|"loads credentials"| node_config
node_wifi -->|"connects over WiFi"| node_network_actor
node_operator -->|"sends tones"| node_dtmf
node_pipeline -->|"processes frames"| node_dtmf
node_pipeline -->|"checks tone gate"| node_gate
node_dtmf -.->|"reports digits"| node_commands
node_commands -->|"issues commands"| node_client
node_commands -->|"requests feedback"| node_announcer
node_commands -->|"plays tones"| node_pipeline
node_pipeline -->|"reads microphone"| node_capture
node_pipeline -->|"writes audio"| node_playback
node_pipeline -->|"pops frames"| node_jitter
node_pipeline -->|"delays VOX audio"| node_preroll
node_pipeline -->|"supplies transmit audio"| node_client
node_client -->|"delivers receive frames"| node_pipeline
node_client -->|"encodes and decodes"| node_codec
node_codec -.->|"encodes PCM"| node_encoder
node_codec -.->|"decodes frames"| node_decoder
node_client -->|"uses packet protocol"| node_protocol
node_client -.->|"optionally routes via proxy"| node_proxy
node_client -->|"streams RTP/RTCP"| node_network_actor
node_announcer -->|"routes local audio"| node_playback
node_announcer -->|"routes TX audio"| node_client
node_client -.->|"updates connection state"| node_state
node_state -.->|"drives indicators"| node_led
node_operator -->|"sets up access"| node_wifi

click node_web "https://github.com/jetanin/esp32-microlink/blob/main/src/web_ui.cpp"
click node_wifi "https://github.com/jetanin/esp32-microlink/blob/main/src/wifi_manager.cpp"
click node_config "https://github.com/jetanin/esp32-microlink/blob/main/src/config_manager.cpp"
click node_state "https://github.com/jetanin/esp32-microlink/blob/main/src/system_state.cpp"
click node_led "https://github.com/jetanin/esp32-microlink/blob/main/include/link_led.h"
click node_dtmf "https://github.com/jetanin/esp32-microlink/blob/main/src/dtmf_detector.cpp"
click node_commands "https://github.com/jetanin/esp32-microlink/blob/main/src/dtmf_controller.cpp"
click node_gate "https://github.com/jetanin/esp32-microlink/blob/main/include/dtmf_gate.h"
click node_announcer "https://github.com/jetanin/esp32-microlink/blob/main/src/announcer.cpp"
click node_pipeline "https://github.com/jetanin/esp32-microlink/blob/main/src/audio_pipeline.cpp"
click node_capture "https://github.com/jetanin/esp32-microlink/blob/main/src/audio_in.cpp"
click node_playback "https://github.com/jetanin/esp32-microlink/blob/main/src/audio_out.cpp"
click node_jitter "https://github.com/jetanin/esp32-microlink/blob/main/src/jitter_buffer.cpp"
click node_preroll "https://github.com/jetanin/esp32-microlink/blob/main/include/vox_pre_roll.h"
click node_codec "https://github.com/jetanin/esp32-microlink/blob/main/src/gsm_codec.cpp"
click node_encoder "https://github.com/jetanin/esp32-microlink/blob/main/lib/gsm0610/src/Encoder.cpp"
click node_decoder "https://github.com/jetanin/esp32-microlink/blob/main/lib/gsm0610/src/Decoder.cpp"
click node_client "https://github.com/jetanin/esp32-microlink/blob/main/src/echolink_client.cpp"
click node_protocol "https://github.com/jetanin/esp32-microlink/blob/main/src/echolink_protocol.cpp"
click node_proxy "https://github.com/jetanin/esp32-microlink/blob/main/src/echolink_proxy.cpp"

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_web,node_wifi,node_config,node_state,node_led toneBlue
class node_dtmf,node_commands,node_gate,node_announcer toneAmber
class node_pipeline,node_capture,node_playback,node_jitter,node_preroll,node_codec,node_encoder,node_decoder toneMint
class node_client,node_protocol,node_proxy toneRose
class node_operator,node_network_actor toneIndigo
```

## Components

### Setup and status

- [Web interface](https://github.com/jetanin/esp32-microlink/blob/main/src/web_ui.cpp): `src/web_ui.cpp`
- [WiFi setup](https://github.com/jetanin/esp32-microlink/blob/main/src/wifi_manager.cpp): `src/wifi_manager.cpp`
- [Persistent settings](https://github.com/jetanin/esp32-microlink/blob/main/src/config_manager.cpp): `src/config_manager.cpp`
- [System state](https://github.com/jetanin/esp32-microlink/blob/main/src/system_state.cpp): `src/system_state.cpp`
- [Status LEDs](https://github.com/jetanin/esp32-microlink/blob/main/include/link_led.h): `include/link_led.h`

### Operator control

- [DTMF detection](https://github.com/jetanin/esp32-microlink/blob/main/src/dtmf_detector.cpp): `src/dtmf_detector.cpp`
- [DTMF commands](https://github.com/jetanin/esp32-microlink/blob/main/src/dtmf_controller.cpp): `src/dtmf_controller.cpp`
- [DTMF VOX gate](https://github.com/jetanin/esp32-microlink/blob/main/include/dtmf_gate.h): `include/dtmf_gate.h`
- [Announcements](https://github.com/jetanin/esp32-microlink/blob/main/src/announcer.cpp): `src/announcer.cpp`

### Audio processing

- [Audio pipeline](https://github.com/jetanin/esp32-microlink/blob/main/src/audio_pipeline.cpp): `src/audio_pipeline.cpp`
- [Microphone capture](https://github.com/jetanin/esp32-microlink/blob/main/src/audio_in.cpp): `src/audio_in.cpp`
- [DAC playback](https://github.com/jetanin/esp32-microlink/blob/main/src/audio_out.cpp): `src/audio_out.cpp`
- [Jitter buffer](https://github.com/jetanin/esp32-microlink/blob/main/src/jitter_buffer.cpp): `src/jitter_buffer.cpp`
- [VOX pre-roll](https://github.com/jetanin/esp32-microlink/blob/main/include/vox_pre_roll.h): `include/vox_pre_roll.h`
- [GSM codec adapter](https://github.com/jetanin/esp32-microlink/blob/main/src/gsm_codec.cpp): `src/gsm_codec.cpp`
- [GSM encoder](https://github.com/jetanin/esp32-microlink/blob/main/lib/gsm0610/src/Encoder.cpp): `lib/gsm0610/src/Encoder.cpp`
- [GSM decoder](https://github.com/jetanin/esp32-microlink/blob/main/lib/gsm0610/src/Decoder.cpp): `lib/gsm0610/src/Decoder.cpp`

### EchoLink networking

- [EchoLink client](https://github.com/jetanin/esp32-microlink/blob/main/src/echolink_client.cpp): `src/echolink_client.cpp`
- [RTP/RTCP protocol](https://github.com/jetanin/esp32-microlink/blob/main/src/echolink_protocol.cpp): `src/echolink_protocol.cpp`
- [Proxy support](https://github.com/jetanin/esp32-microlink/blob/main/src/echolink_proxy.cpp): `src/echolink_proxy.cpp`

### Other components

- **Operator**
- **EchoLink network**

## Connections

- Operator → Web interface: manages
- Web interface → Persistent settings: updates settings (evidence: `src/web_ui.cpp`)
- Web interface → EchoLink client: controls connections (evidence: `src/web_ui.cpp`)
- Web interface → System state: shows status (evidence: `src/web_ui.cpp`)
- WiFi setup → Persistent settings: loads credentials (evidence: `src/wifi_manager.cpp`)
- WiFi setup → EchoLink network: connects over WiFi
- Operator → DTMF detection: sends tones
- Audio pipeline → DTMF detection: processes frames (evidence: `src/audio_pipeline.cpp`)
- Audio pipeline → DTMF VOX gate: checks tone gate (evidence: `src/audio_pipeline.cpp`)
- DTMF detection → DTMF commands: reports digits
- DTMF commands → EchoLink client: issues commands (evidence: `src/dtmf_controller.cpp`)
- DTMF commands → Announcements: requests feedback (evidence: `src/dtmf_controller.cpp`)
- DTMF commands → Audio pipeline: plays tones (evidence: `src/dtmf_controller.cpp`)
- Audio pipeline → Microphone capture: reads microphone (evidence: `src/audio_pipeline.cpp`)
- Audio pipeline → DAC playback: writes audio (evidence: `src/audio_pipeline.cpp`)
- Audio pipeline → Jitter buffer: pops frames (evidence: `src/audio_pipeline.cpp`)
- Audio pipeline → VOX pre-roll: delays VOX audio (evidence: `src/audio_pipeline.cpp`)
- Audio pipeline → EchoLink client: supplies transmit audio (evidence: `src/audio_pipeline.cpp`)
- EchoLink client → Audio pipeline: delivers receive frames (evidence: `src/audio_pipeline.cpp`)
- EchoLink client → GSM codec adapter: encodes and decodes (evidence: `src/echolink_client.cpp`)
- GSM codec adapter → GSM encoder: encodes PCM
- GSM codec adapter → GSM decoder: decodes frames
- EchoLink client → RTP/RTCP protocol: uses packet protocol (evidence: `src/echolink_client.cpp`)
- EchoLink client → Proxy support: optionally routes via proxy
- EchoLink client → EchoLink network: streams RTP/RTCP
- Announcements → DAC playback: routes local audio
- Announcements → EchoLink client: routes TX audio
- EchoLink client → System state: updates connection state
- System state → Status LEDs: drives indicators
- Operator → WiFi setup: sets up access
