multi: RNDIS first (interface 0, MS OS compatible ID RNDIS), NCM next, then the
ACM console and adb, all in the single configuration Windows needs for its
composite parent. bcdDevice 0x0305 (0x0306 with adb). init names the netdevs
rndis0 and usb0, serves its early lease on a bridge of the two that goes before
switch_root; both are br-lan ports on Ubuntu and OpenWrt. usb-net-applied says
multi only when both functions were made; a kernel without f_rndis makes NCM.
net-name eth: every function's host_addr in the vendor block of LK's
androidboot.wifimac (globally administered, as stock Android's Wi-Fi address
is), so a Linux computer names the link eth0 instead of usb0; dev_addr stays.
Selectable everywhere the modes are: mu300-usb net multi / net-name, mu300-api
usb.net (mode multi, name), the Cockpit page, LuCI's Device page (device-usb,
mu300dash net_name), with translations. FINDINGS 242.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
From kanoqwq 0043a5d8 (the SIPA readiness part; checked by him on a U30 Air, 7.2.8).
sipa_dele keeps a channel status (0 pending, 1 open, negative: the open failed) and shows it in sysfs as
sipa_dele_ready and sipa_dele_wait, whose read waits up to 3 s on a kernel wait queue for the handshake. The
connection thread is woken only after the resource graph and its callback exist, and a failed start frees what
init made.
sipa-dele-start reads sipa_dele_wait after insmod instead of looking for the OPEN line in dmesg; not open: exit 1,
no PDP context this round. mobile-data also asks it when the module is already loaded (a reconnect). A module
without the file (an older build, the 5.4 vendor one) cannot say and goes on as before.
Not taken from the same commit: the dual-standby switch (only the card in use has a live stack here), the U30
SFUN=2 presence preflight (his mu300-dual-radio), the 152 default for automatic mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
From kanoqwq f0b5ad43 (watch_cleanup). The EXIT trap removed a lock path
that was a local of watch(), gone by then: under set -u every stop died on
"wlock: unbound variable" with status 1 and left the lock behind (seen on
F50-B at each "systemctl restart"). The path is now at process scope, TERM
exits 0 and INT 130, and the lock is removed only while it is still this
process's. The idle sleep runs in the background and is waited for, so the
TERM trap runs at once instead of after up to 30 s; the cleanup ends it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
From kanoqwq f0b5ad43 (sms-events, data-events) and cc0ecce7 (500 ms slack
on the idle waits), without his modem daemon: our loops stay, they only
stop starting processes for nothing.
- mu300-smsd: every 5 s it ran mu300-sim-state (and through it mu300-sim,
head and tr) and cat | grep | md5sum over the URC logs. The URC logs are
now checksummed again only when one was written since the last look, the
card asked about again only when its state files changed (and at each
periodic sync); the shell's own test compares the times against a mark in
the lock directory, written before the look. The wait is a read with a
timeout on a private fifo (busybox ash, bash; sleep under dash) with
500 ms of timer slack, as thermal-guard's.
- mobile-data watch: the sleep between two looks runs with 500 ms of slack
(set by the sleep's own subshell); the AT and route work keeps the default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
On the U30 Air under OpenWrt the LAN hook's re-enumeration and mu300-adbd's rebind (adding adb) fell within the
same 200 ms of every boot: four enumerations in about 1.2 s, and on 2 boots in 13 the Mac's NCM link came out of
it with a dead OUT path (169.254, no DHCP, rx frozen; adb fine) until a replug. The hook now waits for adbd's
rebind when adb is about to join, both hold /run/mu300-usb-rebind.lock while the gadget is unbound, and
mu300-usb-reset --if-no-lease looks for a lease of the gadget's host MAC rather than any lease (a phone on the
hotspot kept the stalled Mac without its rescue). FINDINGS 237: U30 Air 22/22 clean boots after, F50-B 10/10.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
procd stops a service by signalling its main process alone, and the service's children share init's
process group. mu300-buttons ran mu300-keys and its loop as a foreground pipeline, during which the shell
sits out traps: /etc/init.d/mu300-buttons restart left the old reader and loop running beside the new
ones (reparented to init), and every press was handled twice. The pipeline now runs in the background
while the shell waits, and TERM/INT/HUP stop the shell's own children (pkill -P, else from /proc).
thermal-guard's instance in mu300-post had no respawn: if it died it stayed down until a reboot.
U30 Air, v2026.10.28.1, 6.18.59: the released script left the old pair behind on restart (reproduced);
with this one two restarts and a stop/start leave exactly one reader; thermal-guard killed with -9 is
back within seconds. Tests for both (the stop test fails on the old script).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
liuwang97's measurements and rewrites from #372, the part that keeps the behaviour:
mu300-power, mu300-buttons/mu300-led (the tick's hint), thermal-guard (still every
5 s), mu300-adbd, ndp-learn (ip monitor, a 300 s safety round), mu300-traffic and
early-recorder read with the shell's own read and wait on a fifo instead of sleep.
mu300-cpu services little|all is there, default all (the VPN engines are procd
services). Not taken: mu300-power's longer waits, thermal-guard's longer intervals,
the panel in rpcd, mu300-modemd, mu300-sysd and the kernel config.
Under bash 3 the fifo wait is not used: bash 3 runs a trap that comes during a read
inside the read, and the trap's $( ) hangs there.
On the U30 Air (6.18.59, idle, on the charger) the whole system went from about 408
ticks a minute to about 218; these seven daemons from about 180 to about 32.
Co-authored-by: liuwang97 <17954538+liuwang97@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
kanoqwq's LED status system (led-status, u30air-led-status, v50-led-status, his LuCI LED page) as settings of our
one controller, mu300-led, in /etc/mu300/led.conf. Nothing changes by default: every lamp on at its usual level, no
boot indicator, the siren.
- LED_NETWORK / LED_WIFI / LED_BATTERY=0|1: a lamp switched off stays dark (the U30 Air's low-battery red too); the
heat alarm still shows on its LED and `test` lights everything.
- LED_*_BRIGHTNESS=1..100: % of the lamp's usual level where the lamp dims (F50 network + Wi-Fi, U30 Air battery,
V50 lamps); ZTE's battery levels and the breathing curve are scaled, not replaced. FINDINGS 227.
- LED_BOOT=1: the boot indicator, the siren's LED cycling its colours (kano's tempo) from OpenWrt's preinit
(04_mu300_early_leds, before the recorder and USB) or Ubuntu's mu300-fixups until mu300-post / mu300-boot-ok; it
ends by itself after 3 minutes, a switched-off lamp stays dark, the heat alarm takes over.
- LED_THERMAL=siren|blink|off: the heat alarm's light as today's siren, kano's red blink (the kernel's timer, no
process) or nothing. thermal-guard is unchanged; mu300-led only reads its /run/mu300/thermal-alarm on refresh.
- mu300-led settings (JSON) / set KEY VALUE / refresh; nap falls back to the bundled busybox's usleep.
- The LED page as System > LEDs of luci-app-mu300 (unisoc-modem/led adapter, mu300dash led_get/led_set, ACL, menu),
not an override of LuCI's own LED page; translations in every catalog (kano's zh where he had them).
- mu300-api led.get/led.set and the Cockpit LEDs card carry the same settings.
Ported from kanoqwq/mu300-linux f6b0668d, 2af101f8, ac21653d, dbd6bf1e, ee10835c, c1293746
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
- mu300-tcp (Ubuntu and OpenWrt): the device's own TCP congestion control,
system default / CUBIC / BBR (BBR also sets net.core.default_qdisc=fq).
Only what tcp_available_congestion_control lists is offered (5.4 has no
BBR). The kernel's own pair is read once per boot (boot_id) so "default"
puts it back; a refused write puts the old pair back; saved in
/etc/mu300/tcp.conf, replayed by mu300-toolkit apply. Nothing saved:
nothing touched. No firewall, interface or VPN change.
Device page card (mu300dash tcp_get/tcp_set, adapter unisoc-modem/tcp),
mu300-api tcp.get/tcp.set and a Cockpit card.
- Boot state under the dashboard's boot buttons (mu300dash boot_get,
read only): default boot, one-time boot, whether boot control can be
written - from mu300-next-boot status, which now says the last.
- Hotspot on/off per access point (/opt/mu300/lib/hotspot-ap.sh), shared
by the panel's Wi-Fi button and the Wi-Fi key (FINDINGS 222): the AP's
wifi-iface, the radio only when it was off and nothing else would come
up, refused while uci or a LuCI session has unsaved wireless changes or
the Wi-Fi client has the radio, flock, "pending" after netifd's reload,
never the key.
- device-usb: the gadget function bound now (configfs) beside the saved
mode; host-side NICs must be Ethernet and not wireless, and one that
another network has (another bridge, a network section, netifd's
interface dump) is not brought up or added; unsaved network changes
refused. role_command keeps safe_program.
Ported from kanoqwq/mu300-linux b9f71e72, f6b0668d, db4e5d2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
The V50 has the U30 Air's FM11NT08 at I2C2 0x57 on reset line 189. mu300-nfc reads the line from ZTE's
ntag_fm11_gpio node and drives the tag only when it is 189, the line kano tested; no node or another pin
leaves the tag alone. "mu300-nfc supported" tells the callers (hotspot-start, mu300-hw) instead of their
u30air checks; OpenWrt syncs the tag when the wireless settings are committed (procd config trigger in
mu300-post). A gpioset that cannot hold the line is now an error, and busybox awk no longer reads
"ssid (...)" as a call. FINDINGS 229.
Ported from kanoqwq/mu300-linux f6b0668d
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
Ported from kanoqwq/mu300-linux, adapted to this tree:
- home.js: a newer successful fast-tier read clears the slow tier's old
error, so the card stops saying "No response" once the modem is back
(3c350105). Our cell output has no card field, so only the error clear.
- openwrt-board-check: a broken /etc/board.json is made again by
board_detect before the wifi-scripts read it, the broken one kept beside
it (f6b0668d). mu300-hw runs it and carries on either way (his returned).
- wifi-ready (ucode): every enabled radio and interface up, each access
point ENABLED; a disabled one counts as ready (f0b5ad43). mu300-hw's
20 s wait asks it instead of hostapd.wlan0 alone, which a switched-off
hotspot never has (that boot waited 20 s and restarted the Wi-Fi).
Exit 2 for a radio netifd gave up on or an AP DISABLED, so the wait
still ends at once there.
- mu300-led: sleep and idle on darken every lamp, not only those with a
state file here, and write the battery LED again (dbd6bf1e).
- thermal-guard: a round where no zone gives a number lifts no cap and
turns no alarm off (the invalid-sensor check of cc0ecce7; his adaptive
cadence is not taken, ours stays 5 s).
- early-recorder: pinned to the lowest-capacity CPUs, logread -l 300
(f0b5ad43, after liuwang97).
- mu300-linux (Magisk switch): --no-reboot, and misc written with
conv=fsync, falling back to the old dd where fsync is unknown (f6b0668d).
- mu300-next-boot: when the default-boot file cannot be written after
misc was, misc gets its previous block back (f6b0668d).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
* Remove call-audio integration and DSP-only kernel reservations
Remove the official audio extra from installation, update and kernel-switch paths. Drop call-only DSP memory reservations, patches and virtual sound-card configuration, and update current user documentation.
Retire previously installed audio extras through their uninstall hook before changing systems or kernels. Keep generic USB audio, Bluetooth, AT ownership, SMS and mobile data support.
* Update panel integration test after removing the audio extra
- HotspotVerify.test_a_refused_start_goes_to_2g failed on every Linux runner: hotspot-verify keeps only the dmesg lines
from its own start (since = /proc/uptime), and the test's line said 27.5 s, before the start on any host up longer
than that. On macOS there is no /proc/uptime, so every line was kept and it passed. Not dash: dash simply ran first.
The line is now dated after the host's uptime, and a new test checks that a refusal from before the start is ignored.
- VpnUplink.test_a_vpn_started_before_the_bearer_is_restarted expected "(2 s)" from a time taken once before the loop
over the shells: the second shell (or a slow first one) ran in a later second and the script said 3 s. The expected
seconds are now counted from the script's own reading (state/uplink-up).
- each_shell yielded inside a subTest: the loop body's failure never passed through it, and the generator closed later
made the subTest record the GeneratorExit ("generator ignored GeneratorExit", "'NoneType' object has no attribute
'success'"): two spurious errors on every failure. Assertion messages now name the shell instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
The first test run failed on test_first_wifi_press_while_asleep_only_wakes, which asserted the old rule for a held key too. The hold now toggles while idle, but the charging boot has no services to toggle, so the guard excludes it; the test asserts both states and the new hold.
TF-A sets the always-on LP_AP_INTC's IRQ_EN once from its own table (INTC0, INTC1, INTC7 bit 6), without the
USB controller (SPI 142), the IPA or the Wi-Fi's PCIe MSI. While CPU0's cluster sat in cluster-pd their
interrupts waited for something else to wake it: USB pings up to ~120 ms, and the workaround was CPU0 without
cluster-pd.
upstream/modules/ums9620_lpintc adds every SPI enabled in GICD_ISENABLER1..8 to IRQ_EN, at load and every 5 s
from deferrable work; it only adds, takes its bits out again before system suspend (mem wakes on exactly what
TF-A chose) and at unload, and puts them back on resume. Built by build-modules.sh, loaded by extra-modules
after mu300_thermal.
U30 Air, 6.18.57, CPU0's cluster-pd allowed, 100 USB pings: 9.5 ms average / 42 ms max with it, 15.7 / 69
without; CPU0 without cluster-pd 10 / 70; WFI only on every CPU 7.1 / 40. Not yet built for 7.2/7.3, the
suspend path not yet run on a device.
bash's read -t keeps what it read past a line from the pty in a buffer it does not tie to the file, so a read of
/proc/uptime between two reads of the channel (both on fd 0) returned the modem's reply instead of the time:
empty answers under bash (Ubuntu), caught by tests/test_device_scripts.py Atd. busybox ash (OpenWrt) was not
affected. The 0.2 s open poll and the startup drain stay; the cmt test waits out the startup drain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared installation fixes from kanoqwq's b8d4f222, ported into this tree:
- openwrt/overlay/usr/libexec/mu300-sysupgrade: his backup_operation
parser; -r/--restore-backup now passes (LuCI's backup upload ran it and
was refused), firmware images and mixed requests still refused.
- mu300-next-boot: without /run/mu300/linux-slot the published Linux block
names the slot; a pair of blocks that names the wrong slots is never
written (misc unchanged). His boot/init gate on an unknown slot is not
taken (ours falls back to the image's slot; no boot gates).
- boot/build-boot-image.py: cpio_archive() adds every parent directory.
Not taken: the OTA diff tools, disable-stock-upgrade (rewrites LuCI's
minified flash.js at build time), the E5-family switch plugin.
Co-authored-by: kanoqwq <kanoqwq@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
From kanoqwq's b8d4f222 and edcdeb27:
- mu300-sim-state: +ECIND: 3,0,0,1 (a card coming up, after 3,100) is a
SIM event; numbers after the cause pass when every field is a 32-bit
decimal number. The stock RIL ignores them too.
- mu300-led: breathe() writes brightness 0 before it hands a steady channel
to the pattern trigger. The SC27xx's pattern_set leaves the steady TYPE
bit set (kanoqwq read 0x300 on a U30 Air, 0x100 with this).
Not taken (FINDINGS 209 says why): his SMS pool resolver, the dashboard's
battery current, the VoLTE/VoNR receipt fix, the V50 dual-stack radio
resume, the sim-reset data-priority call.
Co-authored-by: kanoqwq <kanoqwq@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
The watchdog's round on LTE asks nothing more than before (the data-roaming
test keeps that). Cockpit's tr/zh_CN catalogs get the new strings, and the web
installer's list of mu300-api methods the two new CPU ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
kanoqwq (cf4dcd61, tested on his V50) found the vendor RIL switches a card's
radio with SFUN=5/4 and reads CFUN 0 and 2 as off. mobile-data's rf_off now
sends AT+SFUN=5 and accepts 0 or 2; back on from 0/2 is the ordinary bring-up's
AT+SFUN=4, from an earlier release's flight mode (4) AT+CFUN=1 as before. The
U30 Air's live switch accepts a card in use that is off by its setting at 0, 2
or 4. His SIM2-off default and dual-stack cold-boot init are not taken: only
the card in use has a stack here.
Co-authored-by: kanoqwq <kanoqwq@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
kanoqwq read ZTE's V50 firmware (setNetLight, c1293746): logical slot 0 lights
NET2, slot 1 NET1. mu300-led lit NET1 on every V50; now the lamp follows this
boot's slot, colours as before, the other lamp dark, the siren on the same lamp.
led_up told 5G only from CEREG's AcT; a 5G SA registration is in the NR domain
alone, so F50/V50 showed 4G. When CEREG names no NR AcT, AT+C5GREG? decides
(kanoqwq's network-led.sh, f0ed60ff). The U30 Air's light shows the SIM in use
(FINDINGS 154) and is unchanged.
Co-authored-by: kanoqwq <kanoqwq@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
From kanoqwq's 85d72fa9 and 99e1316a, adapted to our charging boot and mu300-power:
- After LK's charger boot (modem=shutdown, the PM running) the stock modem_control loads nothing, so the CP never
came up until a reboot: issue #253. mu300-modem-coldboot makes a checked copy in RAM of the device's own
modem_control (sha256 before and after) that loads the CP and CH images alone; only on a U30 Air, in a charger boot
with modem=shutdown and the CP down. Anything else, or any failure: the stock loader, as before.
- POWER_ON_CHARGER=1 (mu300-power, LuCI, Cockpit, mu300-api): a charger boot is a normal boot; init makes no
charging-boot marker then. Default 0.
- The charging boot powers off when the charger is gone (two loops), and a held power key starts it, as the stock
charger mode does.
- Low battery: every state, unplugged, the U30 Air only: the stock charger manager's undervoltage rule (5 samples at
or under cm-shutdown-voltage + 120 mV, then <= 1 % or <= the shutdown voltage) and Android's (Critical or 0 %, three
loops), a clean poweroff.
Co-authored-by: kanoqwq <kanoqwq@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
Led.test_v50 failed now and then on ubuntu shard 0: after "alarm on" / "alarm off" on a V50 without lamps, a PMIC
LED read 255. "alarm on" starts the siren in the background, a new mu300-led that asks mu300-device for the device.
The test's next call ("alarm off") rewrote run/mu300/device with write_text, which truncates first; a siren that
read it in that moment found no device file and no device tree, took the board for an F50 and flashed the PMIC's
RGB LED. "alarm off" (a V50) then killed it and darkened the V50's lamps, leaving the PMIC channel lit.
Made certain by widening that window to 50 ms: 5 of 5 runs fail with the same 255 and GeneratorExit; with the file
replaced (os.replace) 0 of 10. On a device /run/mu300/device is written once at boot: mu300-led is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
mobile-data voice volte|vonr on|off [--slot 0|1] keeps the choice in /etc/mu300/sim-voice; every bring-up sends
it where AT+CAVIMS=1 was (VoLTE on by default, VoNR only when set), read back with AT+CAVIMS? and
AT+SP5GCMDS="get nr synch_param",42. A change the modem does not read back is undone and not saved.
LuCI Cellular > SIM settings, mu300dash simcard_get/simcard_set, mu300-api voice.get/voice.set.
After kanoqwq's per-SIM voice switches (kanoqwq/mu300-linux 5f4732e, 53ef7b1), rewritten for this tree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE