Repository navigation
WiFi Insight 2.1.0
Gentler scanning on routers that limit one-channel scans or check for radar in the background, a repair that keeps nearly everything still readable, and a page that waits while its tab is hidden.
repairkeeps much more of a damaged database. It copied with sqlite3's.dump, which reads a table from the start up to the first damaged page, then from the end back to the last one, and loses everything between: with two damaged pages in a day of samples, 3660 of 5760 were kept. The firmware's sqlite3 3.25.3 (Merlin 386.1 to 3004.388.5) also reads a damaged page differently from one run to the next, and now and then kept only the rows before the damage (365 of 5760 in a test). Now each table is copied in chunks of 100 rows, and a chunk that fails is read again row by row, so only the rows on damaged pages are lost (5550 in the first case, 5701 every time in the second). If sqlite3 itself crashes on a damaged page, the copy keeps everything before it and carries on after it, and a damaged end of a table that reads as a nonsense row number no longer sends the copy through billions of empty rows. A database nothing can be read from is left as it is.repairnever writes through a link. It made the new copy at a fixed name in the data folder (wifiinsight.db.new), on a drive others may be able to write to. Someone able to put a link there while it ran could have had it create a file elsewhere on the router instead, as root, with rows from the damaged database. The copy is now made in a folder of its own, created just then under a name nobody can guess, and moved into place.- Gentler one-channel scans on drivers with a cool-down (thanks to Squall Leonhart for measuring it): an RT-AX88U takes a single-channel scan only every 10.2 s, however often it's asked. WiFi Insight was asking every 2 s until it did, so most requests were refused. Now it learns how long the driver needs between them and waits that out: about one request in two is refused once, instead of four or five for every channel, and no channel is skipped. Spread-out scans are at least 20 s apart (they could be a few seconds apart within a minute), or longer if the driver needs it, coming back down a second at a time once it doesn't.
- Background radar checks are left alone. With zero-wait DFS, acsd can have a 5 GHz radio listen to another channel for radar before moving there, for a minute (ten on weather-radar channels), and the driver refuses scans meanwhile. A scan now waits up to 90 s for the check to end (sampling carries on), or leaves that band for the next scan, and spread-out scans skip that minute. Such a refusal is no longer taken for a driver that refuses full scans, which used to switch the band to one channel at a time.
debugshows the radio's check status (wl dfs_ap_move). - Scan now isn't held up by spread-out scans. On routers that refuse full 5 GHz scans, a spread-out scan kept the radio for half a minute or more, and Scan now waited for it without a word to the page, which said after 15 s that the router didn't start the scan. Spread-out scans now let go of the radio between channels, so Scan now starts within seconds, and the page knows at once that it's under way; if another scan really does keep it waiting for over a minute, the page says so.
- The page doesn't redraw in a hidden tab (thanks to Squall Leonhart): while the tab is in the background or the window is minimised, the charts aren't redrawn and the data isn't refreshed. When you come back, the page fetches anything it skipped and then redraws, so the data is as fresh as with the tab open and older figures never flash up meanwhile. In Firefox, charts drawn in the background could stay blank until hovered.
Install or update
Over SSH on the router:
curl -fsL --retry 3 "https://raw.githubusercontent.com/IfSugar/wifiinsight/2.1.0/wifiinsight.sh" -o /tmp/wifiinsight.sh && sh /tmp/wifiinsight.sh installAlready installed? Run /jffs/addons/wifiinsight/wifiinsight.sh update. Your settings and history are kept.
Full diff: 2.0.0...2.1.0