add-wifi-card
GitHub评估并适配 nekodrop 中未列出的 Wi-Fi 适配器,支持 PCI/USB 硬件 ID 或板级修订版,或为现有卡片添加并发模式。
触发场景
安装
npx skills add zheznanohana/nekodrop --skill add-wifi-card -g -y
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, or add Concurrent mode to a supported card. Use when a user wants to adapt their own card, check if an existing radio backend can drive it, or port a new backend."
}
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.
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, andREVwhen present. For USB, keepVID,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. A request to add Concurrent mode goes directly to the station work once the existing On-Demand baseline is confirmed.
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. |
| 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. |
| 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, and scripts/build-radio-rtl.ps1 plus winawdl/devourer for the RTL8852C/B integration. The RTL8922AE backend in rtw89radio/ illustrates a separate Realtek radio. Other vendors follow the same evidence checks. BE200 shows a new firmware API within an existing backend.
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.hand 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 executable, implementIRadioBackendinapp/service/RadioBackends.cs, register it inRadioBackends.All, and pass only its accepted arguments. ExtendCardCatalog.SelfTest()to cover the match and launch plan. For a board-limited port, test another board and revision with the sameVEN/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. Keepinstaller/install.ps1,installer/report.ps1, andinstaller/restore.ps1aligned 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. - Concurrent mode. Reuse
WifiStationandStaDevicefor the Wi-Fi station when the backend can implement the contract. Carry through the supported bands, channel sharing and fallback. Turn onSupportsConcurrentWifionly for the applicable profiles and verify both station operation and AirDrop under concurrent use.
4. 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
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. 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
5. 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.
- 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. 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
版本历史
- f8d0f9c 当前 2026-12-06 04:00


