Proposal: netcfg wifi doctor — diagnose missing wireless interface / Zero-CD mode / driver ID gaps / AP capability

Aperta
#13 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, linux
Ambito
cli, networking

Direzione di ricerca

Start by reading the existing netcfg wifi command implementation and how it handles Linux-specific capabilities. The proposal names iw dev, iw list, and /sys/bus/usb/devices as diagnostic sources; decide how to combine these checks and report unsupported systems. Done means a read-only netcfg wifi doctor reports interface, USB mode, driver ID, and AP capability findings with suggested fixes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Background

While bringing up a USB Wi-Fi hotspot on a robot host (Linux, NetworkManager 1.36) with netcfg wifi ap start, the operation failed three layers below netcfg, and each failure was only diagnosable by hand:

  1. the adapter enumerated in Zero-CD (mass-storage) mode (usb-storage claims it; iw dev shows nothing, so the default-iface lookup reports "no Wi-Fi interface found");
  2. after SCSI-ejecting it, the driver's USB ID table did not contain the new product ID, so the kernel silently ignored the device;
  3. once a driver bound, the adapter still might not list AP in its supported interface modes, which only surfaces later as an nmcli/hostapd failure.

Full field notes: the "USB Wi-Fi adapter bring-up" chain was written up for the smart-wifi project (LinuxSuRen/smart-wifi#1) — the same pain applies to netcfg users on Linux.

Proposal: netcfg wifi doctor

A read-only diagnostic command that inspects the local host and prints likely root causes + suggested fixes:

$ sudo netcfg wifi doctor
interfaces:     none found
usb adapters:   aicsemi "Aic MSC" a69c:5730  -> mass-storage (Zero-CD) mode
                suggest: sudo eject /dev/sdX   (adapter re-enumerates with its real ID)
driver id table: aic8800_fdrv loaded; 2604:0023 NOT in ID table
                suggest: driver too old for this adapter
ap capability:  unknown (no interface yet)

Checks would be:

  • iw dev / interfaces present; rfkill state;
  • lsusb-level view (via sysfs /sys/bus/usb/devices) to detect adapters stuck in mass-storage mode (class 08, or known Zero-CD vendor/product pairs) and name the eject fix;
  • driver alias tables (/sys/bus/usb/drivers/*/new_id peers / module aliases via modinfo) vs. the adapter's vendor:product;
  • once an interface exists: AP in supported interface modes (iw list), warning before wifi ap start fails obscurely.

All read-only except an optional --fix that could perform the eject for Zero-CD adapters (opt-in).

Notes

  • Linux-only surface; on macOS/Windows it reports unsupported like other Linux-specific capabilities.
  • The output could also feed wifi ap start's error messages (e.g. "adapter is in storage mode, run netcfg wifi doctor").
Lingua principale
Go
Stelle
1
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LinuxSuRen/net-tool

Tutte le issue di LinuxSuRen/net-tool

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.