# aa-eion/rtl8723be-macos-wifi architecture

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

- Interactive diagram: https://gitdiagram.com/aa-eion/rtl8723be-macos-wifi
- Repository: https://github.com/aa-eion/rtl8723be-macos-wifi

## Overview

RTL8723BE Wi-Fi is a macOS driver and menu-bar utility for bringing an RTL8723BE card online. The user loads the driver, scans nearby 2.4 GHz networks, joins a WPA2 network, then monitors connection status and traffic in the app or uses the CLI. The README also documents automatic antenna selection, diagnostic controls, and Ethernet-frame handoff to macOS networking. The driver’s main implementation was read, but many internal calls were not excerpted; edges without direct source evidence are documented README relationships, and omitted internal links are deliberate.

Main entry points: [`src/RTL8723BE.cpp`](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE.cpp) (Device controller), [`src/RTL8723BEUserClient.cpp`](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BEUserClient.cpp) (IOUserClient), [`gui/Sources/AppModel.swift`](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/AppModel.swift) (App model), [`gui/Sources/App.swift`](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/App.swift) (Menu-bar app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_appui["Menu-bar app<br/>[App.swift]"]
  node_views["App screens<br/>[ContentView.swift]"]
  node_networkview["Network picker<br/>[NetworksCard.swift]"]
  node_settings["Driver settings<br/>[SettingsPage.swift]"]
end

subgraph group_control["User controls"]
  node_model["App model<br/>[AppModel.swift]"]
  node_bridge["IPC bridge<br/>[RTL8723BEBridge.h]"]
  node_cli["CLI<br/>[rtl8723be_cli.cpp]"]
  node_ipc["IPC contract<br/>[RTL8723BE_ipc.h]"]
end

subgraph group_driver["Kernel driver"]
  node_userclient["IOUserClient"]
  node_controller["Device controller<br/>[RTL8723BE.cpp]"]
end

subgraph group_radio["Radio and security"]
  node_hardware["Hardware support<br/>[RTL8723BE_hw.hpp]"]
  node_firmware["Firmware images"]
  node_radio_tables["Radio tables"]
  node_crypto["WPA2 crypto"]
end

subgraph group_system["macOS networking"]
  node_pci["RTL8723BE card"]
  node_ethernet["Ethernet interface"]
  node_macos["macOS network stack"]
end

node_user(("User"))

node_user -->|"opens"| node_appui
node_appui -->|"shows"| node_views
node_views -->|"renders"| node_networkview
node_views -->|"renders"| node_settings
node_networkview -->|"requests scan/join"| node_model
node_settings -->|"changes settings"| node_model
node_appui -->|"creates"| node_model
node_model -.->|"calls"| node_bridge
node_cli -->|"sends IPC"| node_userclient
node_bridge -.->|"sends IPC"| node_userclient
node_userclient -->|"uses ABI"| node_ipc
node_userclient -->|"dispatches controls"| node_controller
node_controller -.->|"controls radio"| node_pci
node_controller -.->|"loads firmware"| node_firmware
node_controller -.->|"configures radio"| node_radio_tables
node_controller -.->|"runs WPA2"| node_crypto
node_controller -.->|"exchanges frames"| node_ethernet
node_ethernet -->|"hands off frames"| node_macos

click node_appui "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/App.swift"
click node_views "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/Views/ContentView.swift"
click node_networkview "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/Views/NetworksCard.swift"
click node_settings "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/Views/SettingsPage.swift"
click node_model "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/AppModel.swift"
click node_bridge "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/RTL8723BEBridge.h"
click node_cli "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/tools/rtl8723be_cli.cpp"
click node_ipc "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_ipc.h"
click node_userclient "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BEUserClient.cpp"
click node_controller "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE.cpp"
click node_hardware "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_hw.hpp"
click node_firmware "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_firmware.cpp"
click node_radio_tables "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_tables.cpp"
click node_crypto "https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_crypto.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_appui,node_views,node_networkview,node_settings,node_user toneBlue
class node_model,node_bridge,node_cli,node_ipc toneAmber
class node_userclient,node_controller toneMint
class node_hardware,node_firmware,node_radio_tables,node_crypto toneRose
class node_pci,node_ethernet,node_macos toneIndigo
```

## Components

### App experience

- [Menu-bar app](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/App.swift): `gui/Sources/App.swift`
- [App screens](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/Views/ContentView.swift): `gui/Sources/Views/ContentView.swift`
- [Network picker](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/Views/NetworksCard.swift): `gui/Sources/Views/NetworksCard.swift`
- [Driver settings](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/Views/SettingsPage.swift): `gui/Sources/Views/SettingsPage.swift`

### User controls

- [App model](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/Sources/AppModel.swift): `gui/Sources/AppModel.swift`
- [IPC bridge](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/gui/RTL8723BEBridge.h): `gui/RTL8723BEBridge.h`
- [CLI](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/tools/rtl8723be_cli.cpp): `tools/rtl8723be_cli.cpp`
- [IPC contract](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_ipc.h): `src/RTL8723BE_ipc.h`

### Kernel driver

- [IOUserClient](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BEUserClient.cpp): `src/RTL8723BEUserClient.cpp`
- [Device controller](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE.cpp): `src/RTL8723BE.cpp`

### Radio and security

- [Hardware support](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_hw.hpp): `src/RTL8723BE_hw.hpp`
- [Firmware images](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_firmware.cpp): `src/RTL8723BE_firmware.cpp`
- [Radio tables](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_tables.cpp): `src/RTL8723BE_tables.cpp`
- [WPA2 crypto](https://github.com/aa-eion/rtl8723be-macos-wifi/blob/main/src/RTL8723BE_crypto.cpp): `src/RTL8723BE_crypto.cpp`

### macOS networking

- **RTL8723BE card**
- **Ethernet interface**
- **macOS network stack**

### Other components

- **User**

## Connections

- User → Menu-bar app: opens (evidence: `README.md`)
- Menu-bar app → App screens: shows (evidence: `gui/Sources/App.swift`)
- App screens → Network picker: renders (evidence: `gui/Sources/Views/ContentView.swift`)
- App screens → Driver settings: renders (evidence: `gui/Sources/Views/ContentView.swift`)
- Network picker → App model: requests scan/join (evidence: `gui/Sources/Views/NetworksCard.swift`)
- Driver settings → App model: changes settings (evidence: `gui/Sources/Views/SettingsPage.swift`)
- Menu-bar app → App model: creates (evidence: `gui/Sources/App.swift`)
- App model → IPC bridge: calls
- CLI → IOUserClient: sends IPC (evidence: `tools/rtl8723be_cli.cpp`)
- IPC bridge → IOUserClient: sends IPC
- IOUserClient → IPC contract: uses ABI
- IOUserClient → Device controller: dispatches controls (evidence: `src/RTL8723BEUserClient.cpp`)
- Device controller → RTL8723BE card: controls radio (evidence: `README.md`)
- Device controller → Firmware images: loads firmware (evidence: `README.md`)
- Device controller → Radio tables: configures radio (evidence: `README.md`)
- Device controller → WPA2 crypto: runs WPA2 (evidence: `README.md`)
- Device controller → Ethernet interface: exchanges frames (evidence: `README.md`)
- Ethernet interface → macOS network stack: hands off frames (evidence: `README.md`)
