Agent Skills › zheznanohana/nekodrop › add-wifi-card

add-wifi-card

GitHub

用于在 nekodrop 中适配新 Wi-Fi 网卡、添加并发模式或优化性能。涵盖硬件识别、后端移植、吞吐量调优及生命周期加固,支持 PCI/USB 设备的驱动集成与故障排查。

.agents/skills/add-wifi-card/SKILL.md zheznanohana/nekodrop

Trigger Scenarios

用户希望添加未列出的 Wi-Fi 适配器支持 需要为现有网卡启用并发模式或提升稳定性

Install

npx skills add zheznanohana/nekodrop --skill add-wifi-card -g -y
More Options

Non-standard path

npx skills add https://github.com/zheznanohana/nekodrop/tree/main/.agents/skills/add-wifi-card -g -y

Use without installing

npx skills use zheznanohana/nekodrop@add-wifi-card

指定 Agent (Claude Code)

npx skills add zheznanohana/nekodrop --skill add-wifi-card -a claude-code -g -y

安装 repo 全部 skill

npx skills add zheznanohana/nekodrop --all -g -y

预览 repo 内 skill

npx skills add zheznanohana/nekodrop --list

SKILL.md

Frontmatter
{
    "name": "add-wifi-card",
    "description": "Assess and add support in nekodrop for an unlisted Wi-Fi adapter, PCI or USB hardware ID, or board revision, add Concurrent mode to a supported card, or make a supported card faster or more reliable. Use when a user wants to adapt their own card, check if an existing radio backend can drive it, port a new backend, or tune a card's AirDrop throughput."
}

Adapt a Wi-Fi card for nekodrop

Work from a source checkout of nekodrop. Run commands and interpret code paths from the repository root. Use the current checkout, its architecture guide, and the compatibility matrix to distinguish shipped, experimental, and unlisted hardware.

A card is adapted in stages. Each stage has its own exit check, and a card can ship as experimental after any stage from 3 on, as long as the README and compatibility tables say which stage it reached:

Stage Goal Exit check
1 Identify the hardware Full hardware ID, board, Windows build, wanted mode
2 Decide reuse or port Nearest backend and the evidence for it
3 Bring-up, On-Demand Radio reaches ready on channel N, two-way AirDrop, Windows Wi-Fi comes back
4 Throughput Block Ack / A-MPDU both ways where the chip can do it; see throughput
5 Concurrent mode Wi-Fi and AirDrop at the same time, fallback works
6 Lifecycle hardening Sleep, scan, stop and hand-back all leave the card usable

1. Identify the hardware

  • Start with the full hardware ID from Device Manager → Network adapters → card properties → Details → Hardware Ids. For PCI, keep VEN, DEV, SUBSYS, and REV when present. For USB, keep VID, PID, and any revision or interface suffix. Record the Windows build, laptop or board model, adapter driver provider/version, and whether the goal is On-Demand or Concurrent (Wi-Fi alongside AirDrop).
  • A nekodrop diagnostic report works from the source checkout without installing nekodrop. Run powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\installer\report.ps1 -NoOpen. It requests elevation and writes a Markdown summary and text log to the Desktop. For identification alone, Device Manager is enough. Review both files for private information before sharing. Report and restore instructions
  • If the user only knows the marketed model, narrow the candidates and give the exact steps to collect the missing ID before editing a match table. If the full ID is already supported, use the diagnostic report to investigate profile selection or driver handoff; the fix-nekodrop skill covers report triage. A request to add Concurrent mode goes directly to the station work once the existing On-Demand baseline is confirmed.
  • A request often arrives as a GitHub issue from the new Wi-Fi card template, which already asks for these fields and a report.

2. Decide what needs to change

Compare the exact adapter against a known profile and the matching entry in the upstream driver. Check bus and transport, MAC/RF generation, register layout, firmware API and variant, and any board-specific calibration or regulatory data requirements. Record the nearest backend, the source files or pinned revisions that support the decision, and the remaining unknowns.

Evidence Adaptation path
Same transport and firmware contract as an existing profile Reuse that backend and add the verified ID. Keep its existing capabilities and launch arguments unless the evidence calls for a narrower set.
Same backend with a known family or board difference Add a narrowly matched profile and the smallest backend change that handles the difference. Include subsystem and revision in the match when the evidence is board-specific.
Same MAC family, different RF module or firmware variant Reuse the transport and command path of the nearest family, and pick the firmware by MAC + RF pair (AX211 on Meteor Lake, 8086:7E40, is a Ma MAC with a GF radio: AX210 transport, Bz MLD command path, iwlwifi-ma-b0-gf-a0-89).
Different bus, transport, register layout, or firmware API Assess a backend port. PCI BAR mapping applies to PCI devices. A USB adapter needs a supported USB transport and its own binding, packaging, and restore path.
An existing open-source project already speaks the radio pipe Integrate it as a daemon with pinned source and build-time patches (RTL8852CE/BE through winawdl/devourer), instead of rewriting it.
Firmware, usable driver source, or exact board evidence is missing Report which dependency or evidence is missing and what would establish feasibility. Keep any draft scoped to the evidence.

Useful starting points are iwxradio/src/cards.h and upstream iwlwifi/OpenBSD iwx for Intel, mtradio and mtkradio plus upstream mt76 for MediaTek, scripts/build-radio-rtl.ps1 plus winawdl/devourer for RTL8852C/B, and rtw89radio/ plus Linux rtw89 for RTL8922AE. Other vendors follow the same evidence checks. BE200 shows a new firmware API within an existing backend; RTL8922AE shows a new backend ported stage by stage with a contributor who owns the card.

3. Implement and wire up the selected path

  • Radio and firmware. Update the family matcher when needed. A new radio can reuse the existing radio pipe contract in iwxradio/src/radio_link.h and the shared backend and platform code where applicable. Scope shared changes to the proven family or capability and cover an existing profile in regression checks. Start a new backend in On-Demand mode and enable only the capabilities it implements. For daemon contracts, firmware and deeper bring-up, read radio bring-up.
  • Service. In app/service/CardCatalog.cs, set the profile match, capabilities, driver provider names and BAR minimum as applicable. If validation is board-specific, constrain the service match to the proven subsystem and revision and apply the same scope to the INF, installer, diagnostics and restore. Add a manual model when a distinct user-selectable model is needed and keep its scope consistent with auto-detection. For a new chip family, add a ChipKind and an IChipModule in its vendor's backend under app/service/Radio/ (a new brand also gets an IVendorBackend registered in RadioBackends). Put chip-specific start tuning in Adapt/ChipArgs and pass only arguments the daemon accepts. Experimental options in the client are greyed out on cards whose radio does not act on them, so declare only the options the chip really implements.
  • Chip behaviour (ChipTraits). The Supervisor never tests chip kinds; it reads traits. Set only the ones the card needs, each backed by a log or an issue: Stop (kill, or ask the radio to quit cleanly), EarlyFirmwareFault, SlowScan (a full scan takes the radio off AWDL for seconds), FinishScanBeforeStop (stopping mid-scan wedges the card), PanelHints, RestoreDriverOnFailedStart, PassiveChannelFallback, ReportsFirmwareMac, LiveStationModeSwitch. A behaviour no trait covers gets a new trait with a self-test, not a chip check in the Supervisor.
  • Check the launch plan. Diff NekoDropService --dump-radio-launches before and after: every existing card's launch must stay byte-for-byte the same unless the change is meant for it. Extend CardCatalog.SelfTest() to cover the match, traits and launch plan. For a board-limited port, test another board and revision with the same VEN/DEV.
  • Binding, installer and recovery. For PCI adapters using the common register proxy, add the verified ID to driver/regproxy/winawdl_regproxy.inf. A dedicated driver uses its own equally narrow match. Keep installer/install.ps1, installer/report.ps1, and installer/restore.ps1 aligned with the service catalog and applicable INF. Preserve Windows PowerShell 5.1 compatibility and the four-hex-digit device ID boundary. When adding a daemon, check packaging, required firmware and licenses, and the stop lists in install, uninstall, restore and diagnostics.
  • CI. A new daemon gets built and self-tested in .github/workflows/build.yml for every pull request, as rtw89radio is.

4. Make it fast

Two-way AirDrop at a few MB/s means frames go one at a time. Most of the speed comes from Block Ack aggregation, and it is usually a port of the upstream driver's code rather than new design. Follow throughput: it covers reading the radio's aggregate: and tx: lines, telling an air-limited link from a supply-limited one, ring depths, rate ladders, A-MSDU and the measurements to record.

5. Concurrent mode

Reuse WifiStation and StaDevice for the Wi-Fi station when the backend can implement the contract. Carry through the supported bands, channel sharing and fallback. Turn on SupportsConcurrentWifi only for the applicable profiles and verify both station operation and AirDrop under concurrent use. Known patterns, applied only when the logs show the same problem:

  • Create the AWDL listener after the station associates when the firmware allows one interface to come up first (Intel Bz/MLD, BE201).
  • While an AirDrop transfer runs, pause the station and decline the access point's ADDBA if the firmware cannot serve both at full rate (AX203).
  • A single-channel radio time-shares the station and AWDL and limits the station to the AWDL band (MT7902 in mtradio/).
  • A board whose RF misbehaves at 80 MHz on one channel gets a narrow automatic fix for that board and channel (AX201 SoF/HR2: 20 MHz on 149), matched by subsystem.

6. Build and verify

From the repository root on Windows, with the .NET 8 SDK, run the offline catalog checks against the service built from this checkout. They require neither the target card nor administrator rights.

dotnet publish .\app\service\NekoDrop.Service.csproj -c Release -o .\build\card-check
.\build\card-check\NekoDropService.exe --selftest
.\build\card-check\NekoDropService.exe --dump-radio-launches > .\build\launches-after.txt
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\installer\install.ps1 -SelfTest
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\installer\report.ps1 -SelfTest
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\installer\restore.ps1 -SelfTest

Check that the service, installer, diagnostic report, restore script and relevant INF all agree on what IDs are accepted. Keep the shared installer/report tables synchronized. Use the affected backend's scripts/build-radio*.ps1 entry point for its native build and offline tests. For a test package, follow the Windows toolchain requirements and run scripts/fetch-deps.ps1, then scripts/build-installer.ps1; a pull request also gets an unsigned installer as the CI installer artifact. On other hosts use the repository's portable checks where applicable and record which Windows checks still need to run. Build guide · Windows CI workflow

7. Validate on the target card

Keep the vendor Wi-Fi driver and the restore procedure available locally before changing the test PC's driver. Run live installation and device tests on the user's test machine with their approval. When the person with the card is not the person writing the code, follow field testing: one change per test build, a fixed test script, and a diagnostic report back after every run.

  • Confirm the exact profile matches and the radio reaches ready. Check AWDL discovery and transfer a file in both directions with an Apple device. Record Windows build, hardware ID including board/revision, mode, transfer results and speeds.
  • Stop AirDrop and verify that Windows Wi-Fi comes back in On-Demand mode. Test the restore entry point. Put the PC to sleep and wake it with nekodrop running. If claiming Concurrent support, test Wi-Fi connectivity during a transfer and verify the supported bands and fallback.
  • Collect the diagnostic report after the test. Mark build-only or partly tested support as experimental and name the modes and directions still pending. Update both READMEs and compatibility tables when the supported scope changes. Include the exact match, upstream provenance, offline checks, hardware results and any gaps in the local handoff or an authorized PR. Test methodology

Version History

  • adbdc81 Current 2026-12-06 16:25
  • 8f27206 2026-12-06 10:13
  • f8d0f9c 2026-12-06 04:00

Same Skill Collection

.agents/skills/create-theme/SKILL.md
.agents/skills/fix-nekodrop/SKILL.md
.claude/skills/add-wifi-card/SKILL.md
.claude/skills/create-theme/SKILL.md
.claude/skills/fix-nekodrop/SKILL.md

Metadata

Files
0
Version
adbdc81
Hash
8a26a54f
Indexed
2026-12-06 04:00

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-12-06 16:50
浙ICP备14020137号-1