Proposal: pre-flight checks for Wi-Fi interface & AP capability before starting hotspot
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- linux, python
- Domain
- backend, networking
Research direction
The issue does not name project files or tests; start by locating where the app invokes hostapd and how it handles a missing WIFI_INTERFACE. Read the related bring-up guide in issue #1 for the reported failure modes. Done means the agreed pre-flight checks give a clear error when AP mode or the configured interface is missing; the optional Zero-CD switching proposal needs its own scope decision.
Written by the indexing model from the issue text.
Description
Background
While bringing up a USB Wi-Fi adapter (Tenda, AICSemi AIC8800D80) on a robot
host (custom kernel 6.5.2-rt8, NetworkManager 1.36) I ran into several
failure modes that happen before smart-wifi's own code path starts. The
full troubleshooting story is documented in #1 (USB Wi-Fi adapter
bring-up guide).
Summary of the gap: smart-wifi assumes WIFI_INTERFACE already exists and
is AP-capable. When that assumption fails, the UI surfaces a generic
hostapd failure while the root cause is 2鈥? layers below (adapter in
Zero-CD storage mode, driver not bound to the USB ID, or chipset without
AP interface mode).
Proposals
1. AP capability pre-flight check
Before invoking hostapd, verify the interface actually supports AP mode:
iw list | grep -A 12 'Supported interface modes' # must contain '* AP'
If missing, fail fast with a clear message ("interface wlan0 does not
support AP mode") instead of a hostapd error that users will stare at
without a clue.
2. Interface diagnostic hints when WIFI_INTERFACE is missing
When the configured interface does not exist (iw dev shows nothing for
it), the web UI could suggest the two most common root causes:
- adapter stuck in Zero-CD (MSC) mode 鈥?enumerated as
usb-storage;
anejectre-enumerates it as a Wi-Fi device (ID changes!); - driver missing 鈥?
modinfo <module>ID table does not contain the
adapter'svendor:productID.
A "Diagnostics" panel with lsusb / iw dev / iw list output (read-only)
would cover most bring-up cases without turning smart-wifi into a driver
installer.
3. Optional: auto mode-switch for Zero-CD adapters
If the adapter exposes a usb-storage interface, automatically send a SCSI
eject (equivalent of eject /dev/sdX) before reporting "no wireless
interface". This is what usb_modeswitch does; for most current adapters
the plain eject is sufficient. Feature-flagged, off by default 鈥?switching
SCSI devices is outside the comfort zone of a Wi-Fi manager.
Verified facts from the field
- Zero-CD switch:
a69c:5730(aicsemi "Aic MSC") 鈫?eject /dev/sda鈫? re-enumerates as2604:0023(Tenda AIC 8800D80). Verified. - Forced driver binding via
new_idon an ID the driver does not know
caused an instant kernel NULL-pointer oops (aic8800_fdrv). System ended
half-alive (lsusb/ps hung). Verified 鈥?do not recommendnew_idanywhere
in docs. - AIC8800D80/D80C-class chips need an out-of-tree driver on stock Ubuntu
kernels; actively maintained sources:
shenmintao/aic8800d80, Kiborgik/aic8800dc-linux-patched (DKMS).
Happy to contribute the read-only diagnostics panel (proposal 1+2) if there
is interest 鈥?the checks are cheap (iw, lsusb parsing).
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[Maintainer] task area:visualizer
Difficulty 1/5 Under an hour Newbie friendliness 78/100
RailtownAI/railtracks#1824 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
apache/datafusion#27688 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
heasarc/heasarc-tutorials#317 ·
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
mloda-ai/mloda-registry#1664 ·
Maintainers usually reply within 1 day