Skip to content

Add RTL8812EU/RTL8822EU adapter support (untested on hardware)#104

Open
wkumik wants to merge 1 commit into
OpenIPC:masterfrom
wkumik:rtl8812eu-support
Open

Add RTL8812EU/RTL8822EU adapter support (untested on hardware)#104
wkumik wants to merge 1 commit into
OpenIPC:masterfrom
wkumik:rtl8812eu-support

Conversation

@wkumik

@wkumik wkumik commented Jul 9, 2026

Copy link
Copy Markdown

Warning

⚠️ UNTESTED on real hardware. This is compile-tested only (arm64-v8a + armeabi-v7a build cleanly and the APK packages). It has not yet been flown or bench-tested with an RTL8812EU adapter, and the RTL8812AU path has not been regression-tested either. Testers with a BL-M8812EU2 (or any 8812EU/8822EU dongle) very welcome.

What

Adds support for RTL8812EU / RTL8822EU adapters (e.g. the LB-LINK BL-M8812EU2), the widely available successor to the EOL'd RTL8812AU, by updating the devourer submodule to current master and porting the native layer to its new multi-generation IRtlDevice API.

Upstream devourer now dispatches on the hardware chip-id (SYS_CFG2) at plug-in: RTL8812AU-family adapters take the Jaguar1 path (same code lineage as before), RTL8812EU/8822EU take the Jaguar3 path. This build compiles in Jaguar1 + Jaguar3-8822E support.

Changes

  • devourer submodule: old pin → current master (73f1cb4).
  • CMakeLists.txt: devourer source list rebuilt for the new upstream layout (upstream's own CMake needs pkg-config for libusb, unavailable in the NDK build, so the source groups are mirrored manually as before).
  • WfbngLink: ported to IRtlDevice:
    • bring-up is InitWrite + StartRxLoop instead of the old blocking Init. On Jaguar3 this is required for TX+RX on one USB handle (cfg.rx.enable_with_tx must be declared before bring-up) and it starts the coex runtime thread without which the 8822E silences its antenna during sustained TX. On Jaguar1, InitWrite + StartRxLoop is exactly what Init did internally, so 8812AU behavior is unchanged.
    • stop path uses StopRxLoop() + Stop() (clean chip power-down) instead of poking the removed should_stop field.
    • the manual libusb_handle_events thread is dropped — devourer's RX loop pumps events itself.
    • devourer's per-adapter advisory lock is pointed at the app files dir (Android has no /tmp).
    • the driver now gets a real Logger, which lands in logcat under the devourer tag.
  • TxFrame: takes the chip-agnostic IRtlDevice*.
  • usb_device_filter.xml: adds 0BDA:A81A (RTL8812EU), 0BDA:A82A / 0BDA:E822 (RTL8822EU).

Notes for testers

  • Keep the air side at 20 MHz bandwidth for first tests — the 8812EU does 5/10/20 MHz TX but 40 MHz is RX-only.
  • adb logcat -s devourer shows the bring-up; expect Creating RtlJaguar3Device (PID 0xa81a, chip-id 0x17) for an 8812EU and Creating RtlJaguarDevice for an 8812AU.
  • Things to verify: video RX, mavlink, adaptive-link TX power control (SetTxPower semantics changed upstream from a pre-efuse fallback to a real flat TXAGC override on all generations), channel/bandwidth switching, and adapter hot-replug.

🤖 Generated with Claude Code

https://claude.ai/code/session_01M1hdzm5Fs8XKS1AqymRm7r

Update the devourer submodule to current master, whose Jaguar3 backend
supports the RTL8812EU/RTL8822EU (e.g. LB-LINK BL-M8812EU2) alongside
the existing RTL8812AU family. The chip generation is auto-detected
from the SYS_CFG2 chip-id at plug-in.

Port the native layer to the new IRtlDevice API:
- bring-up is InitWrite + StartRxLoop instead of the blocking Init;
  on Jaguar3 this keeps RX open across the TX bring-up
  (cfg.rx.enable_with_tx) and starts the coex runtime thread that
  sustained TX needs, and on Jaguar1 it matches the old Init exactly
- stop goes through StopRxLoop()/Stop() instead of the should_stop flag
- drop the manual libusb event thread (devourer pumps its own events)
- point the driver's per-adapter lock at the app files dir (no /tmp
  on Android) and give the driver a real Logger (lands in logcat
  under the "devourer" tag)
- TxFrame takes the chip-agnostic IRtlDevice*

Add the 0bda:a81a (RTL8812EU) and 0bda:a82a / 0bda:e822 (RTL8822EU)
USB IDs to the device filter.

Compile-tested only (arm64-v8a + armeabi-v7a); not yet verified on
RTL8812EU or RTL8812AU hardware.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M1hdzm5Fs8XKS1AqymRm7r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant