Repository navigation
Wifi-Diagnostic.sh: Bind checks to Wi-Fi interface and handle disconnected state - #91
Open
techmandan wants to merge 1 commit into
Open
techmandan wants to merge 1 commit into
techmandan wants to merge 1 commit into
Conversation
…ected state - Detect the Wi-Fi interface before running connectivity checks and bind ping to it with `-I` so an active Ethernet/USB-Ethernet route does not produce a false pass when Wi-Fi is down. - Check ping's exit status and use a word boundary before `0% packet loss` so `100% packet loss` does not falsely match. - Replace the piped `while read` loop in `check_wifi_interfaces` with process substitution so `SSID`, `POWER_SAVE`, and `interface` survive into `summarize_findings`. - Bind `speedtest-cli` to the Wi-Fi interface IPv4 address (`--source`) and skip the speed test when Wi-Fi has no active IPv4 connection. - Validate numeric fields before invoking `bc -l` in `summarize_findings` to prevent syntax and integer-expression errors when disconnected. Fixes FrameworkComputer#41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Evidence
wlp1s0Not connected.):Exited
0; ranping -c 4 8.8.8.8andspeedtest-cli --secureover Ethernet; lostSSID="N/A"in the piped subshell; printed empty- SSID:and[: : integer expression expectederrors acrosssummarize_findings.bash -n+ 3 stubbed end-to-end runs):wlp1s0disconnected (100% packet lossonping -I wlp1s0): exits1cleanly, notes active non-Wi-Fi default route, skipsspeedtest-cli, zero stderr.5180 MHz,-55 dBm,240.0 MBit/s,192.168.1.50) + Ethernet UP: invokesping -I wlp1s0andspeedtest-cli --source 192.168.1.50, preservesSSIDand insights, zero stderr.summarize_findings: printsN/Acleanly with zerobcor[errors.Merge Danger
Door: Two-way
Blast Radius: Low — isolated to
Network-Diagnostic-Scripts/Wifi-Diagnostic.sh.Fixes #41