FINDINGS: main's 34 (LEDs, the second F50) before this branch's 35, under its own heading. The F50 lamp states that
K68/K38 point to are on main now. Host 650 OK, busybox OK, check-i18n and luci-i18n clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
`tr < /proc/$pid/cmdline 2>/dev/null` reports a failed redirection before its own 2>/dev/null applies, so every
check of a dead owner put "/opt/mu300/bin/mu300-at: line 96: can't open /proc/7668/cmdline" into mobile-data's
radio.log lines (seen on both devices while the modem was down). The read is braced in mu300-at, mu300-atd,
mobile-data, mu300-sms and mu300-smsd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Under set -e, L=$(cat /run/mu300/linux-slot) failing ended the script before modem_control: with a boot image that
does not publish the file (F50 #1, booted by the v2026.10.08 image), procd respawned it every 10 s and the AT
channel never answered (measured on openwrt-luci: vendor-perms, then nothing, eight times in 100 s). Now the slot
falls back to the command line as intended; with the fix the same boot registered at 30.6 s and had data at 46 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Conflicts kept both sides: boot/init's region marker before the usb-net and pick-root blocks; android-vendor-start
links the partitions of the eMMC found by type, through the fork-free link_partitions; the OpenWrt build links the
shared path-commands list and keeps the panel's own services and mu300-sms; no VPN engine in either image (the vpn
extra) while the panel's docker mounts stay positional; assemble.sh enables mu300-atd2 next to the update notice;
android-install keeps openwrt-luci and the extras on a legacy wipe; make-release audits both the panel asset and the
vpn extra.
The third system in main's new places: mu300-extra counts a disk with only openwrt-luci as mounted, the Magisk
installer sees an installed openwrt-luci (space, plan, MU300_BOOT_OS) and names the installed systems in its last
hint (the fixed "ubuntu|openwrt" text became the {1} form install.sh already uses). Tests that read what git tracks
skip where there is no checkout (a container with only the worktree mounted).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Conflicts: mu300-update keeps main's comment ("its boot image") and this
branch's clean_broken before the download; FINDINGS takes main's 31l
(the card slot took mmc0) before this branch's 31m (hard hangs), and 31m's
table now points at 31l instead of the mmc-order-fix branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
"wifi sync S" reads wlan0 again every 2 s for S seconds and sets the LED on every change: a hotspot LuCI turned on
can take longer than one moment to come up (the reload trigger now follows it for a minute), and the Wi-Fi button
on OpenWrt ran "wifi up" with nothing to light the LED afterwards. "mu300-led test" now includes the F50's Wi-Fi
light, and thermal-guard says the siren is red, white and blue. The kmsg-forward test filters only where grep has
--line-buffered (GNU's: the script runs on Ubuntu alone).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
With a live daemon mu300-at could wait 12 s for the lock and T + 30 = 38 s for the answer, so rpcd killed the call and
the page showed a generic failure. mu300-at takes MU300_AT_BUDGET to shorten (never lengthen) its answer wait; the
panel sets both limits for its AT call only, and a budget that runs out is a translated busy reply saying the command
may still run (final review minor 4).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
mobile-data gains radio-locked CMD (CMD under the lock radio_on takes, held by mobile-data itself, so its
lock_owner_alive and reaper keep working unchanged; 75 when busy) and radio-busy. The action adapter runs its radio
ops through it and the backend refuses them with a translated "busy" before detaching; a lock apply's or late
replay's SFUN restart waits up to two minutes for the dial or the watchdog instead. Without mobile-data the panel
runs as before (final review minor 3, K57).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Any answer without OK ended every radio round before CFUN, for the whole boot, on a firmware that refuses the
handshake. A final ERROR, +CME ERROR or +CMS ERROR is now logged, the once-per-boot marker written and the round goes
on; only no answer (a timeout, the client lock busy, no final result code) still ends it. All systems (final review
minor 2, K57).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
It read with --follow-new, so the early call traces (seconds before the service starts) never reached the
journal; a restart still forwards only what is new. With an ignore list, "exec" in the pipeline replaced only a
subshell, and the unfiltered dmesg ran once the filtered one ended. The README says where the warnings are:
journalctl -t kernel (journald has ReadKMsg=no, so -k shows nothing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
The F50's Wi-Fi light is the PMIC's keypad backlight sink (ZTE lights it at 48 of 127 while the hotspot is up);
mu300-led mapped no Wi-Fi LED on the F50, so it stayed dark. "wifi sync" reads wlan0 back, and OpenWrt runs it after
a wireless reload (LuCI turning Wi-Fi off or on). mu300cell no longer turns a 5G connection blue with "data on", and
the watchdog keeps red while there is no service. Measured on both F50s: every state read back from /sys/class/leds;
F50 #1 (OpenWrt) LuCI-style off/on: 48 -> 0 -> 48.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
K12, K67 (K10 stays c). Ported from the kanoqwq fork: cd4fb28 (--fast-run, usb-ready one-shot), 4e70d02 (role check, configfs mount, --ready).
mu300-usb-reset keeps --if-no-lease and the 20 s re-enumeration stays; mu300-post runs the usb-ready one-shot in addition to --if-no-lease.
The K12 gate (macOS, Windows 11, Linux, 5 boots each) is deferred to the device phase.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
R35, from Task 23's review:
- up()'s lock had the empty-pid moment the radio lock lost in Task 23 (a directory with a pid file: a waiter that
read an empty pid removed a lock that had just been taken). The radio lock's code is now lock_take/lock_drop
over lock_owner_alive/lock_reap (renamed, same bodies), used by radio_on and up() alike; the up lock is the
symbolic link /run/mu300-mobile-data-up.owner, waited for MU300_UP_LOCK_WAIT real seconds (150). down() reads it.
- The dial calls sipa-dele-start and marks dial-sipa-dele only when /lib/modules/<release> has sipa-dele.ko (or
extra/sipa-dele.ko), as kanoqwq/clean-tf-7.2 checks (cd4fb28), so the mark is truthful; without it radio.log
says so and the dial goes on.
Tests: a bring-up holder killed mid-round and two waiters (one round at a time, nothing left), the holder named
from the start, the wait giving up with the holder's pid, the dial with and without the module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
* init: the eMMC serial only from androidboot.emmcid. The /sys CID fallback ran before the modules that find the
eMMC, so it would have come and gone between boots; without the argument the identity is the serial number alone.
An emmcid without a serial number no longer gives "MU300LINUX--<emmc>".
* mu300-update: fetch_stdout retries only a failed connection (curl 6 7 35 52 56, GNU wget 4). A timeout (28) had
been retried by curl already; four more rounds held "check" for half an hour. A 404 through wget is not retried.
* mu300-at: a test of the loop itself (a writable directory, a dead owner's lock that cannot be removed: "busy").
* build-wlan.sh: a Wi-Fi patch either applies or is applied already, as in upstream/build.sh (it was `|| true`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
K45, K46, K47, ported from kanoqwq/clean-tf-7.2 cd4fb28 (the CFI panic the spec cites with 45222e6), for
every system rather than OpenWrt only as in the fork: Ubuntu (mu300-extra-modules.service), OpenWrt and
openwrt-luci (init.d/mu300-hw) all run the same extra-modules, which no longer starts sipa-dele-start.
- extra-modules: the background start is gone (K45).
- sipa-dele-start: refuses with exit 1 after MU300_DELE_WAIT instead of loading anyway (K46); an insmod
failure is exit 1 too; the wait is a deadline in seconds (date +%s), not a count of 2 s rounds; the dmesg
sbuf-line precondition is dropped (the caller has just registered over the AT channel, and a late first
dial could find the line gone from the ring buffer).
- mobile-data up_locked: after "registered" and before CGDCONT/CGACT, when sipa_dele is not in
/proc/modules, runs MU300_DELE_WAIT=20 sipa-dele-start (log /tmp/mu300-sipa-dele.log); a failure ends the
attempt (radio.log, led error, exit 1) without a PDP context (K47).
Ruling R32, radio_on's lock:
- The lock is a symbolic link /run/mu300-radio-on.owner -> owner pid, made in one step, so it never exists
without its owner (no empty-pid grace and no race on it).
- A dead owner is taken over through radio_reap: only the waiter that creates the marker LINK.dead.PID may
remove the link, after looking again under the marker, so two waiters that saw the same dead owner cannot
remove each other's fresh lock. A dead marker maker is reaped the same way one level down.
- MU300_RADIO_LOCK_WAIT is a real-seconds deadline ($SECONDS).
Tests: SipaDele (extra-modules never starts it; refusal without insmod; both module layouts; insmod
failure; already loaded); MobileData: delegate between registration and CGACT and the dial stops on
failure; two waiters on a killed owner's lock run one state machine; the lock names its owner from the
start; the lock wait in seconds.
Device cycles (10 down/up per device and system, dmesg CFI/panic count, lsmod) are deferred.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
K57: radio_on waits (30 s at most) for nr0's first URC, sends AT+SMMSWAP=0 to the nr1 daemon once per boot
(/run/mu300-ril-handshake), sends no AT+SFUN when AT+CFUN? is unanswered, and after AT+SFUN=4 waits for
"+CFUN: 1" (30 real seconds) before the SFUN=2/SFUN=4 power cycle. A lock (/run/mu300-radio-on.lock) keeps two
radio state machines apart; the second caller waits for the first (120 s) instead of the fork's 8 s, since a
dial that gives up costs netifd's 20 s pause.
K58: AT+CAVIMS=1 after the radio is on, in up and in radio-on.
K65: the unisoc-modem plugin's early lock replay ($PLUGIN_LOCK, MU300_PLUGIN_LOCK in tests) runs between the
radio-off answer and AT+SFUN=4; the pending marker is cleared on success only.
K66: `mobile-data radio-on`. K20: mu300-atd's radio-warmup instance runs it once nr1's daemon reads commands.
Ported from kanoqwq/clean-tf-7.2 cd4fb28 and 6404c10 (tests/test_early_replay_hook.py, paths adjusted).
R30: the CGACT=1 comment says only a timeout ends the bring-up; the address waits state their real worst case
and fetch_addr no longer sleeps past its budget; at() writes its own pid (not the parent's $$) into the AT lock,
so operator_log's background query owns the lock it holds. A modem reset during the registration wait is left to
the next attempt, which starts with radio_on (as in the fork).
Gate K57/K58 (cold boots, SMS) is deferred to the device phase.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Ported from kanoqwq/clean-tf-7.2 commit cd4fb28 ("openwrt: restore fast F50 boot, modem, Wi-Fi LED and SMS
platform"), onto all three systems:
- K59: wait_registered watches the +CEREG announcements mu300-atd appends to /run/mu300-at/urc/stty_nr0.log
(MU300_URC_LOG), with AT+CEREG? every 5 s as the fallback (MU300_REGISTER_WAIT, 60 s). Only bytes appended after
the start count; the fork reset its offset on the first round, so an old registration counted after all. The
announcement form (+CEREG: <stat>) and the answer form (+CEREG: <n>,<stat>) get separate patterns, and the
first query is sent at once unless the modem's last announcement said "not registered".
- K60: no AT+CGACT? first; fetch_addr waits real seconds for an address, then one idempotent CGACT=1 reassert
and a second bounded wait (8 + 8 s), never CGACT=0.
- K56: led_up takes the AcT from AT+CEREG? (the fifth field) instead of AT+COPS?; mu300-led, not led-status.
- K61: the operator name goes to radio.log in the background.
- K62: radio_say, in English, to /run/mu300/radio.log (capped at 64 KiB).
- K63 stays rejected: the systemd path still runs v6_up / v6_off (pinned by test_systemd_path_keeps_v6_up).
MU300_LIB=1 defines the functions only, for the tests. Device timings are taken in the device phase.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
K40, K41, K42, ported from kanoqwq/clean-tf-7.2 (35a1c55; marks from cd4fb28). bootmark is reworked: English, writes /run/mu300/boot-timeline on tmpfs instead of /etc on every boot. The marks sit in android-vendor-start, the S19 mu300-atd init script and the mobile-data dial; every call is guarded. The partition loop is the function link_partitions SYSDIR DEVDIR so it can be tested against a fake sysfs. arch/build-rootfs.sh now enables mu300-atd2.service next to mu300-atd.service (ruling R28).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
K16, K17, K21, ported from kanoqwq/clean-tf-7.2 (wait_and_exec, the atd2 instance, the mobile-data at() nr2 preference, the plugin marker). mu300-atd2.service gives Ubuntu the same second daemon. nr3-nr7 and radio-warmup are not ported here (K18 rejected, K19 and K20 are other tasks).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Task 18 review I1/I2 (K52, Ruling R21): the drain after a clean reply is no longer skipped but waits 0.1 s
instead of 1 s (bash 3.2, whole seconds only, keeps 1 s and says so on stderr); "clean" is collect's own exact
last-line test (return 1 without a final code) instead of a looser grep. K51 unchanged.
Tests (R22): the desync test (a late OK after a reply, a URC and NO CARRIER while idle), the drain after ERROR
timed, the fast bound 0.95 s, start() waits for the drainer count instead of a fixed 0.5 s, slaves closed and the
daemon terminated in tearDown.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Fix round 1 for Task 17 (K48-K50, fork cd4fb28 port). fd 9 is held until the answer arrives (mu300-atd
reopens the FIFO per command and the kernel drops unread data when the last descriptor closes); a live
daemon gets T+30 s, no daemon T+2 s; INT/TERM exit; a vanished FIFO is not recreated as a file;
mu300-atd's open_tty no longer sends later log lines to /dev/null.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Ports K51 (MU300_AT_URC_CHANNELS-0: set but empty opens no URC channel) and K52 (drain fast path
after a reply that ended in a final result code) from kanoqwq/clean-tf-7.2, fork commit cd4fb28.
Comments rewritten in English; tests run the real daemon on a pty pair.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Port of kanoqwq/clean-tf-7.2 cd4fb28 (K48, K49, K50), written onto our file, not merged. The answer
wait is bounded by a clock deadline (T+1 s) instead of an iteration count, and the sleeper falls back
to plain sleep instead of 'sleep sleep'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Under 7.2.9 br-lan's IPv6 link-local was sometimes made from usb0's MAC: when the bridge came up before udev had
given it its persistent MAC, it had taken its port's. udevadm settle after creating it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
`mobile-data status` without sudo never returned: mu300-at found a stale lock in /run/mu300-at, could not
remove it, and the "continue" after the failed rm skipped the wait counter. A client that cannot write the
daemon's directory now says so and exits; a stale lock that cannot be removed counts as busy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
CI caught two sirens flashing together (white lit throughout, red and blue at once): one left running by an
earlier alarm kept writing next to the new one. The same could follow a restarted thermal-guard on a device.
The siren now checks the pid file every round and ends when it names another process or, after the first
round, nothing. Test: a stale siren stops.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
Under mainline the PMIC's fuel gauge probes on the F50 too and reports a battery, at 75.0 C from an unconnected
NTC input (TEMP=750, HEALTH=Over voltage): since v2026.10.04 the LED heat alarm went on at every boot and its
clear condition (battery at 45 C) never came. thermal-guard now reads the battery on the U30 Air only, as
mu300-toolkit already did; the SoC's zones still set the alarm off on both. Reported with the readings on an F50
under 6.18.54; the same readings on our F50. Test: the F50's junk battery sets nothing off.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- Windows (fixes#7): a clone with core.autocrlf=true checked the device scripts out as CRLF, and Android's sh
ran none of android-install.sh ("unexpected 'do'"), with an empty log. .gitattributes keeps text LF on every
system; install.ps1 pushes scripts through PushUnix, and build-boot-image.py writes init, ueventd-perms.sh and
the module orders with LF, for clones made before. Checked on Windows: 5 of 5 scripts CRLF on main, 0 now.
- Wi-Fi (#8): the vendor driver had no dump_station, so iw, iwinfo assoclist and LuCI's Associated Stations
were empty although hostapd had the clients; nor get_channel ("Channel: 0"). dump_station lists the firmware's
peer table entries of the AP (address only: the firmware gives no signal or counters), get_channel returns
what cfg80211 kept from start_ap. Mainline copy and a 5.4 patch; the channel checked on the F50 under 6.18.
- A U30 Air restarted every ten minutes after mu300-linux from Android: boot_b's device segment, which
mu300-update keeps, still held an old experiment's --trial-guard. The generic segment carries an empty guard
file that replaces it; an experiment's guard goes last, into a segment of its own. Checked on the U30 Air.
- mu300-nfc on|off: ZTE's NFC switch is bit 5 of the tag's configuration byte 0x3bf (found by reading the chip
with the switch on and off); set, phones get nothing. mu300-nfc says so. Checked on the U30 Air.
- Tests: CRLF inputs, no plain adb push of scripts, the empty guard, NFC on/off. FINDINGS 33g, 33h.
Fixes#7
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- The tag is a Fudan FM11NT08 at I2C 2-0x57, reachable while GPIO 190 is held low (libgpiod). mu300-nfc shows
it (a Wi-Fi record by its name only), writes the hotspot's name and password as ZTE's firmware does (the same
bytes), a URL (with the NDEF prefix codes), text, or nothing; each 16-byte page only when it differs, and read
back after writing.
- sync, at every hotspot start (Ubuntu) and at boot (OpenWrt): the Wi-Fi record again if that is what the tag
holds, so a changed password reaches it; a URL or text written by hand stays.
- Ubuntu and OpenWrt get i2c-tools and gpiod(-tools); mu300-nfc is on PATH.
- Tested on the U30 Air under 7.2: a phone joined the hotspot and opened a URL written from Linux, once NFC was
switched on in ZTE's web interface (a setting the tag keeps). Tests: a fake tag, ZTE's record byte for byte,
long URLs, what sync leaves alone. FINDINGS 33g.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- The network and Wi-Fi lights never went out under mainline: they are PMIC LDOs (VDDCAMA0-2), which ZTE switches
with zte_ldo_leds and mainline left on. leds-zte-ldo makes them zte-ldo0..2 and starts them dark.
- The network LED's red is the PMIC's keypad backlight sink: leds-sc27xx-kpled, after Unisoc's driver, under its
Android name keyboard-backlight. The device tree's other GPIO LEDs light nothing, under Android too.
- mu300-led: battery white while Linux is up, network blue on 4G, white on 5G, red without service, Wi-Fi white on
2.4 GHz, blue on 5 GHz; under 5.4 the LDOs through vddcamaN_status. mobile-data re-reads the access technology
on every watchdog round.
- thermal-guard: the SoC at 85 C or the battery at 50 C sets off mu300-led alarm, the battery LED's colours one
at a time, until they cool down; it now runs on 5.4 too, where it only watches.
- Mapped by lighting each LED on the device and by sampling Android's LEDs with the radio off; 6.18 and 7.2 on
the U30 Air. Tests: 4G/5G, the siren, the 5.4 LDO switches, the heat alarm. FINDINGS 33f.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- USB host under 6.18 and 7.2: a Logitech receiver (HID) and a flash drive (mounted, read) through a USB-C
adapter. The PHY now provides otg_set_vbus(), through which dwc3 hands it the role (host eye pattern, A-type ID,
D+/D- pull-downs). Patch 0007 is 6.18 only (7.2 has it upstream): patches/<major.minor>/ holds such patches.
mu300-usb waits for the role switch, which works in the background, and reads a fake /sys in tests.
- init applied a --trial-guard left in the device segment of boot_b to every boot of an installed system: it
restarted every 10 minutes (mu300-update keeps boot_b's device segment). A guard now counts in a trial only.
- install.sh, install.ps1, uninstall.ps1: with more than one adb device they always ask which one (the F50/U30 Air
is the default), and with the device in Linux and only a phone or tablet in Android they offer to send the
device to Android first - an installer about to work on a tablet was reported.
- tests: device selection, and mu300-usb against a fake charger (never 5 V against a supply, the boost off at
boot, the F50 refused); FINDINGS 33e; README.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
upstream/patches 0004-0006 teach mainline's sc27xx efuse, ADC and fuel gauge drivers the UMS9620's PMIC, from
the values in Unisoc's 5.4 drivers: the efuse read window, the ADC's scales, calibration and 26 MHz clock vote,
the FGU's enable bits and calibration field. On this board "bat-temp" is the NTC's voltage (the battery node's
voltage-temp-table converts it), the charger IC has no driver (the status comes from the battery current), and
mainline read every discharge current as ~2 billion (an unsigned subtraction; now s64 like the vendor driver).
Tested on the U30 Air (6.18 and 7.2): level, voltage, current (-2..-18 mA on USB power, full), 33 degC, status.
A first version recursed (status -> capacity -> calibration -> status) and overflowed the stack at every boot:
five failed boots later the device was back in Android by itself, and the panic was in pstore (FINDINGS 33d).
Also: mu300-wifi-band falls back to the hotspot's channel when it cannot read hotspot.conf (not root), and
mu300-led tells the band from the setting while the hotspot has no channel yet (it lit white on 5 GHz).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
tests/ (python3 -m unittest discover -s tests; CI on Ubuntu, macOS and Windows):
- the device scripts under dash (Ubuntu), bash and busybox ash (OpenWrt), with stub commands and a fake / :
mu300-device, -lan-ip, -led (both devices, the timeout), -ttl, -wifi-band, -buttons, mu300-vpn (URI parsing,
JSON, networks kept out of the tunnel, the sing-box config), mu300-update (release files, kernel choice, the
byte helpers boot images are edited with, which bundles may go onto which device)
- tools/i18n.sh with every translation; install.ps1's T/NormalizeAnswer/Gib under PowerShell 5.1 and 7
- build-boot-image.py's generic ramdisk and the U30 Air's modules; the U30 Air's module order
- every script parses under the shells that run it; rules from past bugs (no double quotes in install.ps1's
device commands, ASCII PowerShell, init looks for partitions after the modules)
To be testable, mu300-update and mu300-vpn define their functions only with MU300_LIB=1, and paths can point at
a fake root (MU300_SYSROOT, MU300_BIN, MU300_*_CONF).
Found by the tests: mu300-vpn's fallback for the device's own network sourced a missing lan.conf, and dash and
busybox ash leave the whole subshell when "." cannot open its file - the address came out empty.
Buttons (mu300-keys, a small static C reader of /dev/input; mu300-buttons, Ubuntu and OpenWrt):
- power: a short press wakes the LEDs, held 3 s shuts down (logind no longer powers off at a touch)
- the U30 Air's Wi-Fi key: short press switches the hotspot 2.4 <-> 5 GHz (mu300-wifi-band), held 3 s turns it
off or on
- LEDs go dark after LED_TIMEOUT (/etc/mu300/led.conf; 60 s on the U30 Air, 0 = always on, the F50's default);
what they should show is kept and shown on the next wake. The Wi-Fi LED shows the band: blue 5, white 2.4 GHz.
- mainline kernels: CONFIG_KEYBOARD_GPIO (there was no /dev/input at all)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN