Commit Graph
77 Commits
Author SHA1 Message Date
Abdurrahman Kaan DikeçandClaude Opus 5.5 949d821129 run-dir: nothing deleted recursively and nothing decided by what was seen; the URC log root's alone; FINDINGS 60
The helper removed a foreign /run entry with rm -rf: whoever squatted the name can still write /run and
swap the entry between the look and the removal, and busybox's recursive remove walks by path. Now a
non-directory goes with rm -f --, an empty directory with rmdir, a directory with contents is moved whole
into a directory made for it on the spot (mkdir: ours and 0700, or nothing moves), and the check runs
again at the end. A caller who is not the owner never creates the directory. Tests: the entry swapped for
a symlink after the look, for each kind seen first; a foreign directory kept whole.
mu300-atd: /run/mu300-at/urc 0700 - with caller id on, every ring writes the caller's number there.
mu300-voice: on a kernel without the audio drivers it says so instead of "run mu300-audio-dsp load".
FINDINGS 60 (the /run exposure, still open in boot/init) and what 24c measured on 2026-10-13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-13 08:20:52 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 67aed6c2a2 run directories: one helper for mu300-atd and mu300-voice, a squatted name is replaced, not obeyed and not fatal
/run is 1777 on these images, so /run/mu300-at and /run/mu300-voice can be made first by any local user.
mu300-voice refused such a directory and stayed down until somebody removed it; mu300-atd did not look at
all (mkdir -p), and would have put its command fifo and every answer into a stranger's directory or behind
his symlink. lib/run-dir.sh: run_dir_ours (a real directory, the daemon's owner, not writable by group or
others) and run_dir_take (created without following a symlink; a foreign entry replaced and reported, a
too-open one of our own tightened; for a caller who is not the owner the check alone, with the reason).
tmpfiles.d makes both at boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-13 08:04:14 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 3e1d4fbaf6 tests: the import tests do not depend on the umask they run under, and check the owners where they run as root
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-12 18:33:56 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 209c2bfadd Imported Android files: readable by the vendor daemons whoever unpacked them, root's, nothing world-writable (#127, #170)
install.sh run from a folder on FAT or exFAT under macOS stored every imported file and directory as 0700
root:root (the file system keeps no modes, macOS reports 0700, tools/vendor-overlay.py took what it was told).
modem_control and refnotify run as uid 1000 or mu300vnd and keep no capability that reads past a mode: the
property area unreadable ends at "can't get modem type!", vendor/etc unreadable at "can't get modem img!" - the
CP is never loaded, the AT ttys answer ENODEV. Reproduced on the F50-B on 7.2.10 and on 5.4.254 (the kernel makes
no difference), on Ubuntu and on openwrt-luci.

- android-vendor-start: before anything is started, the five imported trees are checked with one find and set
  right where they are not: root's, directories 0755 (0711 left), programs 0755, the property files 0444, other
  files 0644. One line says what was found, in the service's log and in the kernel's; marks in the boot
  timeline. An update carries these files over as they are, so this is what repairs an installed system.
- tools/vendor-overlay.py: the mode of an entry comes from where it goes, never from the host's file system.
- The Magisk installer and android-install.sh run under umask 022 (magisk --install-module gives 000: sixteen
  directories 0777 and ld.config.txt 0666 in a system the v2026.10.22 zip installed), and the overlay is packed
  as root's (bionic was stored as Android's system, uid 1000: the first login account of the installed system).
- android-vendor-start makes /var/log before it starts logdw: on OpenWrt it can run before the boot script that
  creates it, and then there was no vendor log at all - on three of four boots of the F50-B.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-12 18:13:40 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 fa7a6ef5b2 Merge origin/main into sms-direct-cmt (FINDINGS: this section becomes 51)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-12 16:10:21 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 376451c5ee SMS direct delivery: no header or text in the log, no links followed; FINDINGS 48
mu300-atd logs one fixed word per +CMT frame ("+CMT (PDU spooled)" /
"+CMT (not spooled)"), never the header (the sender, in text mode) nor
the second line, which the spooler takes only as hexadecimal; a text-mode
frame reaches nothing. import-pdu, the spooler and the daemon's spool loop
refuse symbolic links and directories that are not ours (own_dir/own_file,
the lock rule of mu300-update), make the directories mode 700 and write
through mktemp and rename only. The periodic CNMI check looks at mt alone
(the U30 Air answers 3,2,1,0,1 for 3,2,2,0,1), each acknowledged message
is logged. Tests for the links and the text-mode frame; FINDINGS 48 with
the device run (direct and forced fallback) and why Ubuntu keeps polling.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-12 15:34:11 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 26d0fce007 SMS: direct delivery (+CMT) with the SIM path as the fallback
mu300-smsd asks the modem for AT+CMGF=0, AT+CSMS=1 and AT+CNMI=3,2,2,0,1
after the first sync; a refusal leaves AT+CNMI=2,1,0,0,0 and the +CMTI
path exactly as before (MU300_SMS_DIRECT=0 forces that). mu300-atd hands
every "+CMT:" frame (header and PDU, on nr0, in a drain or inside a reply,
never into a client's answer or the world-readable URC log) to the new
mu300-cmt-spool on its stdin, which writes the PDU into the pool's
incoming/ spool, fsyncing the file and the directory. mu300-smsd pools each
*.ready with "mu300-sms import-pdu FILE" and only then acknowledges with
AT+CNMA=1; a failed import or ack stops the round, three failed rounds give
direct delivery up for the SIM path. import-pdu parks the PDU in the
pool's parts/ on the disk and absorbs the parts with the same decoding and
grouping as a SIM listing, so long messages reassemble (across the SIM and
the air too) and parts whose siblings never come are pooled after the wait
by the periodic sync. MU300_AT_LOCK_WAIT=8 in the daemon.

Ported from kanoqwq's fork (mu300-smsd, mu300-cmt-spool), in this tree's
style and pool layout.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-12 15:09:19 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 53234365c6 thermal: a handoff that does not fail open, a read-only Thermal card, FINDINGS 48
Review of the first commit: one flaky sensor made the whole virtual zone unreadable while its cooling maps stayed
bound, and thermal-guard trusted the bindings alone - nothing would have throttled. mu300_thermal now reports the
hottest of the zones that read and fails only when none does (the core then skips the update and the sysfs temp
read fails). thermal-guard hands over only when the bound zone also has a passive trip at or below HOT and reads a
number within 15 C of the hottest reading of the round; a missing, non-numeric or stale reading, or trips above
HOT, keep it capping. Tests for each, for mainline without the zone, and for the 105 C power-off under native
cooling.

System > CPU gets a read-only Thermal card from standard thermal sysfs (mu300-cpu status --json: "thermal", every
zone's type, temperature, trips and bound cooling devices with their states), in the 31 catalogs. FINDINGS 48 has
the device tree facts, the module-or-DT decision and its evidence, how the kernel's QoS cap and the profile ceiling
compose, and the handoff rules; the upstream README, the panel wiki page and tests/README follow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-12 14:45:50 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 9608ba57d5 mainline: the stock virtual thermal zone (mu300_thermal) and thermal-guard's handoff to the kernel
The stock device tree has trip points on one zone only, soc-thmzone (passive 70 and 85 C, critical 110 C, cooling
maps from the 85 C trip to the three CPU clusters), and its sensor is /virtual-sensor@0, the hottest of eleven
physical zones, whose driver mainline does not have; so under 6.18 and 7.2 the zone did not exist and thermal-guard
capped cpufreq by hand. upstream/modules/mu300_thermal (after kanoqwq's clean-tf-7.2, 5c8c2f9) binds to that sensor
node and reports the hottest referenced zone; thermal_of then registers soc-thmzone with its trips, binds the cpufreq
cooling devices and the step_wise governor throttles. build-modules.sh builds it for both kernels, extra-modules
loads it (modprobe, else insmod from the bundle's directory; the vendor 5.4 kernel has no such module).

thermal-guard: the vendor kernel is told by its release (5.x), not by "a zone has trips", since the mainline zone
has trips too; on mainline the 105 C power-off stays always, and while an enabled zone with a passive trip has
every cpufreq cooling device bound the guard only watches: it lifts the cap it set itself (a marker survives a
restart) and leaves scaling_max_freq to the profile's ceiling, under which the kernel's QoS cap sits; with the zone
gone it caps again. Tests: the handoff, a cluster left out, a disabled zone, the module gone, the marker, and
extra-modules' load by name and by path.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-12 14:31:30 +03:00
Sheldonato d9493f5d1d mu300-update: a boot image written while Android is the default boot says so
An update on a device whose default boot is Android cannot try the boot image it just wrote: every Linux
boot there is a one-shot trial armed from Android (mu300-linux, the panel), and a plain reboot goes to
Android by itself. `mu300-next-boot --trial` answered "default boot is not linux, nothing to do" and
exited 0, and `unlock_for_trial` threw that away - so the update ended with "Reboot to start the updated
openwrt-luci" and the reboot started Android (U30 Air, v2026.10.17 -> v2026.10.20, 2026-10-12). The image
and the systems were fine; the reboot after it was not what anything had said it would be.

- `mu300-next-boot --trial` exits 3 when there is nothing to arm, and 1 when this slot's block cannot be
  rebuilt and the initramfs' own one-shot block goes in instead (one boot, not N, FINDINGS 32) - that
  arm was a silent success before. `--rearm` keeps exit 0: there, "nothing to do" is normal.
- `mu300-update` says both (`unlock_for_trial`) and keeps going either way: the image is written by then,
  and a warning is no reason to roll it back.
- What `apply`, `boot`, `kernel`, `rollback` and `rollback-boot` print last is how to start Linux by hand
  (`mu300-linux`) and keep it (`mu300-next-boot linux`) when a reboot goes to Android.
- `docs/FINDINGS.md` 17: what that device's init log showed (`stage=misc-restored`, no
  `stage=default-boot-linux`, `.mu300/boot-tries` 0) and why nothing was broken.

Tests: `test_device_scripts.py` (`NextBoot`: the two states the arming can be in) and `test_update.py`
(`FromStock`: what the update reports for each, and the line the subcommands end with).
2026-10-12 11:14:30 +08:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 8bc2db40fb Merge origin/main into pr72-rebased (F50 SIM selection, PR #72)
Conflicts: unisoc-modem/cell (slot-aware dashboard channels + main's round deadline, both kept),
unisoc-modem/dashboard-info (main's wan_dns_servers replaces the PR's jarr_dns; the per-slot APN
option is kept), mu300-atd (main's fractional read -t re-exec, then the PR's slot-derived channel).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-12 00:25:06 +03:00
KAAN DIKEC f3d76ee8bd Merge pull request #137 from dikeckaan/panel-at-resilience
Panel: one stuck AT command no longer wedges the control panel
2026-10-11 19:09:33 +03:00
KAAN DIKEC 7a2a5eff84 Merge pull request #133 from dikeckaan/u30-charge-limit
U30 Air: 0-100 % charge limit, Type-C Rp input current, host on outside power, Wi-Fi phy address (based on oswaldxdd's charge2)
2026-10-11 17:28:11 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 a99ec227df test: a killed process the system has not reaped yet counts as gone
The macOS runner reaped the hung test modem's processes late; os.kill(pid, 0)
still found the zombie and the test failed with "still runs".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-11 13:13:00 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 d8387d9e82 U30 Air: a 0-100 % charge limit, a Type-C source's Rp current, host on outside power, the Wi-Fi phy's address
Based on oswaldxdd/mu300-linux v2026.10.15-charge2 (tag commit 321f771, the source snapshot under
experimental/u30air-charge2/source), reviewed and redone in our stack (FINDINGS 33l):
- mu300-power: CHARGE_TO is any whole number 0-100 (was 100|80). 1-99 stops at N % and starts again under N-5
  (at once when the limit changed), 0 never charges, 100 lets go at once; never held under 5 % (the SGM41511
  supplements a load its input does not cover from the battery); the temperature guard keeps the last word.
  `mu300-power charge-limit [N]`. Nothing on the F50 (no battery).
- System > Power: the limit as a number 0-100, only with a battery; the charger's input current; the note in all
  31 catalogs. The adapter no longer shows the F50's phantom battery.
- patch 0012 (6.18 and 7.2): bq256xx raises the input current to a Type-C source's Rp (1.5 A, 3 A taken as 2 A),
  read from the UMP9620 Type-C block's STATUS: a hub or splitter with a charger behind it was an SDP, 500 mA.
  On the Mac's USB-C port: 0x6082 (sink, 3 A), input 2 A, the battery at 1.6 A instead of 0.36 A.
- mu300-usb host with something on VBUS: host with the boost left off (charger + USB NIC on a splitter),
  instead of refusing.
- sprd_wlan_combo: the wiphy's permanent address is the factory one from LK (it was 00:00:00:00:00:00).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-11 13:12:04 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 01d590cc9c OpenWrt: one Wi-Fi reopen per WCN reset, however many FW_ERROR events arrive
A chip reset can send FW_ERROR more than once (sprd_wlan_combo's watchdog and wcn_bsp's own reset), and every event
started its own background "wifi down; wifi up": two of them raced each other through netifd. The hotplug hook now
takes a lock in /run that names its holder; an event while a reopen runs is dropped (the running one reopens what is
there by then), and a lock left by a killed run is taken over. The Ubuntu side already had this from systemd.

Kept from the fork: the single recovery owner. Not taken: its per-radio reopen by uci phy/path, which skips a radio
whose section names neither (the MU300 has the one radio, and "wifi" without a section covers it).

Based on kanoqwq/mu300-linux@23361ce

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-11 12:39:25 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 dc91745773 mu300-at and mu300-atd: one framing rule for a request, the lock wait in seconds, a final result code on the direct path
From the fork's AT client, with the request framing made identical on every path:

- One request is one modem command, refused otherwise in mu300-at before anything is written and again in
  mu300-atd (one_request, the same function in both; a test keeps them equal). A line feed would make the rest a
  second fifo request with an answer file of the writer's choosing, and a CR a second modem command. The only CR
  allowed is the PDU send "AT+CMGS=<length><CR><hex PDU><Ctrl-Z>" (or CMGW), which mu300-sms needs in one request.
  The panel's unisoc-modem/at already refused CR and LF; NUL cannot be in an argument.
- -t is 1-99 whole seconds: exactly what the daemon parses. The fork allowed 1-999, and the daemon read
  "120 /run/... AT" as a line without a timeout and sent all of it to the modem.
- mu300-atd parses a request strictly and drops a malformed line (it used to fall back to "the whole line is the
  command"); the answer file must be $DIR/answer.<digits>.
- The client lock waited MU300_AT_LOCK_WAIT * 10 rounds of `sleep 0.1 || sleep 1`; where no sleep takes fractions
  the 90 s wait became 900 s. It now ends at a deadline of the clock.
- The direct-tty path (no daemon) exited 0 after a timeout with no answer; it now succeeds only with a final code.

Based on kanoqwq/mu300-linux@25f8d0c

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-11 12:36:46 +03:00
test 0a55ab18d9 Expose SIM selector on PATH and update slot-aware test fixtures 2026-10-11 06:46:07 +08:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 e840e642a3 Merge origin/main (SMS forwarding) into panel-traffic-rates-leds
Both sides kept: forward_* and traffic_* in mu300dash, its ACL and the
security tests; #112's Cellular order unchanged, Data usage after it
(8); the catalogs are main's with the data usage messages added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-11 00:33:12 +03:00
KAAN DIKEC 886652e28d Merge pull request #114 from dikeckaan/test-fetch-addr-timing
test: fetch_addr's budget check is not flaky on a fast runner
2026-10-10 23:39:42 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 91db9add43 Merge origin/main (CPU profiles) into panel-traffic-rates-leds
Both sides kept: cpu_* and traffic_* in mu300dash, its ACL and the
security tests; both pages in the menu; mu300-cpu and mu300-traffic in
path-commands, build-rootfs.sh and assemble.sh; the catalogs are main's
with the data usage messages added (tools/luci-i18n.py check clean).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-10 23:38:52 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 eef262dec2 test: fetch_addr's budget check allows a run that $SECONDS shows as 1
Flaky on the macOS runner (t=1 several times today): the budget is counted
on whole seconds of the clock and $SECONDS on whole seconds since the shell
started, so the same run can read 1, 2 or 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-10 23:07:56 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 ac51d281f1 OpenWrt: the Wi-Fi LED follows hostapd's ubus object
mu300-led events listens for ubusd's object add/remove events and sets
the Wi-Fi LED from hostapd.wlan0's status whenever that object comes or
goes: wifi down/up from the shell, the panel's toggle, a WCN reset, a
hostapd that died. Before, only a wireless config reload re-synced it
(by polling wlan0 for two minutes), and "wifi down" left the LED lit.
mu300-post runs it as a procd instance instead of the reload trigger.
Ubuntu already does this through the hotspot unit's ExecStartPost/
ExecStopPost; the data LED stays mobile-data's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-10 22:49:25 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 ec6f18d433 mu300-cpu: CPU performance profiles (saving/balanced/performance); LuCI System > CPU; thermal-guard honours the cap
A profile is a governor and a per-cluster scaling_min/max set only inside the hardware frequency table
(cpuinfo_min_freq..cpuinfo_max_freq); it never changes voltage and never touches the kernel thermal trips, so the
device still throttles at its thermal limit in every profile. "saving" caps each cluster at the highest table step
<= ~60 % of its maximum, "balanced" is schedutil over the full range (stock), "performance" pins the hardware
maximum with the performance governor. One dash/bash/busybox-ash script shared by Ubuntu (mu300-cpu.service) and
OpenWrt (/etc/init.d/mu300-cpu) applies the saved profile at boot; /etc/mu300/cpu.conf keeps it across updates.

It does not fight the rest of the power logic: mu300-power's idle "eco" still drops the big core while the device
is asleep and restores to whatever this profile set, and thermal-guard caps a hot policy a step lower and lifts it
on cool-down - but no longer above the ceiling a profile wrote (/run/mu300/cpu-ceiling), so a "saving" cap is not
undone by the cooling path (verified on the F50-B board: without the ceiling fix the cap rose a step after a hot
run, with it the cap held at 75 C idle).

LuCI: System > CPU (view mu300/cpu, mu300dash cpu_get/cpu_set, unisoc-modem/cpu adapter, ACL, catalogs); tr and
zh_Hans translated, the other catalogs carry the new ids.

Voltage offsets (the risky part of the request) are deliberately not included; the PR explains why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-10 22:09:29 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 e960122f9b Ubuntu: Wi-Fi client mode comes back after a WCN reset too (#94)
The udev rule only restarted mu300-hotspot. With the device a client of
another network the hotspot is not running, wlan0 was never reopened, and
the recovery watchdog rebooted the device 70 s after the assert (seen on an
F50, v2026.10.17 test build). wcn-reopen restarts the hotspot as before,
or takes wlan0 down and up and joins the saved network again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-10 19:27:44 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 6177959d6d mu300-next-boot lock: Linux stays, whatever happens; Android only by hand
The user asked for a Linux that never changes slot by itself. "mu300-next-boot lock" arms the Linux slot successful=1 (LK never counts a successful slot down, so it never rolls back), keeps the wish in .mu300/boot-lock on the Linux disk, and every good boot re-arms it locked. The initramfs sees the lock (the bit in misc and the file on the disk) and skips its backstop count; with no system to start it does not restore Android's slot either but waits on telnet with /run/to-android. A new kernel is the one thing that could leave a locked device with no Linux at all, so mu300-update arms the usual attempts (mu300-next-boot --trial) before it writes a boot image or rolls one back, and the first boot that reaches mu300-boot-ok locks again. "unlock" goes back to the attempts; "android" switches by hand and keeps the wish for when Linux is chosen again. A slot marked successful without the file keeps the backstop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-09 19:57:47 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 b2015b33e5 Fix round 2: a resume whose AT+SPENDC=1 is not answered OK leaves the EN-DC restore marker, a failed or timed-out VPN probe counts as wanted (asked through the new network-free mu300-vpn enabled), a failed VPN start is retried by the throttled self-check, the hold marker's grace covers the toggle deadline, the hold's direction probe is bounded, an idled hotspot stays down for a Wi-Fi client or scan mode, and tree_kill kills every process any look saw, so the re-review's findings stay closed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-07 12:03:13 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 cc374e63bb Tests for the review's findings (the hold/wake race, the stale marker, EN-DC restore, no VPN flap, VPN before the modem, wifi-client, TERM during a bounded step) and FINDINGS 36 brought up to date, so each fix stays fixed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-07 08:38:17 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 7977a1a011 mobile-data suspend and resume end within a 60 s deadline with short AT lock waits and budgets, ignore a dead terminal, go through netifd on OpenWrt, and hand the modem back to the watcher on any failure, so a silent modem or a lost SSH session can no longer leave them hanging.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-07 07:46:12 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 31173068fb Every key press lights the LEDs first, also under mu300-power's idle flag and with no daemon running, and wakes mu300-power in the background, so a device held dark can never look powered off again.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-07 07:46:12 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 4e623269a8 Merge origin/main into power-profiles (TTL, suspend, README/FINDINGS refresh)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-07 06:38:18 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 3492ee0780 mobile-data suspends and resumes through netifd (ifdown/ifup wan) when mu300-power runs with MU300_NETIFD=1, refuses to dial while suspended off except from resume, and gains resume nodial, so OpenWrt's WAN, firewall and DNS survive an idle and a stopping daemon never waits for a dial.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-07 00:55:43 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 9a58a40a8d mu300-ttl: tc on clsact egress where the kernel has pedit, so flow offloading stays on; LuCI Cellular > TTL
The nft rule sits in postrouting, which fw4's software flowtable skips, so it needed offloading off. The flowtable
transmits with dev_queue_xmit, which still runs clsact's egress hook: on the mainline kernels (act_pedit, act_csum,
cls_matchall) a matchall filter there rewrites the TTL/hop limit of every packet on every sipa_eth*, and offloading
is left alone. The 5.4 vendor kernel keeps the nft backend with offloading off (ttl.offload-off records that this
script turned it off, so tc and "off" only turn back on what it turned off). matchall cannot replace a filter
(EEXIST, seen on the U30 Air), so apply deletes and re-adds; mobile-data's bring-up calls it.

LuCI: Cellular > TTL (view mu300/ttl, mu300dash ttl_get/ttl_set, unisoc-modem/ttl adapter, ACL, catalogs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-07 00:32:08 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 5c9f7767f5 mu300-power runs on both systems; the keys wake it; OpenWrt's tap-to-poweroff handler goes.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-06 23:28:26 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 d71bf8c9d8 mu300-led: idle (dark until told otherwise) and charge (blinking power LED) for mu300-power
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-06 22:39:59 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 d86dd8f950 mobile-data: suspend lte switches EN-DC off with AT+SPENDC=2, no restart, and resume only restores it if it was on
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-06 22:28:28 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 08fa9ec773 mobile-data: suspend/resume keep data up on LTE, redial on resume, run under the radio lock, keep ENDC off
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-06 22:22:49 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 8a60a76989 mobile-data: suspend (radio off or LTE only) and resume, which the watcher respects
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-06 22:15:30 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 1c78517147 mainline: bq256xx drives the U30 Air's charger, which Android leaves with charging switched off
The SGM41511 (a bq25601, I2C 6-006b, vendor node "ti,bq2560x_chg") had no driver under 6.18 and 7.2, so it kept
what Android left in its registers: CHG_CONFIG 0, 500 mA input. The battery never charged and drained while
plugged in. port/install.py adds the compatible to bq256xx's OF and I2C tables; patch 0009 handles that node
without a register cache, with ICHG at most 1.98 A and VREG at most 4.208 V, sets the input current from the
chip's own input detection at probe and on every VBUS change from the extcon, switches charging on unless
userspace wrote "N/A" to charge_type, and names the fuel gauge in supplied_to. Patch 0010 makes sc27xx-fgu take
its status from the charger. mu300-usb reaches the chip past the driver with -f and leaves its watchdog off.
FINDINGS 33d no longer says the chip charges on its defaults. Built for 6.18.55 and 7.2.9, untested on hardware.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-06 21:19:04 +03:00
Abdurrahman Kaan DikeçandClaude Fable 5.1 91bcf27590 mu300-atd: a reply budget of T seconds is at least T seconds, not up to the next second boundary
collect() ended at $(date +%s) + T, which with whole-second clocks is anywhere from T - 1 to T seconds
away. With T=1 a command written at x.995 had 5 ms: its reply came back empty, or cut after its first
line with the OK landing in the nr1 log as a stray line. That is the macOS CI flake in
Atd.test_stray_lines_while_idle_do_not_shift_the_answers (bash 3.2, every drain waits 1 s, so the
command lands at a random point of the second). The stray-line handling itself was never at fault:
the pre-command drain always takes what arrived while idle.

The deadline is now now + T + 1, also in mu300-at's direct-tty path; mu300-at's live-daemon budget
grows from T + 30 to T + 31 to keep its slack. A new test answers just past a second boundary and
failed every time before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-06 09:34:09 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 ab7cb2a929 Merge main: the F50 LEDs and the Magisk device fixes next to openwrt-luci
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
2026-10-05 20:11:57 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 cb3008096b mu300-at and its neighbours: a process gone from /proc no longer prints "can't open" into radio.log
`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
2026-10-05 17:44:20 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 7e429273f9 android-vendor-start: no initramfs slot file is not the end of the script, so the modem starts with an older boot image
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
2026-10-05 17:35:58 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 4f2a3e1994 Merge main: the SD card, the driver fixes, the Magisk installer, mu300-extra and the eMMC by type next to openwrt-luci
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
2026-10-05 17:25:26 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 d068aaae7e Merge origin/main into f50-leds-fixes
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
2026-10-05 16:52:16 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 8378da9bc9 After the branch review: the Wi-Fi LED follows a slow hotspot, the button's "on" lights it, test shows it
"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
2026-10-05 13:22:23 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 6e6fdb86dc mu300dash: the AT terminal waits at most 5 s for the lock and 20 s for the answer, under rpcd's 30 s, and says so when the modem is slow
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
2026-10-05 12:53:44 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 9da3d6ff14 luci-app-mu300: the panel's radio on/off, modem reset and lock-apply restart take mobile-data's radio lock, and answer busy while it is held
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
2026-10-05 12:49:27 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 dd3669cd55 mobile-data: an ERROR to AT+SMMSWAP=0 is an answer from a live channel, so the radio round goes on to CFUN
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
2026-10-05 12:38:51 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 269415b135 Merge main: the driver fixes next to the Magisk installer and the slot-aware boot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-05 12:19:43 +03:00