Commit Graph
32 Commits
Author SHA1 Message Date
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 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
Abdurrahman Kaan DikeçandClaude Opus 5.5 d44fe9d4c0 mu300-usb-reset: never in host mode, and one 100 ms rebind once the LAN is up
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
2026-10-05 11:56:21 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 701eb01ad9 mobile-data: the bring-up lock is the radio lock's kind, and the dial loads sipa-dele only on a kernel that has it
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
2026-10-05 09:08:11 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 cba8e92541 After the final review: no eMMC CID fallback, only failed connections retried, build-wlan.sh strict
* 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
2026-10-05 08:29:46 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 578dc1b6aa sipa-dele is loaded by mobile-data between registration and the PDP context, never in the background
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
2026-10-05 08:28:34 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 77ccbe442a mobile-data: the radio comes up after the modem's first word and the RIL handshake, without an early power cycle
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
2026-10-05 08:03:55 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 51813ccf12 mobile-data: registration from the modem's own announcements, a bounded address wait, 4G/5G from CEREG
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
2026-10-05 07:44:14 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 bd9fce6d23 android-vendor-start: no idle second for logdw, partition links without 365 forks, boot marks in /run
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
2026-10-05 07:27:22 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 965e2e164e mu300-atd: started before the network (S19), and a second daemon on nr2 serves mobile data alone
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
2026-10-05 07:20:00 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 1f04e41cdf mu300-atd: a short drain before every command, so a stray line while idle is logged and never taken as the next answer
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
2026-10-05 07:09:29 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 83e6624e55 mu300-at: the command stays queued until answered, a live daemon gets a long answer budget, signals stop the client
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
2026-10-05 03:55:54 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 57fce257b2 mu300-atd: an empty URC channel list means none, and no drain wait after a clean reply
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
2026-10-05 03:44:44 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 2bc491124b mu300-at: the command FIFO opened read-write, an answer counts only with a final result code, 10 ms polling
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
2026-10-05 03:37:55 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 44548ee90b lan-start: udev names the bridge before usb0 joins it, so br-lan's link-local stays the same (U30 Air test D6)
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
2026-10-05 02:59:59 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 5f3364f95d mu300-at as a user says it needs root instead of looping for ever (U30 Air test D4)
`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
2026-10-05 02:52:39 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 2a4e479088 Linux on slot a: rollback-boot and old kernel bundles cannot put a slot-b init there, the slot falls back to the booted one, and the switch arms only a Linux image
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-05 02:28:46 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 9e20f444a5 next-boot, update, the recorder, the vendor chroot, collect-logs and the switch follow the slot Linux runs from
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-05 02:28:46 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 d0a6862057 mu300-os: tested with a third system, and the disk can be a test directory
MU300_DISK and MU300_SYSROOT stand in for the disk area and / in tests. A name with a dot
(openwrt-luci.old) is refused when choosing, as init would never boot it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
2026-10-05 02:08:28 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 1a69a41ea9 mu300-led: a siren the pid file does not name stops by itself
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
2026-09-29 08:45:10 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 9e60666858 F50: the heat alarm no longer reads a battery that is not there
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
2026-09-29 08:45:10 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 fa13a3676f Windows installs push LF scripts; the AP lists its stations; stale trial guards disarmed; mu300-nfc on|off
- 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
2026-09-29 00:32:03 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 a8e529cfcb U30 Air: mu300-nfc writes its NFC tag (the hotspot's Wi-Fi, a URL, text)
- 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
2026-09-28 20:00:24 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 cb641bc5d6 U30 Air: every LED under control as in ZTE's firmware; a heat alarm on the battery LED
- 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
2026-09-28 19:20:33 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 c58ab80b18 USB host tested on the U30 Air; the installers ask which adb device; a trial guard only in a trial boot
- 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
2026-09-28 16:53:00 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 71db73d941 U30 Air: its battery under mainline (efuse, ADC and fuel gauge for UMP9620)
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
2026-09-28 10:55:22 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 ed13857c26 Tests for the scripts on every system; the buttons and an LED timeout on the U30 Air
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
2026-09-28 10:18:37 +03:00