diff --git a/README.md b/README.md index 6b6e8941..bb355c47 100644 --- a/README.md +++ b/README.md @@ -7,19 +7,52 @@ [![Issues](https://img.shields.io/github/issues/dikeckaan/mu300-linux?logo=github)](https://github.com/dikeckaan/mu300-linux/issues) [![License](https://img.shields.io/badge/license-MIT%20%2F%20GPL--2.0-blue)](LICENSE) -The ZTE F50 is a pocket 5G router. This project turns it into a small Linux computer: **Ubuntu 24.04 LTS** or -**OpenWrt**, with SSH, Wi-Fi, Bluetooth and its 5G modem working. Android stays on the device, and you can go back -to it at any time. +The ZTE F50 is a pocket 5G router. This project turns it into a small Linux computer: **Ubuntu** (24.04 or +26.04 LTS) or **OpenWrt** (plain, or with a control panel for the modem), with SSH, Wi-Fi, Bluetooth and its 5G +modem working. Android stays on the device, and you can go back to it at any time. Think of it as a Raspberry Pi that already has a 5G modem, a Wi-Fi access point and 32 GB of storage inside. The **ZTE U30 Air** is supported too: the same board and chip with a battery. The installer recognises which one it is talking to; see [Supported devices](#supported-devices). -> **Türkçe:** ZTE F50 / MU300'ü küçük bir Linux bilgisayarına çevirir: Ubuntu 24.04 veya OpenWrt; SSH, Wi-Fi, -> Bluetooth ve 5G modem çalışır. Android cihazda kalır, istediğiniz an geri dönersiniz. Kurulum: önce -> `./install.sh --check` ile cihazınıza bakın, sonra `./install.sh` ile kurun; `./uninstall.sh` ile kaldırın. -> ZTE U30 Air de desteklenir (aynı kart, pilli); kurulum programı cihazı kendisi tanır. +> **Türkçe:** ZTE F50 / MU300'ü küçük bir Linux bilgisayarına çevirir: Ubuntu (24.04 veya 26.04) veya OpenWrt +> (düz ya da modem kontrol paneliyle); SSH, Wi-Fi, Bluetooth ve 5G modem çalışır. Android cihazda kalır, +> istediğiniz an geri dönersiniz. Kurulum: önce `./install.sh --check` ile cihazınıza bakın, sonra `./install.sh` +> ile kurun; `./uninstall.sh` ile kaldırın. Linux dahili belleğe ya da SD karta kurulur; bilgisayarsız kurulum için +> Magisk zip'leri de var. ZTE U30 Air de desteklenir (aynı kart, pilli); kurulum programı cihazı kendisi tanır. + +--- + +## A hobby project, at your own risk + +This is an experimental hobby project, made in spare time by people who like these devices. It is not a product, +it has no support line, and it comes with **no warranty of any kind**. Everything here is offered as it is; a release +that works on our boards may not work on yours. + +What you do with your device is your decision and your responsibility. In particular: + +* **Rooting, unlocking and recovery are not part of this project.** Getting a device rooted, flashing with Magisk, + SPD/BROM or any other third-party tool, and anything you download from anywhere else to do so, is done at your own + risk, following those tools' own instructions. We did not write them, we do not check them, and we cannot say + what they do to your device, your data or your warranty. +* **Writing to a phone-class device can leave it unusable.** The installer takes care to touch as little as it can + (see [Before you start](#before-you-start)), and the device falls back to Android when Linux does not start, but a + wrong partition, a power cut at the wrong moment, a bad cable or a mistake on our side can still brick it or erase + it. Keep a backup; do not install on a device you cannot afford to lose. +* **The modem, the radio and the network are yours to use lawfully.** Changing what your device sends (TTL, IMEI-related + settings, band locks, VPNs) may break your operator's terms or local law. Check before you turn something on. +* **Nothing here is endorsed by ZTE, Unisoc or any operator**, and no trademark is claimed. + +To the fullest extent allowed by law, the authors and contributors are not liable for any damage, loss of data, +loss of service, cost or injury arising from the use of this software, this documentation or anything linked from +them. If that is not acceptable to you, do not install it. + +> **Türkçe:** Bu deneysel bir hobi projesidir; ürün değildir, desteği ve hiçbir garantisi yoktur. Cihazın root'lanması, +> kilidinin açılması ve Magisk, SPD/BROM gibi üçüncü taraf araçlarla yapılan her türlü işlem bu projenin dışındadır ve +> tamamen sizin sorumluluğunuzdadır. Kurulum cihazı kullanılamaz hâle getirebilir ya da verilerinizi silebilir; yedek +> alın, kaybetmeyi göze alamayacağınız bir cihaza kurmayın. Yazarlar ve katkıda bulunanlar, bu yazılımın kullanımından +> doğabilecek hiçbir zarar, veri veya hizmet kaybından sorumlu değildir. --- @@ -29,12 +62,13 @@ is talking to; see [Supported devices](#supported-devices). |---|---|---| | Board, chip | `ums9620_2h10_feimao`, Unisoc T760 (UMS9620) | the same | | Power | USB only | battery (4050 mAh), charger and fuel gauge | -| LEDs used by Linux | the blue LED: mobile data | as in ZTE's firmware: battery (white: Linux is up), network (blue: 4G, white: 5G, red: no service), Wi-Fi (white: 2.4 GHz, blue: 5 GHz) | -| Heat alarm | the LED flashes red and blue | the battery LED flashes red, white, blue in turn: the SoC at 85 °C or the battery at 50 °C, until they cool down (`thermal-guard`) | +| LEDs used by Linux | as in ZTE's firmware: network (blue: 4G, white: 5G, red: no service), Wi-Fi (on while the hotspot is up) | as in ZTE's firmware: battery (white: Linux is up), network (blue: 4G, white: 5G, red: no service), Wi-Fi (white: 2.4 GHz, blue: 5 GHz) | +| Heat alarm | the network LED flashes red, white, blue in turn: the SoC at 85 °C, until it cools down (`thermal-guard`) | the battery LED flashes red, white, blue in turn: the SoC at 85 °C or the battery at 50 °C, until they cool down (`thermal-guard`) | | USB network | `192.168.77.1` | `192.168.78.1` (so both can be plugged into one computer) | | Tested | everything below | 5.4, 6.18 and 7.2: USB, Wi-Fi hotspot, Bluetooth, mobile data, VPN, LEDs | -| Battery | - | level, voltage, current, temperature and charging state in `mu300-toolkit` and `/sys/class/power_supply` on every kernel (mainline: `sc27xx-fgu`) | +| Battery | - | level, voltage, current, temperature and charging state in `mu300-toolkit`, the `openwrt-luci` dashboard and `/sys/class/power_supply` on every kernel (mainline: `sc27xx-fgu`). Charging: on 5.4 by the vendor charger stack; on 6.18 and 7.2 by the `bq256xx` driver, which is on `main` (PR #55) and comes with the next release. The mainline kernels of v2026.10.11 and older leave charging off, so the battery drains while plugged in: use 5.4 with those | | USB host (OTG) | - (its USB port is its power supply) | `sudo mu300-usb host` with an OTG adapter: flash drives (FAT, exFAT), keyboards and mice, USB modems and Ethernet adapters, with 5 V from the battery; `sudo mu300-usb device` back to the computer (the default at every boot). Mainline kernels; HDMI through USB-C adapters does not work | +| SD card | the Linux filesystem can live on a card instead of the internal storage (see [Install](#install)) | no card slot | | Buttons | power: held 3 s shuts down | power: a short press wakes the LEDs (they go dark after 60 s), held 3 s shuts down; the Wi-Fi key switches the hotspot 2.4 / 5 GHz, held 3 s turns it off or on | | NFC | - | a phone held to the device joins the hotspot, as with ZTE's firmware: `sudo mu300-nfc` shows the tag, `wifi` writes the hotspot's name and password (again at every hotspot start), `url https://...` or `text ...` anything else, `clear` empties it, `on`/`off` is the NFC switch of ZTE's web interface (kept in the tag) | @@ -45,8 +79,10 @@ LEDs and the default address follow. The U30 **Pro** is a different chip (UMS963 ## What you get -* **A real Linux system**, not an app or a container: Ubuntu 24.04 LTS with systemd and `apt`, OpenWrt with its - LuCI web interface, or OpenWrt with the MU300 control panel (below). +* **A real Linux system**, not an app or a container: Ubuntu 24.04 or 26.04 LTS with systemd and `apt`, OpenWrt + with its LuCI web interface, or OpenWrt with the MU300 control panel (below). +* **Three kernels to choose from:** Unisoc's vendor 5.4, mainline 6.18 LTS and mainline 7.2, with KVM + (`/dev/kvm`) on all three. * **Internet over 5G/LTE**, shared with everything connected to the device. * **A Wi-Fi hotspot** (5 GHz or 2.4 GHz) and **USB networking**: plug it into a computer and it shows up as a network adapter. * **SSH access** at `192.168.77.1` (U30 Air: `192.168.78.1`), plus a USB serial console. @@ -60,8 +96,9 @@ LEDs and the default address follow. The U30 **Pro** is a different chip (UMS963 * **Android and Linux share the device.** Only one runs at a time; a reboot switches between them. * **No screen output.** HDMI over USB-C does not work (the power-delivery chip never answers), so this is a headless machine you use over SSH or the web interface. -* **No sound.** The speaker and microphone path does not work yet. -* **1.4 GB of RAM.** The modem firmware permanently reserves the rest. +* **No sound.** The board has no speaker and no microphone. Voice calls with audio, through the modem's audio DSP, + are work in progress and do not carry sound yet (see [What works](#what-works-and-what-does-not)). +* **About 1.4 GB of RAM.** Most of the rest is reserved for the modem firmware. ## Before you start @@ -77,7 +114,9 @@ need `adb` on your computer. Getting to that point is not part of this project. **What protects you:** * Linux is installed into empty, unused space on the internal storage, or onto an SD card; Android's partitions are not touched (except on the 32 GB variant, where you can choose to shrink `userdata` to create that space). -* Linux starts as a "trial boot". If it fails to start, the bootloader returns to Android by itself. +* Linux starts as a "trial boot". If it fails to start 5 times in a row (you choose 1-6), the device returns to + Android by itself. + * `./uninstall.sh` puts everything back. **You need:** @@ -116,14 +155,17 @@ device that is about 32 GiB. If it reports none at all, you have the **32 GB variant**, where `userdata` fills the disk. The installer can make room by shrinking it — that erases everything in Android and rewrites the partition table, so it is experimental and it asks first. Back the device up with `tools/backup-device.sh` before saying yes. If the numbers look like -neither case, stop and open an issue with what `--check` printed; they identify the variant. +neither case, stop and open an issue with what `--check` printed; they identify the variant. With an SD card in the +slot there is a way that erases nothing: `--check` says so, and the installer offers the card instead. **On the SD card.** With a card of at least 700 MiB in the slot the installer asks whether the Linux filesystem goes there instead of into the free eMMC space (`MU300_STORAGE=sd` answers it). The card is formatted (ext4, label `mu300sd`); on the eMMC only `boot_b` and 32 bytes of `misc` are written, so a device with a small eMMC -needs no repartitioning. A card that holds another Linux (ext4) filesystem is never formatted. Without the card -the device starts the internal installation if there is one, Android otherwise. All three kernels read the card. -The U30 Air has no card slot, so it never asks there. +needs no repartitioning. A card that holds another Linux (ext4) filesystem is never formatted. A `mu300sd` card +always comes first. Without the card the device starts the internal installation if there is one; with none, it +waits 8 s for the card (30 s while one is still being detected), then returns to Android after about five minutes. +All three kernels read the card. The U30 Air has no card slot, so it never asks there. + * Put the card in while the device is switched off. A card inserted while Linux runs is seen, but it cannot be read until the next reboot. @@ -140,7 +182,8 @@ install.cmd # Windows (cmd) ![The installer: language, checks, systems and Ubuntu release](docs/images/installer/installer-1-start.png) -It asks a few questions (Ubuntu, OpenWrt or both; which one boots; a password), downloads the ready-made images, +It asks a few questions (internal storage or SD card; Ubuntu, OpenWrt or both, and which Ubuntu, which OpenWrt and +which kernel; which one boots; whether Linux boots by default; a password; the VPN extra), downloads the ready-made images, copies the Wi-Fi and modem files from your own device, shows exactly what it is about to write, and waits for you to type `INSTALL`. Then it reboots into Linux. @@ -162,6 +205,8 @@ It also asks for the **kernel**: | 3 | latest stable (7.2 for now) | the newest mainline release: the newest drivers, the same functions as 6.18; tested less than 6.18 | It can be changed later on the device with `sudo mu300-update kernel 5.4`, `... kernel 6.18` or `... kernel 7.2`. +Ubuntu 26.04 needs 6.18 or 7.2 (its programs use system calls 5.4 does not have), and so does USB host mode on the +U30 Air. ![The kernel question, in Turkish](docs/images/installer/installer-2-kernel-tr.png) @@ -194,12 +239,13 @@ copied from Android. ### OpenWrt with the MU300 control panel The third system, `openwrt-luci`, is OpenWrt 25.12 with a LuCI application written for these devices, in English, -Turkish and Chinese. It is an option next to plain OpenWrt, not a replacement: the installer asks "Which OpenWrt?" +Turkish and Chinese (29 more with the lang extra, see [Languages](#languages)). It is an option next to plain OpenWrt, not a replacement: the installer asks "Which OpenWrt?" whenever OpenWrt is chosen (`MU300_OPENWRT=plain|luci` answers without asking), and the system lives in `/openwrt-luci` on the Linux disk. Its release asset is `mu300-openwrt-luci-rootfs.tar.gz`; switch to it with `sudo mu300-os openwrt-luci`. The panel's pages: -* **Status dashboard:** live radio readings (signal, bands, cells, temperatures), mobile data state. +* **Status dashboard:** live radio readings (signal, bands, cells, temperatures), mobile data state; on the U30 Air + also the battery: its level, whether it charges, and the power in watts. * **Cellular > Network locks:** network mode, band, cell and EN-DC locks that persist across reboots and are replayed at boot, before the radio comes on where the modem allows it. * **Cellular > SMS:** read, send and delete messages. A pool daemon syncs the SIM every 30 s with `AT+CMGL`, which marks @@ -209,11 +255,13 @@ whenever OpenWrt is chosen (`MU300_OPENWRT=plain|luci` answers without asking), * **Cellular > Device management:** USB role (device or host), the USB network mode (NCM, ECM or RNDIS, applied at the next boot) and adapters in host mode that can join the LAN bridge. * **Cellular > Adapter settings:** how the panel reaches the modem (AT backend, serial port, custom AT adapter). +* **System > Languages:** the language of the interface, and the lang extra: download it, or upload the file. * **System > Power:** the active power profile and why, the battery and the power source, the idle knobs of the three profiles (Wi-Fi idle minutes, radio idle keep/lte/off, LEDs, CPU), the saver threshold and the charge limit (100 or 80 %). IPv6 on this system is relayed from the carrier (router advertisements and NAT66) instead of the prefix extension -plain OpenWrt uses. Aurora is the default theme, Bootstrap stays installed. The timings of this system are measured -in the device phase and are not listed here. +plain OpenWrt uses. Aurora is the default theme, Bootstrap stays installed. Its boot timings, measured on an F50 +and a U30 Air, are in [FINDINGS 35](docs/FINDINGS.md). + The panel is the work of kanoqwq ([`kanoqwq/mu300-linux`](https://github.com/kanoqwq/mu300-linux), branch `clean-tf-7.2`); this repository ports it, with translations rewritten as standard LuCI catalogs and the shared @@ -231,43 +279,50 @@ eamonxg. The app's own notes are in [`openwrt/luci-app-mu300/README.md`](openwrt | Test stability under load | `sudo mu300-toolkit stress all 10` | | Check the mobile connection | `sudo mobile-data status` | | Set the APN | Ubuntu: `/etc/mu300/mobile-data.conf` (`MU300_APN`, `MU300_PDP_TYPE`). OpenWrt: LuCI → Network → Interfaces → wan, or `uci set network.wan.apn='…'; uci commit network; ifup wan`. Leave it empty to keep the context the SIM defines, which is what most carriers expect | -| Change the Wi-Fi name or password | edit `/etc/mu300/hotspot.conf`, then `sudo systemctl restart mu300-hotspot` | +| Change the Wi-Fi name or password | Ubuntu: edit `/etc/mu300/hotspot.conf`, then `sudo systemctl restart mu300-hotspot`. OpenWrt: LuCI → Network → Wireless (that file is only read once, at the first boot) | +| Read and send SMS | `sudo sms list`, `sudo sms send NUMBER TEXT...`, `sudo sms delete INDEX` (OpenWrt with the panel: Cellular → SMS) | +| Send a USSD code (balance, own number) | `sudo mu300-ussd '*101#'` | +| Change the kernel | `sudo mu300-update kernel 6.18` (or `5.4`, `7.2`), then reboot | | Connect the device to someone else's Wi-Fi | `sudo mu300-toolkit` → Network → Wi-Fi → "Join a network", or `sudo wifi-client scan` then `sudo wifi-client connect "NAME"` (it asks for the password); see [Wi-Fi client](#wi-fi-client) | | Update to the newest release | `sudo mu300-update check` then `sudo mu300-update apply`. The device looks for a new release at boot and every 6 hours and says so at login and in `mu300-toolkit`; it never installs one by itself | -| Fixed TTL for mobile data (so the operator cannot tell hotspot traffic from the device's own) | `sudo mu300-ttl set 64` (`sudo mu300-ttl off` goes back to the default), or `mu300-toolkit` -> Network -> TTL | +| Fixed TTL for mobile data (so the operator cannot tell hotspot traffic from the device's own) | `sudo mu300-ttl set 64` (`sudo mu300-ttl off` goes back to the default), `mu300-toolkit` -> Network -> TTL, or LuCI Cellular -> TTL. On the mainline kernels the rule is in tc and flow offloading stays on; on 5.4 it is in nftables and offloading is off while a TTL is set | | Switch between OpenWrt and Ubuntu | `sudo mu300-os openwrt` / `sudo mu300-os ubuntu` (`openwrt-luci` for the one with the control panel) | | Failed boots in a row before it falls back to Android (1-6, default 5) | `sudo mu300-next-boot attempts N` | | Go back to Android | `sudo mu300-next-boot android`, then `sudo reboot` | -| Return to Linux from Android | `su -c mu300-linux` on the device (see below), or `boot/android-boot-linux.sh boot-linux-slotb.img` from a computer | +| Return to Linux from Android | `su -c mu300-linux` on the device (see below), or `boot/android-boot-linux.sh work/boot-linux-slotb.img` from a computer | | Send all traffic through a VPN | see below (`sudo mu300-extra install vpn` first) | | Add or remove optional parts (the VPN engines, more web interface languages) | `mu300-extra list`, `sudo mu300-extra install vpn`, `sudo mu300-extra remove vpn` (`lang` for the languages) | | Save battery: profiles, radios that go idle when nobody is connected, a charge limit | `mu300-power status`, `sudo mu300-power profile battery` (`plugged`, `saver`, `auto`), `sudo mu300-power set battery.WIFI_IDLE 10`, `mu300-power log 5 /tmp/power.csv`; on `openwrt-luci` the page System -> Power. A boot that started from a charger stays a charging boot (LED blinking, hotspot and modem down) until the Wi-Fi key is pressed; see FINDINGS 36 | | Language of the web interface (OpenWrt) | System -> System -> Language and Style; more languages: see Languages below | +| Find out which LED is which | `sudo mu300-led test` | + ### Installing from Android with a Magisk zip If the device already runs a rooted Android with Magisk 26 or newer, Linux can be installed from the device itself, without a computer: from the Magisk app (reached through scrcpy, a web panel or a phone running adb) or from `adb shell`. The zips are built from the files of a release by the "Magisk installers" workflow -(`.github/workflows/magisk.yml`), which attaches them to that release together with `SHA256SUMS-magisk`. They are -only there once the workflow has run for the release: look at the release's assets. Building them yourself: +(`.github/workflows/magisk.yml`), which attaches them to that release together with `SHA256SUMS-magisk`. It runs +by itself when a release is published, so the zips follow the other assets after a few minutes. Building them yourself: `tools/make-magisk-zips.sh RELEASE_DIR OUT_DIR`. **1. Take one zip.** One per system and kernel. The same zip works on the F50 and on the U30 Air, and installs to -the internal storage or to an SD card: the installer recognises the device and finds the place. +the internal storage or to an SD card: the installer recognises the device and finds the place. There is no zip +for `openwrt-luci` (the OpenWrt with the control panel): that one comes with `./install.sh`. | zip | system | kernel | size | |---|---|---|---| -| `mu300-magisk--openwrt-k5.4.zip` | OpenWrt | 5.4 (vendor) | 89.7 MB | -| `mu300-magisk--openwrt-k6.18.zip` | OpenWrt | 6.18 LTS | 72.1 MB | -| `mu300-magisk--openwrt-k7.2.zip` | OpenWrt | 7.2 | 72.4 MB | -| `mu300-magisk--ubuntu-24.04-k5.4.zip` | Ubuntu 24.04 | 5.4 | 165.7 MB | -| `mu300-magisk--ubuntu-24.04-k6.18.zip` | Ubuntu 24.04 | 6.18 LTS | 148.2 MB | -| `mu300-magisk--ubuntu-24.04-k7.2.zip` | Ubuntu 24.04 | 7.2 | 148.4 MB | -| `mu300-magisk--ubuntu-26.04-k6.18.zip` | Ubuntu 26.04 | 6.18 LTS | 160.5 MB | -| `mu300-magisk--ubuntu-26.04-k7.2.zip` | Ubuntu 26.04 | 7.2 | 160.7 MB | +| `mu300-magisk--openwrt-k5.4.zip` | OpenWrt | 5.4 (vendor) | 48.3 MB | +| `mu300-magisk--openwrt-k6.18.zip` | OpenWrt | 6.18 LTS | 37.0 MB | +| `mu300-magisk--openwrt-k7.2.zip` | OpenWrt | 7.2 | 37.7 MB | +| `mu300-magisk--ubuntu-24.04-k5.4.zip` | Ubuntu 24.04 | 5.4 | 123.6 MB | +| `mu300-magisk--ubuntu-24.04-k6.18.zip` | Ubuntu 24.04 | 6.18 LTS | 112.3 MB | +| `mu300-magisk--ubuntu-24.04-k7.2.zip` | Ubuntu 24.04 | 7.2 | 113.0 MB | +| `mu300-magisk--ubuntu-26.04-k6.18.zip` | Ubuntu 26.04 | 6.18 LTS | 124.6 MB | +| `mu300-magisk--ubuntu-26.04-k7.2.zip` | Ubuntu 26.04 | 7.2 | 125.3 MB | -The sizes are those of the v2026.10.08 build. There is no Ubuntu 26.04 zip with kernel 5.4: its programs need system +The sizes are those of the v2026.10.11 build. The VPN engines are not in the zips: add them on the device with +`sudo mu300-extra install vpn` (see [VPN](#vpn)). There is no Ubuntu 26.04 zip with kernel 5.4: its programs need system calls that kernel does not have, the same rule as for `install.sh`. Check a download with `SHA256SUMS-magisk`. **2. Install it.** Put the zip on the device and open it in the Magisk app (Modules, Install from storage), or run @@ -350,7 +405,8 @@ update - would wipe or erase again. For another erase, put the line back. | `MU300_SD_ERASE` | `yes` | `/data/adb` only | Not set: an SD card is never formatted, not a new one and not one holding an installation with `MU300_MODE=wipe` | | `MU300_REGION_OVERWRITE` | `yes` | `/data/adb` only | Not set: an internal region whose free space holds data is not used | | `MU300_MODE` | `update`, `wipe` | `update` either, `wipe` `/data/adb` only | `update` when a filesystem is there already (settings and data are kept) | -| `MU300_BOOT_OS` | `ubuntu`, `openwrt` | either | The system of this zip | +| `MU300_BOOT_OS` | `ubuntu`, `openwrt`, `openwrt-luci` | either | The system of this zip | + | `MU300_BOOT` | `linux`, `android` | either | `linux`: Linux is the default boot, Android after failed boots. `android`: Android stays the default and Linux starts on demand | | `MU300_BOOT_ATTEMPTS` | `1` to `6` | either | `5` | | `MU300_HOTSPOT` | `yes`, `no` | either | `yes`: Android's hotspot name and password are copied | @@ -401,7 +457,7 @@ when the server renews it. The kill switch (`KILL_SWITCH=1`) needs sing-box: wit `ENGINE=xray` is set, and when the engines are missing it stays up while they are downloaded (only the device itself, only to the release hosts, for 15 minutes at most); nothing that fails takes it down. -The engines (about 120 MB) are not part of the systems: they are the **vpn extra**, which you add once - the +The engines (about 40 MB to download, 120 MB on the device) are not part of the systems: they are the **vpn extra**, which you add once - the installer asks, or on the device: ```sh @@ -521,10 +577,13 @@ sudo mu300-update check # installed version vs newest release sudo mu300-update apply # system, kernel and boot image: download, unpack, switch; then reboot sudo mu300-update rollback # back to the previous system sudo mu300-update rollback-boot # back to the previous kernel and boot image +sudo mu300-update kernel 7.2 # another kernel: 5.4 (vendor), 6.18 (LTS) or 7.2; no argument shows the current one ``` `mu300-toolkit` offers the same under System -> Software update. Your settings, users, `/usr/local` and the vendor -files (Wi-Fi firmware, Android modem userspace) are carried over, and the previous version is kept as `.old` for +files (Wi-Fi firmware, Android modem userspace) and the installed extras are carried over (the extras are brought to +the new release), and the previous version is kept as `.old` for + a rollback until you run `mu300-update clean`. The new filesystem is unpacked beside the old one and only swapped in at the end, so an interrupted download cannot leave a half-updated system. @@ -571,8 +630,9 @@ Android data is left alone, unless you ask it to give the space back (see below) * **quick** — only erases the filesystem headers; the files stay readable on the flash until the space is reused. * **keep** — leaves the Linux filesystem alone; it simply never boots again. -A Linux filesystem on the SD card is erased too if you say so: its first 64 MiB are overwritten, which is quick, and -the files stay readable on the card until the space is reused. A card with any other filesystem is never touched. +A Linux filesystem on the SD card gets its own question: **erase** (the default) overwrites its first 64 MiB, which +is quick, and the files stay readable on the card until the space is reused; **keep** leaves the card as it is. A +card with any other filesystem is never touched. If you shrank `userdata` to make room on the 32 GB variant, it then offers to grow it back over the freed space. That is off by default and asks twice, because on the 64 GB device the same answer would hand Android the free @@ -584,36 +644,49 @@ Like the installer, it offers to reboot the device from Linux into Android first | | | |---|---| -| Ubuntu 24.04 LTS / OpenWrt 25.12 | ✅ boots, no failed services | +| Ubuntu 24.04 LTS, OpenWrt 25.12, OpenWrt with the control panel | ✅ | +| Ubuntu 26.04 LTS | 🚧 beta: kernel 6.18 or 7.2 only, tested for a shorter time than 24.04 | +| Kernels | ✅ vendor 5.4, mainline 6.18 LTS and 7.2, with the same functions (USB host on the U30 Air: mainline only); the mainline bundles carry about 360 modules (WireGuard, SQM, tunnels, USB adapters and modems, NTFS/exFAT/btrfs/NFS/CIFS, dm-crypt, containers). 6.18 hangs at boot about once in 20 boots and the device goes back to Android ([FINDINGS 31m](docs/FINDINGS.md)) | +| KVM | ✅ `/dev/kvm` on all three kernels | | Mobile data (5G NSA / LTE) | ✅ shared with Wi-Fi and USB clients; reconnects by itself after modem resets | +| SMS, USSD | ✅ `sms`, `mu300-ussd`; on `openwrt-luci` also in the panel | | Wi-Fi access point | ✅ 5 GHz (802.11ac) or 2.4 GHz, one at a time | +| Wi-Fi client | ✅ WPA2 and WPA2/WPA3 mixed, shared with USB clients; ✗ WPA3-only networks (the driver has no SAE) | | USB network + serial console | ✅ `192.168.77.1` (U30 Air `192.168.78.1`), `screen /dev/cu.usbmodem* 115200` | | SSH, telnet | ✅ | +| VPN (VLESS) | ✅ Xray or sing-box, kill switch, Tailscale through the tunnel; the engines are the vpn extra | | Bluetooth | ✅ BlueZ, scanning works | | GPU (Mali-G57) | ✅ OpenCL 3.0, headless | -| Storage | ✅ about 32 GB in the unused area of the internal eMMC on the 64 GB device; on the 32 GB one you choose the split with Android | -| RAM | ✅ 1.4 GB usable (the modem firmware keeps the rest) | +| Storage | ✅ about 32 GB in the unused area of the internal eMMC on the 64 GB device; on the 32 GB one you choose the split with Android, or use an SD card (F50) | +| RAM | ✅ about 1.4 GB usable (MemTotal 1473 MiB; the modem firmware keeps most of the rest) | | Temperature control, status LEDs, SIM tray | ✅ | +| U30 Air: battery, buttons, NFC, USB host | ✅ battery readings on every kernel, charging on 5.4 (on mainline from the next release, see [Supported devices](#supported-devices)); USB host on mainline only | | Back to Android, automatic rollback | ✅ | | Screen output (HDMI over USB-C) | ✗ the USB-C power chip never answers, so no display | -| Sound | 🚧 the card comes up (`sprdphone-sc2730`, 19 PCM devices), the audio DSP loads and answers, and calls connect — but no audio moves: every scene takes one buffer and stops. Android does not get further on this board either ([FINDINGS 24](docs/FINDINGS.md)) | -| Mainline kernel (6.18) | 🚧 experimental, see [`upstream/`](upstream/) | +| Sound | ✗ the board has no speaker and no microphone. Call audio through the modem's audio DSP is work in progress and not in the releases (`kernel/build-audio.sh`, `mu300-audio-dsp`, `mu300-voice`): with those, the sound card comes up (`sprdphone-sc2730`, 19 PCM devices) and the DSP answers, but no audio moves in any scene, and a call without audio ends after about 20 seconds, as it does under Android on this board ([FINDINGS 24, 24b](docs/FINDINGS.md)). The kernels have USB audio drivers, not tried here | ## How it works, in short -The device has two Android boot slots, A and B. Android lives on slot A and is left alone. The installer puts a -custom Linux kernel into slot B and marks it as a one-time trial. At boot, a small startup program loads the -device's drivers, finds the Linux filesystem on the SD card or in the unused part of the internal storage and -starts Ubuntu or OpenWrt from it. If Linux ever fails to start, the bootloader falls back to Android by itself. Three -small Android programs keep running inside Linux in a sandbox, because the modem needs them. +The device has two Android boot slots, A and B. Android lives on one of them (A, when the computer installer is +used) and is left alone. The installer puts a Linux kernel into the other slot and marks it as a trial. At boot, a +small startup program loads the device's drivers, finds the Linux filesystem on the SD card or in the unused part of +the internal storage and starts Ubuntu or OpenWrt from it. If Linux fails to start several times in a row (5 unless +you chose otherwise), the device falls back to Android by itself. Three small Android programs (`modem_control`, +`refnotify`, `cp_diskserver`) keep running inside Linux in a sandbox, because the modem needs them. -The kernel is built from ZTE's published (GPL) source. The reasoning behind each step is in +The 5.4 kernel is built from ZTE's published (GPL) source; 6.18 and 7.2 are mainline Linux with this project's +patches and the vendor drivers ported to them ([`upstream/`](upstream/)). The reasoning behind each step is in [`docs/FINDINGS.md`](docs/FINDINGS.md), and the full build is in [`docs/BUILD.md`](docs/BUILD.md). ## Common problems **The device does not come back after installing.** Wait two minutes. If there is still nothing, unplug and replug -it: the bootloader will have returned to Android on its own. Collect logs with `tools/collect-logs.sh`. +it. Every boot that does not finish counts, and after 5 of them in a row (or the number you chose) the device starts +Android. Collect logs with `tools/collect-logs.sh`. + +**Back in Android without having asked for it, on kernel 6.18.** About one boot in 20 hangs in its first seconds +([FINDINGS 31m](docs/FINDINGS.md)), and the device then falls back to Android. Start Linux again with the Linux +button of the Magisk module or `su -c mu300-linux`. **The computer sees the device but gets no address (macOS).** macOS does not set up a network interface it has never seen while the screen is locked. Each device has its own USB MAC address, so the first time one is plugged in @@ -633,9 +706,10 @@ operators and VPN servers often look like a different city. **I forgot the password, and Linux boots by default.** You do not need to log in to get out: -1. **Back to Android:** unplug the device about ten seconds after it powers on, then plug it in again. The - bootloader sees an unfinished boot and falls back to Android by itself (`mu300-boot-ok` only confirms a boot - ~30 s after the system is up, so an interrupted boot never counts as successful). +1. **Back to Android:** unplug the device about ten seconds after it powers on, then plug it in again, as many + times in a row as the failed boots you chose (5 by default; `mu300-next-boot attempts`). The device then sees + unfinished boots and falls back to Android by itself (`mu300-boot-ok` only confirms a boot ~30 s after the + system is up, so an interrupted boot never counts as successful). 2. **Set a new password** from your computer, without booting Linux: ```sh tools/reset-password.sh # ubuntu, openwrt or both @@ -657,9 +731,14 @@ and would overwrite the device's storage. A normal `apk upgrade` is fine, except * [`docs/BUILD.md`](docs/BUILD.md) — build the kernel and images yourself (`kernel/build-all.sh` does it in one step). * [`docs/FINDINGS.md`](docs/FINDINGS.md) — everything learned about this hardware and why each workaround exists. -* [`docs/DISTROS.md`](docs/DISTROS.md) — running other distributions (ImmortalWrt, Arch Linux ARM, Debian, Kali) - and what the 5.4 kernel rules out. -* [`upstream/`](upstream/) — the mainline 6.18 kernel port. +* [`docs/DISTROS.md`](docs/DISTROS.md) — running other distributions (ImmortalWrt, Arch Linux ARM, Debian, Kali; the + Ubuntu image's `Dockerfile` takes another base with `--build-arg BASE=...`) and what the 5.4 kernel rules out. +* [`upstream/`](upstream/) — the mainline kernel port, 6.18 LTS and 7.2. +* [`tests/`](tests/README.md) — `cd tests && python3 -m unittest` runs them all (standard library only; `lz4` for + the boot image tests), and `python3 tools/check-i18n.py` checks the installers' translations. CI + (`.github/workflows/`): `tests.yml` on Ubuntu, macOS and Windows, `installer.yml` (translations, script syntax), + `mainline.yml` (the port built every week against the newest longterm and stable kernels) and `magisk.yml` (the + Magisk zips of each release). * [Releases](https://github.com/dikeckaan/mu300-linux/releases) — prebuilt images. They contain **no proprietary files**; the installer takes those from your own device. @@ -672,7 +751,10 @@ and would overwrite the device's storage. A normal `apk upgrade` is fine, except | `rootfs/` | Ubuntu image: `Dockerfile`, `assemble.sh`, services and scripts in `overlay/` | | `openwrt/` | OpenWrt and ImmortalWrt image build; `luci-overlay/` and `luci-app-mu300/` make the `openwrt-luci` system | | `arch/` | Arch Linux ARM image build | +| `upstream/` | the mainline kernel port (6.18, 7.2) | +| `android/magisk/` | the Magisk module and the zip installer | | `android-vendor/` | scripts that copy the needed Android files from *your* device | +| `tests/` | unit tests for the installers, the boot image, `boot/init` and the device scripts | | `tools/` | helper programs, release tooling, backup, SSH/serial/log helpers | The kernel source used here is mirrored at @@ -681,11 +763,20 @@ The kernel source used here is mirrored at ## Credits and licenses * Kernel source: ZTE's GPL release for the U30 Air (mirrored by Enceka) and the Unisoc drivers in it — GPL-2.0. + The mainline kernels are Linux from kernel.org — GPL-2.0. * Wi-Fi, Bluetooth and GPU drivers: realme C51/C53 AndroidT kernel release — GPL-2.0; the patches in `kernel/patches` are GPL-2.0. * Scripts, tools and documentation in this repository: MIT (see `LICENSE`). -* `openwrt/luci-app-mu300`: the control panel by kanoqwq (`kanoqwq/mu300-linux`, `clean-tf-7.2`), changed here; the - Aurora theme (`luci-theme-aurora`) by eamonxg is downloaded at build time, pinned and checked by hash. +* kanoqwq (`kanoqwq/mu300-linux`, `clean-tf-7.2`): `openwrt/luci-app-mu300`, the control panel, changed here; the + idea of the SD card installation and the core of its boot-side change; and fixes ported from that branch (the + faster USB rebind, the early DHCP lease, RNDIS, the radio-on sequence; on `openwrt-luci` the SMS pool and IPv6 + relay mode), measured in [FINDINGS 35](docs/FINDINGS.md). +* The Aurora theme (`luci-theme-aurora`) by eamonxg is downloaded at build time, pinned and checked by hash. +* The vpn extra holds [Xray-core](https://github.com/XTLS/Xray-core) (MPL-2.0), + [sing-box](https://github.com/SagerNet/sing-box) (GPL-3.0-or-later) and + [hev-socks5-tunnel](https://github.com/heiher/hev-socks5-tunnel) (MIT), downloaded from their releases, pinned and + checked by hash. + * Stock firmware, Android vendor components and bootloaders belong to their owners and are not distributed here, with one exception: [`stock/`](stock/) holds the stock `trustos` (TEE) image for firmware `ZYV1.0.0B09`, as a last-resort repair for devices whose own TEE is damaged; all rights to it remain with ZTE/Unisoc. Read diff --git a/docs/BUILD.md b/docs/BUILD.md index a222e76b..78569165 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -11,7 +11,8 @@ LK (slot b, tries=2) ─► custom 5.4 kernel + vendor_boot DTB ├─ load 85 modules in a fixed order (boot/module-order.txt) ├─ misc: restore slot a, unless the rootfs says default-boot=linux ├─ bind USB gadget: NCM, else ECM (usb0 up immediately) + ACM console; MU300_USBNET="rndis" binds RNDIS as the one configuration with the console, and replaces the other network function (rndis wins in either order of "rndis ncm"; a panel choice of RNDIS asks for "rndis ncm ecm", so a kernel without f_rndis still gets NCM) - ├─ losetup -o 27762098176 /dev/mmcblk0 → ext4 "mu300root" (free space after userdata) + ├─ an SD card with ext4 "mu300sd", else losetup at the first 2 MiB boundary after the last partition + │ (27762098176 on the tested device) → ext4 "mu300root" (free space after userdata) └─ switch_root → systemd ├─ mu300-vendor : Android modem_control in a chroot (disarms PM watchdog, boots modem) ├─ mu300-lan : br-lan (usb0 + wlan0) 192.168.77.1 + dnsmasq DHCP/DNS diff --git a/docs/DISTROS.md b/docs/DISTROS.md index 901313a1..10506167 100644 --- a/docs/DISTROS.md +++ b/docs/DISTROS.md @@ -1,15 +1,15 @@ # Running other distributions -The boot path does not care which distribution it starts. The initramfs mounts the ext4 filesystem in the free eMMC -area, reads `/.mu300/boot-os`, and `switch_root`s into the directory named there. So a system is just a directory +The boot path does not care which distribution it starts. The initramfs mounts the Linux filesystem (ext4 on an SD +card labelled `mu300sd`, else the one in the free eMMC area), reads `/.mu300/boot-os`, and `switch_root`s into the directory named there. So a system is just a directory with a root filesystem in it, and `mu300-os ` picks the one to boot next. What a distribution has to bring: * **arm64 (aarch64) userspace.** -* **It must work on Linux 5.4.** This is the limit in practice: the kernel is ZTE's vendor 5.4, and the newest - userspaces have started to depend on newer kernels. Ubuntu 26.04 was dropped for exactly this reason — its `tar` - resolves every path with `openat2` (Linux 5.6) and fails on this device. +* **It must work on the kernel you run.** With ZTE's vendor 5.4 this is the limit in practice: the newest + userspaces have started to depend on newer kernels. Ubuntu 26.04's `tar` resolves every path with `openat2` + (Linux 5.6) and fails on 5.4, which is why Ubuntu 26.04 is offered only with the mainline kernels (6.18, 7.2). * **Nothing else.** Drivers, firmware and the Android vendor chroot come from this repository's overlay, which is copied into every image. @@ -18,7 +18,9 @@ What a distribution has to bring: | Distribution | Build | Notes | |---|---|---| | Ubuntu 24.04 LTS | `rootfs/` (default) | the tested default, systemd 255 | +| Ubuntu 26.04 LTS | `docker build --build-arg BASE=ubuntu:26.04 -t mu300-ubuntu:26.04 rootfs/` then `rootfs/assemble.sh` | released (beta); needs kernel 6.18 or 7.2 | | OpenWrt 25.12 | `openwrt/build-rootfs.sh` | router use, LuCI, ~140 MiB RAM | +| OpenWrt 25.12 with the MU300 panel | `MU300_SYSTEM=openwrt-luci openwrt/build-rootfs.sh` | released as `openwrt-luci`, see [BUILD.md](BUILD.md) | | ImmortalWrt 25.12 | `MU300_FLAVOUR=immortalwrt openwrt/build-rootfs.sh` | OpenWrt fork with more drivers and LuCI apps | | Arch Linux ARM | `arch/build-rootfs.sh` | rolling, 258 MiB image / 922 MiB installed; built, not yet booted on hardware | | Debian 13 | `docker build --build-arg BASE=debian:13 -t mu300-debian:13 rootfs/` then `rootfs/assemble.sh` | same package names as Ubuntu | @@ -35,8 +37,10 @@ it cannot do on this device: * **No monitor mode or packet injection.** The Wi-Fi chip is a Unisoc SC2355 with a vendor driver that offers station and access-point mode only. `airmon-ng` has nothing to switch, so the classic Wi-Fi attacks are out. -* **No external Wi-Fi adapter**, at least not yet: the USB-C port runs as a *gadget* (the device pretends to be a - network card for your computer). Host mode would be needed to attach an adapter, and that is untested here. +* **No external Wi-Fi adapter on the F50**: its USB-C port runs as a *gadget* (the device pretends to be a network + card for your computer) and is its power supply. The U30 Air has host mode on the mainline kernels + (`mu300-usb host`), and those kernels carry MediaTek, Ralink and Realtek USB Wi-Fi drivers; an adapter has not + been tried here. * **No screen.** Everything is over SSH; Kali's desktop tooling is pointless on this hardware. What is left is still useful: a pocket-sized box with its own 5G modem that can run `nmap`, `sqlmap`, `metasploit`, @@ -63,7 +67,7 @@ syscalls 5.4 does not have — `openat2` (5.6) in `tar` is the one that bit us w | Void Linux | — | — | ✅ rootfs tarball exists; runit, so the services need porting | | Raspberry Pi OS arm64 | Debian | no | ✅ Debian underneath; take the rootfs out of its image | | openSUSE Tumbleweed | 4.3 | **yes** | ⚠️ works only after replacing `tar` (same trap as Ubuntu 26.04) | -| Ubuntu 26.04+ | 3.7 | **yes** | ⚠️ same; this is why the default moved back to 24.04 | +| Ubuntu 26.04+ | 3.7 | **yes** | ⚠️ same on 5.4; fine on 6.18 and 7.2, where it is released (beta) | | Arch (official image), Void (official image), Clear Linux | — | — | ❌ no arm64 container image (Arch: use Arch Linux ARM) | No glibc on this list demands a kernel newer than 5.4, so the kernel is rarely the blocker; what breaks is individual @@ -79,15 +83,17 @@ somebody has to write those ~15 service definitions again before the modem and W ## What does not fit * **Anything that needs its own kernel** (Fedora IoT, postmarketOS images, Home Assistant OS): they ship kernels - built for other devices, and this one only boots the vendor 5.4 kernel from the boot image. -* **Distributions whose userspace requires a newer kernel**: Ubuntu 26.04 and later, and eventually any rolling - distribution. Arch works today; a future `glibc` or `systemd` may end that, which is why it is the "fun" option + built for other devices, and this one only boots this project's kernels (vendor 5.4, mainline 6.18 and 7.2) from + the boot image. +* **On 5.4, distributions whose userspace requires a newer kernel**: Ubuntu 26.04 and later, and eventually any + rolling distribution; use 6.18 or 7.2 for those. Arch works today; a future `glibc` or `systemd` may end that, which is why it is the "fun" option and not the default. * **x86 anything.** ## Installing a distribution you built -The installer knows `ubuntu` and `openwrt` by name. For anything else, unpack the tarball next to them and select +The installer knows `ubuntu`, `openwrt` and `openwrt-luci` by name. + For anything else, unpack the tarball next to them and select it (from Android, with the Linux filesystem mounted as in `tools/android-mount-mu300root.sh`): ```sh diff --git a/docs/FINDINGS.md b/docs/FINDINGS.md index 19202fd4..50447460 100644 --- a/docs/FINDINGS.md +++ b/docs/FINDINGS.md @@ -5,6 +5,99 @@ Android 13, stock kernel `5.4.254-android12-9-g9c6342244991`) during September 2 Each item lists the symptom, the root cause and the fix, so it can be reused for other UMS9620 devices (for example the ZTE U30 Air). +**Update 2026-10-07:** the sections from 31 on were measured in October 2026, on mainline kernels as well as 5.4, +and on more boards (a second F50, the U30 Air: §33, §34). This is a lab notebook, newest last: a later section can +correct an earlier one. Where that happened, the earlier text is kept and an **Update** note under it points to +what replaced it. The table below gives each section's state. + +## Contents + +| § | Title | Status | +|---|---|---| +| 1 | Slot b one-shot trial (never touch boot_a) | partly superseded by §17, §33a and PR #30 (Linux on either slot) | +| 2 | Boot ramdisk must be LZ4 legacy | current | +| 3 | Logs without a serial console | current | +| 4 | USB gadget dependency chain | current (module count: see note) | +| 5 | The ~290 s power cut (PM co-processor watchdog) | current | +| 6 | Load average of about 12 is not CPU usage | current (5.4); for 6.18 see §31e, §31g | +| 7 | Matching source | current | +| 8 | Build notes | current | +| 9 | Unused space after userdata | current | +| 9b | There is no second home for the rootfs | current | +| 10 | Mounting gotchas | current | +| 11 | systemd 259 works on 5.4 | current | +| 12 | USB Ethernet must be up before the host activates ECM | current (NCM is now the default function) | +| 13 | Userland needing newer syscalls | current (Ubuntu 26.04 offered again, mainline only) | +| 13b | One reader at a time on the modem's AT tty | current | +| 13b-2 | The modem stops answering on Linux | superseded: not reproduced since (§13f-1, §31, §35) | +| 13f | The data call completes and still nothing arrives | current (fixed) | +| 13f-1 | How it looked while it was open | superseded by §13f | +| 13g | The same dead downlink, a different cause | current; open: why the watchdog missed it | +| 13h | Ubuntu never started the delegate at all | current (fixed) | +| 13e | The mailbox stops sending after one slow delivery | current (fixed) | +| 13c | Reading this tty needs `read -t` | current | +| 13d | Memory shared with the modem must not be mapped write-back | current | +| 14 | Wi-Fi bring-up | current (MAC and warning: superseded by §34, §31g) | +| 14b | Wi-Fi station mode: decided at boot, and one way only | partly superseded by §31n (interface recreation) | +| 14c | The Wi-Fi driver can panic the kernel while it is still starting | current (fixed) | +| 15 | Radio, registration and the data bearer | current | +| 16 | Rootfs details found while testing data | current | +| 26b | The tunnel needs sing-box's gvisor stack on this kernel | current | +| 26c | SMS needs PDU mode | current | +| 26e | The Xray engine | current (engines now the vpn extra, PR #31) | +| 17 | Linux as default without losing the Android fallback | current (updated in place; PR #39) | +| 18 | Services and drivers Android runs that the minimal port lacked | current | +| 19 | systemd ordering pitfall | current | +| 20 | Diagnosing early power cuts | current | +| 20b | Telling a userspace reboot from a power cut | current | +| 21 | One LAN for USB and Wi-Fi | current (subnet per device: §33b) | +| 22 | Regulatory database | current | +| 23 | Only one AP; 5 GHz AP needs the DS Parameter Set element | current | +| 26 | Modem resets and mobile data recovery | current (address check added: §31c) | +| 26d | USSD, and the AT lock | current | +| 27 | Where the missing ~550 MiB of RAM goes | current | +| 28 | Mali-G57 GPU (OpenCL) without Android | current | +| 29 | OpenWrt 25.12 next to Ubuntu | current (third system: §35) | +| 30 | Installer notes | current | +| 24 | No internal audio hardware | open | +| 24b | A second board, from a clean install: where the stall actually is | open | +| 25 | SC2355 Bluetooth on BlueZ | current | +| 31 | Ubuntu on 6.18, and what it takes | current (kernel now 6.18.55) | +| 31a | Wi-Fi RX: sync_for_device stopped invalidating | current | +| 31b | The modem units' ordering cycle | current | +| 31c | A context that comes back with a new address | current | +| 31d | Evidence of a failed boot | current | +| 31e | sipa-set-rps: a thread that never started | current | +| 31f | The delegate on OpenWrt: -EINPROGRESS taken for a failure | current | +| 31g | Three warnings on every boot, three vendor bugs | current | +| 31h | Power-off, and the command line's crutches | current | +| 31i | A Wi-Fi card that is late at boot panicked the board | current | +| 31j | SD host under mainline | partly superseded by §31l (mmc numbering) | +| 31k | The Linux filesystem on the SD card | current; the hang is open in §31m | +| 31l | The card slot took mmc0 | current | +| 31m | Hard hangs in the first seconds under 6.18 | open | +| 31n | Wi-Fi powered off and on at the same time: an Oops in the RX interrupt | current (fixed, PR #41); remaining races open | +| 31o | KVM, and the module set a router needs | current | +| 32 | Old kernels, an idle IPA, and an update that ended in Android | current | +| 32a | The offset in init, replaced by every boot image update | current | +| 32b | The Magisk installer on a device | partly superseded by PR #40 (passwords in update mode) | +| 33 | The same board with a battery | partly superseded by §33d, §33f | +| 33a | misc and boot_b were looked up before the eMMC existed | current | +| 33b | Two devices on one computer | current (identity extended in §33j) | +| 33c | Mainline on the U30 Air: the USB PHY waited for a Type-C driver | partly superseded by §33d (battery) | +| 33d | The U30 Air's battery under mainline | current; open: charger-type detection to be retested | +| 33e | USB host on the U30 Air | partly superseded by §33d (charger driver) | +| 33f | The U30 Air's LEDs | current | +| 33g | The U30 Air's NFC tag | current | +| 33h | A trial guard that outlived its experiment, again | current | +| 33i | A reboot "with the hotspot off" that never brought it back | current | +| 33j | Two devices restored from one backup | current | +| 33k | Vendor driver fixes from the U30 Air test, measured | current | +| 34 | LEDs, and the defects from a second board's test | current | +| 35 | kanoqwq's fixes, measured | current (panel languages: PR #48) | +| 36 | Power profiles: idle radios, the charging boot, the charge guard | current; power table and device questions open (PR #62) | +| 37 | System suspend | current (fixes on branch `suspend-drivers`); power not measured | + ## Hardware and firmware facts | Item | Value | @@ -18,6 +111,9 @@ UMS9620 devices (for example the ZTE U30 Air). | Bootloader | Unisoc LK ("sprdlk"), Trusty TEE, A/B slots | | Boot images | boot and vendor_boot are Android header v4, page 4096, LZ4 legacy ramdisks | +**Update 2026-10-07:** the charger entry is the device tree's, not the F50's hardware: nothing answers at the +charger's address 0x6b on the F50 (§24, §33d). The U30 Air has the chip, an SGM41511 (a bq25601), §33d. + ## Boot chain and safe testing ### 1. Slot b one-shot trial (never touch boot_a) @@ -29,6 +125,12 @@ UMS9620 devices (for example the ZTE U30 Air). rolls back to slot a. * Linux `init` writes the original slot-a block back to `misc` as one of its first steps, so any later reboot returns to Android. + + **Update 2026-10-07:** three later changes. In default-Linux mode init does not restore slot a (§17). The + restore runs after the vendor modules, once the eMMC exists, about 10 s in (§33a). And since PR #30 Linux can + be on slot a, with Android on b (after an OTA, the Magisk installer does this). init takes the booted slot from + LK and restores the other one (`linux_slot_detect` in `boot/init`). "boot_b" in this file means the Linux + slot's boot partition. * The `uboot_log` partition contains LK's ring log. It is the best source for "which slot was chosen" and "why did it reset" (`rst_mode`, `charge first poweron reset`, watchdog flags). @@ -58,6 +160,9 @@ The UDC only appears when the whole chain probes, in this order: (not `-EPROBE_DEFER`) when its IIO channel is missing and is never probed again. * The exact working order of the 86 modules is in `boot/module-order.txt`. + **Update 2026-10-07:** the list now has 85 entries. `sipa-dele.ko` left it and is loaded after the modem + (§13f). + ### 5. The ~290 s power cut (PM co-processor watchdog) * Symptom: Linux runs normally, then the device loses power about 290 s after boot. LK shows `charge first poweron reset`, not a watchdog reset. @@ -153,6 +258,10 @@ Asked for often, because a smaller eMMC variant leaves less free space behind `u The root filesystem moved from Ubuntu 26.04 to 24.04 LTS: 26.04's userland starts to depend on syscalls newer than 5.4 (below), 24.04 is supported until 2029 and runs on 5.4 without workarounds. +**Update 2026-10-07:** Ubuntu 26.04 is offered again, as a beta, and only with a mainline kernel (6.18 or 7.2). +`install.sh` refuses it with 5.4 for the `openat2` reason in §13. Releases ship `mu300-ubuntu-26.04-rootfs.tar.gz` +next to 24.04 (v2026.10.11). + ### 11. systemd 259 works on 5.4 5.4 is systemd's minimum baseline; the system boots to `running` with the `old-kernel` taint. @@ -163,6 +272,11 @@ The root filesystem moved from Ubuntu 26.04 to 24.04 LTS: 26.04's userland start in its first CONNECT notification and macOS' `AppleUserECM` does not pick up a later "connected" notification. * Fix: `ifconfig usb0 up` immediately after binding the UDC in the initramfs. +**Update 2026-10-07:** the gadget now offers NCM by default, with ECM only as a fallback. Windows 10 2004+ and 11 +bind their inbox driver to NCM, and Windows has no ECM driver. RNDIS is available on request (§35, K6). See +`setup_usb_gadget` in `boot/init`. The same applies to §3's "next to ECM". The rule above, bring the link up before +the host looks, still holds. + ### 13. Userland needing newer syscalls * Ubuntu 26.04's GNU `tar` (1.35+dfsg-4ubuntu0.4) fails with `Cannot stat: Function not implemented` for every path, creating and extracting: it resolves paths with `openat2` (Linux 5.6) and has no fallback. 24.04's tar does @@ -275,7 +389,8 @@ seconds. Ruled out by measurement, so that nobody spends another evening on them: * **Our own boot recorder.** It did write 8 MiB to the eMMC every five seconds and that is worth fixing on its own - (§ below), but with it disabled the channel still died. + (fixed since: `early-recorder` writes only what it has, not the whole 8 MiB window), but with it disabled the + channel still died. * **A cached alias of the modem's shared memory.** The vendor device tree marks these reservations without `no-map` (only `rebootescrow` has it), so the 5.4 kernel maps them exactly the same way. * **The modem power manager.** `sprd_mpm_init_resource_ops()` is never called in the 5.4 tree either, so the NULL @@ -293,6 +408,12 @@ The next step is therefore not a kernel one: find what the CP expects from the A not - the time-sync channel `refnotify` cannot open is the most concrete lead, followed by running more of the vendor modem userspace in the chroot the way `modem_control` already is. +**Update 2026-10-07:** this failure has not been seen since. The modem now answers for whole boots on both kernels: +SMS and data on 6.18 (§31), and on 20 soft reboots of two devices the RIL handshake and registration worked on every +boot, with a single `AT+SFUN=4` in the whole run (§35). Which change ended it was not established. The likeliest is +§13f-1's `AT+CGDATA` timeout: a late `CONNECT` was read as the answer to the next command. The delegate's load order +(§13f) also changed in this period. Treat this section as history. + ### 13f. The data call completes and still nothing arrives - fixed: the delegate has to come after the modem **Fixed.** The downlink works: DNS resolves through the carrier's own resolvers and a TCP handshake to 1.1.1.1:443 completes, with `rx_packets` and the IPA receive interrupt climbing for the first time. What it @@ -321,6 +442,11 @@ Two things that are not this bug, and cost time looking like it: `sbtun` rules (prefs 9000-9010, table 2022) nor sing-box itself, so every packet still goes into a tunnel with nothing at the other end and every test reads `Operation not permitted`. That is an EPERM from routing, not from the modem, and it made a working data path look dead. + + **Update 2026-10-07:** `mu300-vpn off` now removes rules that a dead engine left behind (`routing_cleanup`, + prefs 9000-9010 and table 2022), and every exit of the Xray engine takes its routes down (§26e). A service stop + still leaves the kill switch up on purpose. Only `ENABLE=0` or `mu300-vpn off` removes it. Since PR #31 the engines + are not in the images at all, see §26e. * **A resolv.conf left behind by Docker.** Images built before the build fix carry the container's `nameserver 192.168.65.7` as a regular file rather than the symlink to `/tmp/resolv.conf`, so every name lookup fails while addresses work fine. @@ -576,8 +702,14 @@ the vendor driver did, brings the modem up: `fail SIZE` goes to 0 and "Modem Ali * `rmmod wcn_bsp` crashes the kernel; reboot instead of reloading the Wi-Fi stack. * The driver logs `API version not match` for a few command IDs (the realme driver is slightly older than the ZTE firmware) and a `WARNING` in `sc2355_free_cmd_buf` (spin_unlock_bh in IRQ context). + + **Update 2026-10-07:** the warning was a real lock bug and is fixed on both kernels + (`kernel/patches/wlan_combo-tx-complock-irqsave.patch`, §31g). * Verified after the fix: the driver parses `wifi_board_config.ini`, `wlan0` comes up, `iw dev wlan0 scan` lists nearby networks and `hostapd` (nl80211, WPA2) reaches `AP-ENABLED`. The MAC address is randomized on each load. + + **Update 2026-10-07:** not any more. The 5.4 driver reads LK's `androidboot.wifimac`, as the mainline port does + (`kernel/patches/wlan_combo-bootargs-mac.patch`, §34). * A crash right after installing a module can leave a 0-byte `.ko` on ext4; run `sync` after installing files. ## Mobile data without Android RIL @@ -594,6 +726,11 @@ The SC2355 can be an access point or a client of somebody else's network, but th interface does not help either - with the first one still present the firmware answers scans with `sc2355_scan_timeout`. + **Update 2026-10-07:** this was measured on 5.4, recreating a station after the AP. It is not a general rule. + Under 6.18, OpenWrt's netifd deletes the driver's station `wlan0` and adds an AP interface on every boot + (`iface 'wlan0' deleted`, then `type 3 added`, §31n), and the AP comes up. What went wrong in §31n was a race + with the probe's power-off, not the recreation itself. + So the mode belongs to the boot: `mu300-wifi-client.service` runs before `mu300-hotspot.service`, joins the saved network while `wlan0` is still a station, and holds `/run/mu300-wifi-client.active`, which the hotspot unit refuses to start on (`ConditionPathExists=!`). Going back to the hotspot needs no reboot, because that is the direction @@ -686,6 +823,12 @@ Sending picks the encoding from the text - GSM 7-bit while every character fits what makes `ığşçöü ÇĞİÖŞÜ` survive. Verified by sending to the SIM's own number and reading it back intact. ### 26e. The Xray engine, and a connectivity test that could only say no + +**Update 2026-10-07:** since PR #31 the engines (Xray-core, hev-socks5-tunnel, sing-box) are not in the Ubuntu or +OpenWrt images. They are an optional release asset, `mu300-extra-vpn.tar.gz`, installed with +`mu300-extra install vpn` or by the installer's question. `mu300-vpn` looks in `extra/vpn/bin` first. Since PR #49, +Tailscale's own traffic also goes through the tunnel (`TAILSCALE=0` opts out). The engine choice below still +holds (`mu300-vpn`, `ENGINE` default). `mu300-vpn` now defaults to `ENGINE=xray`: Xray-core does VLESS, hev-socks5-tunnel owns a plain kernel TUN (`xtun`) and hands each flow to Xray's SOCKS port on loopback. Neither installs routes, so the script does, with sing-box's rule prefs and table (9000-9010, table 2022): Xray's own sockets carry mark `0x2d0` and go to `main`, as do the LAN @@ -733,6 +876,12 @@ address around it: `ip rule add pref 8999 to lookup main`, test, delete t * Verified: `mu300-next-boot linux` + reboot returned to Linux and re-armed slot b; `mu300-next-boot android` + reboot booted slot a. +**Update 2026-10-07:** the list above is the first version, and the rest of this section replaces three things in +it. Slot b is re-armed with `tries = N + 1`, not 2. `mu300-boot-ok` waits for the USB network and SSH, not for +`multi-user.target` (`mu300-boot-ok.service`, still 30 s). Since PR #39, an arm from Android after LK's own fallback +restarts init's count (`stage=boot-tries-restart`, the `boot-tries` block in `boot/init`). Before that, in exactly that +case, init counted N + 1 and sent the first boot after `su -c mu300-linux` back to Android. + **One interrupted boot was enough to lose Linux.** Re-arming with `tries = 2` gives Linux exactly one boot that may fail. `mu300-boot-ok` runs about a minute after power-on, so pulling the plug once during that minute - or a power cut, or a crash - sent the next boot to Android. The initramfs has its own counter meant to allow five @@ -792,6 +941,11 @@ there go to Android. the first seconds of systemd leaves no log. `mu300-early-recorder.service` keeps writing `dmesg` to the boot_b log area for the first five minutes. + **Update 2026-10-07:** it now writes every 2 s for the first 90 s, then every 10 s (§31d). It runs up to 300 s on + Ubuntu (`mu300-early-recorder.service`) and up to 420 s from OpenWrt's preinit + (`openwrt/overlay/lib/preinit/05_mu300_early_recorder`). It writes only what it has collected, not the full + 8 MiB. + ### 20b. Telling a userspace reboot from a power cut, and finding who asked for it `/sys/fs/pstore/console-ramoops-0` survives into the next boot and separates the two cases in one line. A power cut or a watchdog leaves the log ending mid-sentence; a deliberate reboot ends with the kernel's own @@ -829,6 +983,9 @@ would log as "Power down" rather than "Restarting system". ### 21. One LAN for USB and Wi-Fi * `br-lan` (192.168.77.1/24) bridges `usb0` and `wlan0`; one dnsmasq serves both. + + **Update 2026-10-07:** 192.168.77.1 is the F50's default. The U30 Air uses `.78` (`mu300-lan-ip`, §33b), and + `lan.conf` or LuCI can change either. * cfg80211 refuses to bridge `wlan0` ("Device does not allow enslaving to a bridge") because `IFF_DONT_BRIDGE` stays set: the SC2355 driver marks the interface as AP but returns an error from `change_virtual_intf` when tearing down the previous firmware mode fails, so cfg80211 skips clearing the flag. `kernel/patches/wlan_combo-allow-bridging-ap.patch`. @@ -870,6 +1027,9 @@ would log as "Power down" rather than "Restarting system". runs `up` again after two failed checks; `mobile-data down` sets `/run/mu300-mobile-data-down` so a manual disconnect is respected. Verified by switching the radio off: data returned without intervention. + **Update 2026-10-07:** the check also compares the interface's address with the context's (`AT+CGPADDR`). A + context can come back with a new address while `sipa_eth0` keeps the old one (§31c). + ### 26d. USSD, and the AT lock that made the channel look dead Three separate traps, and the first one hid the other two for an evening. `mu300-ussd` handles all three. @@ -929,7 +1089,9 @@ Three separate traps, and the first one hid the other two for an evening. `mu300 ### 29. OpenWrt 25.12 next to Ubuntu * Layout: the ext4 area holds `/openwrt` (and `/ubuntu`, or Ubuntu directly in the root on first installs); `/.mu300/boot-os` selects the system and `init` starts `/lib/systemd/systemd` or procd's `/sbin/init`. The disk stays - mounted at `/mnt/mu300-disk`; `mu300-os ubuntu|openwrt` switches. `openwrt/build-rootfs.sh` builds the rootfs from the + mounted at `/mnt/mu300-disk`; `mu300-os ubuntu|openwrt` switches. (**Update 2026-10-07:** a third system, + `openwrt-luci`, OpenWrt with the MU300 control panel, sits next to them (§35). `mu300-os` switches to any system + directory on the disk.) `openwrt/build-rootfs.sh` builds the rootfs from the official armsr/armv8 tarball (checksum-verified) with apk, our kernel modules flat in `/lib/modules/` (ubox kmodloader), the vendor chroot and procd services (`mu300-vendor`, `mu300-hw`, `mu300-post`). * Cellular WAN is a netifd protocol (`proto mu300cell`, option `apn`), so LuCI/fw4 handle routing, DNS and NAT; @@ -1416,6 +1578,9 @@ instead (`vbc_proc_write` -> `dsp_vbc_reg_write`, e.g. `echo 1700eb0 1`); never Everything here was measured on the test device (64 GB F50, Vodafone TR, 5G NSA) with 6.18.54 and the upstream/ modules, running the release's Ubuntu and OpenWrt images. +**Update 2026-10-07:** the port has been on 6.18.55 since PR #26 (`KV` in `upstream/build.sh`), and it also builds +against 7.2.9, shipped as `mu300-kernel-7.2.tar.gz`. Sections 31e onwards were mostly measured on 6.18.55 and 7.2.9. + ### 31. Ubuntu on 6.18, and what it takes Ubuntu had never been booted on the mainline kernel. With the kernel bundle from `upstream/make-bundle.sh`, installed by `mu300-update` (modules into every system, the boot image built on the device), it boots in under @@ -2010,6 +2175,13 @@ the one in use, was then nowhere on the device. The file now keeps the other sys on the filesystem (not after a wipe); on the device, OpenWrt and then Ubuntu again left a file with both, and the OpenWrt shadow hash matched the password in it. +**Update 2026-10-07:** since PR #40 an update (keep mode) leaves the system's accounts and passwords as they are. +No password is generated and no password file is written. A password is made only for a new filesystem, a wipe, +a system added beside another, or when `MU300_PASSWORD`/`MU300_PASSWORD_RESET=yes` asks for one. The install +refuses a system that would be left with an empty password or the image's default. See +`android/magisk/installer/mu300-install.sh` and `tools/android-install.sh`. No device test of that change is +recorded. + ## ZTE U30 Air ### 33. The same board with a battery @@ -2047,6 +2219,10 @@ With them: 93/93 modules, USB network, the hotspot, Bluetooth, mobile data, `/sy `gpio-leds` (`pwr_green`, `net_blue`/`net_red`/`net_green`/`net_white`, `wifi_blue`/`wifi_white`), driven by `mu300-led`. No `LEDS_TRIGGER_NETDEV` in this kernel, so the Wi-Fi LED follows the hotspot service, not traffic. +**Update 2026-10-07:** that LED list is wrong. Of the GPIO LEDs only `net_blue` is wired. The others are +LDO-switched camera supplies and the PMIC's keypad backlight sink, and the remaining six `gpio-leds` light nothing +(§33f). + ### 33a. misc and boot_b were looked up before the eMMC existed `sdhci-sprd` is one of the vendor modules, so the eMMC appears only once they are loaded (about 10 s in). init looked @@ -2087,7 +2263,9 @@ Two more things that only show with two devices on one computer: every gadget ha Under 6.18 and 7.2 the U30 Air has USB, mobile data, the VPN, the hotspot, Bluetooth and its LEDs (`CONFIG_LEDS_GPIO`). The battery is not reported: its charger and fuel gauge (the SQC stack and `sc27xx-fgu` on -the UMP9620) have no mainline drivers; the charger IC keeps charging on its own defaults. Kernel bundles now name +the UMP9620) have no mainline drivers (for the charger IC see 33d: it does not charge without one). +(**Update 2026-10-07:** both are reported now. Patches 0004-0006 add the UMP9620 fuel gauge, and mainline's +`bq256xx` drives the charger and switches charging on, which Android had left off (§33d, PR #55).) Kernel bundles now name the devices they run on (`./devices`): mu300-update and the installers do not put a bundle from before this onto a U30 Air. @@ -2103,15 +2281,69 @@ values in Unisoc's 5.4 drivers: conversion - fuel gauge: enable bits at 0x2008/0x2010, the 4200 mV calibration in bits 15:7. `bat-temp` is the NTC's voltage on this board, not a temperature (71.2 "degrees" at first): the battery node's `voltage-temp-table` converts it. - The charger IC has no driver, so the status comes from the battery current. Mainline read a discharge current + Without a charger driver the status came from the battery current (patch 0010 now takes it from the charger, see + below). Mainline read a discharge current as ~2 billion: `u32 cur - 8192` wraps below zero; the vendor driver casts to s64 first. The first status fallback asked for the capacity, whose calibration asks for the status: a stack overflow in the first second of every boot. Five of them in a row put the device back into Android by itself - the fallback did its job - and the panic was in pstore. -The charger (SGM41511, `ti,bq2560x_chg` on I2C) still has no driver under mainline: it charges on its power-on -defaults and reports nothing; I2C is not even enabled there. Under 5.4 the vendor SQC stack drives it. +The charger is an SGM41511 (part 0010 in REG0B, a bq25601), I2C bus 6 at 0x6b, DT node `charger@6b` with +`ti,bq2560x_chg`, `monitored-battery`, `extcon`, an `otg-vbus` regulator and the vendor `vindpm-value` (4270 mV), and +no interrupt. Under 5.4 the vendor SQC stack drives it. An earlier version of this section said that under mainline +it "charges on its power-on defaults"; that was wrong. The chip runs on the battery and keeps its registers across a +reboot, so mainline found it as Android had left it. Read on the U30 Air under 7.2.9 (2026-10-06): + +``` +00:04 01:8a 02:8b 03:6f 04:58 05:87 06:67 07:40 08:24 09:00 0a:80 0b:14 +``` + +REG01 has CHG_CONFIG (bit 4) at 0: charging off. REG00 has the input current at 500 mA, REG02 the charge current at +660 mA, REG04 VREG at 4.208 V, and REG05 the watchdog off. REG08 reports a USB host (SDP) with power good and no +charging. Under 6.18 and 7.2 the battery never charged, and drained while the device was plugged in. The fuel gauge +still said Full, 100 % at 3.88 V, because its status came from the current. + +Mainline's `bq256xx` driver now handles the node. `port/install.py` adds the compatible to its OF and I2C tables with +the bq25601's data, and patch 0009 changes the following for that node only: + +- No register cache. The driver's cache starts from the power-on defaults, so every read-modify-write would have + written them back over Android's values (and over `mu300-usb`'s OTG bit in REG01). +- The charge current is at most 1.98 A, Android's value. The battery node says 3 A, which is too much for this + 4050 mAh cell. VREG is at most 4.208 V: Android's REG04 has that, while the node says 4.3 V. Termination is on and + the watchdog off. VINDPM comes from `vindpm-value`, rounded up to the chip's 100 mV steps. +- The node has no `input-current-limit-microamp`, and the driver's default of 2.4 A is too much for a 500 mA USB + port. The input current is 500 mA until a charger type is known. The type comes from the UMP9620's own charger + detection (`sprd_pmic_detect_charger_type()`, as `sc2731_charger` and the Unisoc kernel use it): SDP 500 mA, + CDP 1.5 A, DCP 2 A, and `usb_type` from the same result. The charger's own input detection (IINDET_EN in REG07, + then VBUS_STAT in REG08) drives D+/D-, which on this board are the USB gadget's lines to the computer. It runs + only when the PMIC device or its result is missing, and the driver says so once. With it, SDP or unknown is + 500 mA, CDP 1.5 A, DCP 2 A and non-standard 1 A. The type is read at probe and again on every VBUS change. With no interrupt, those changes come from the extcon. If the node's + extcon is not the `extcon-usb-gpio` device (on the U30 Air the PHY's points at the PMIC's Type-C block, which has + no driver, 33c), the driver uses that device, as the USB PHY does. Each run also switches charging on. +- `charge_type` on `/sys/class/power_supply/bq256xx-charger` is the userspace switch: `N/A` stops charging, also + across plugs, and `Fast` starts it again. `status`, `online`, `usb_type`, `input_current_limit` and + `constant_charge_current` are there as well. There is no second `bq256xx-battery` supply. +- The fuel gauge is in the charger's `supplied_to`, and patch 0010 makes it take its status from + `bq256xx-charger`, as it does from the SC27xx chargers. + +The driver owns 6-006b now, so `mu300-usb` reaches the chip with `i2cget/i2cset -f` and leaves its watchdog off. +On expiry, the watchdog would drop the driver's settings. Nothing answers at 0x6b on the F50 (24). If its DT has +the node, the probe stops at the first read. + +On the U30 Air under 7.2.9 (2026-10-06) the driver binds (`part 2, rev 0`), switches charging on (Android had left +CHG_CONFIG at 0), and the fuel gauge reads +219 mA at 3.888 V, status Charging. Two things were wrong in that +first build: + +- `sc27xx-pmic spi4.0: failed to detect charger type`, so the driver fell back to IINDET_EN. On that Mac CDP port + the result was usb_type 0 and 500 mA; Android uses 1.5 A there. `port/install.py` had given the UMP9620 the + SC2730's detection register, 0x1b9c. The UMP9620's BC1.2 status register is 0x239c (`UMP9620_CHARGE_STATUS` in + Unisoc's `sprd-bc1p2.h`), with the bits mainline expects: DONE 11, SDP 7, DCP 6, CDP 5. The edit now uses it, + and input detection has to be tested again. +- `sc27xx-fgu/capacity` read 575. The FGU's always-on user area keeps the last capacity across a reboot, and + Android keeps it in 0.1 %. Until then the status had been Full, and the calibration that runs whenever the + battery is not charging forced anything above 100 back to 100. Patch 0011 reads and saves that value in 0.1 % on + the UMP9620, and clamps the reported capacity to 0-100. ### 33e. USB host on the U30 Air, and a trial guard that outlived its trial @@ -2130,6 +2362,10 @@ before. Two things the vendor stack does elsewhere: boost included. It refuses host mode while REG08 reports power good (a computer or charger on VBUS), and turns the boost off at boot: the chip runs on the battery and keeps its registers across a reboot. + **Update 2026-10-07:** the charger has a driver under mainline now, `bq256xx` (§33d, PR #55). `mu300-usb` still + sets the OTG bit, but through `i2cget`/`i2cset -f` while the driver owns 6-006b. It leaves the chip's watchdog + off, because the watchdog would drop the driver's settings. + A Logitech receiver (HID) and a flash drive (FAT, mounted and read) worked through a USB-C adapter under 6.18 and 7.2. The drive read at ~3 MB/s with or without the PHY's host settings; it is an old stick, not yet compared elsewhere. HDMI through the same adapter needs DisplayPort alternate mode over USB-C, which this project has on @@ -2364,10 +2600,30 @@ Air, ten `ifdown wan; ifup wan` gave the WAN back in fix should re-derive it from the LAN). * **TTL and the flowtable (K28, R23)**: `mu300-ttl set 64` turned flow offloading off and the sipa_eth0 flowtable went (1 -> 0); `off` brought both back. +* **TTL in tc keeps the flowtable (mainline)**: the nft rule sits in postrouting, which an offloaded flow never + reaches: `nf_flow_offload_ip_hook` (ingress of br-lan) rewrites the packet and hands it to `neigh_xmit` -> + `dev_queue_xmit` on sipa_eth0. `dev_queue_xmit` still runs clsact's egress hook (`sch_handle_egress`) before the + qdisc, for every packet whichever way it came, so a `matchall` filter there with `pedit ex munge ip ttl set N pipe + csum ip` (and `ip6 hoplimit set N`) rewrites offloaded and device-own traffic alike, and flow offloading can stay + on. Needs `NET_SCH_INGRESS` (clsact), `NET_CLS_ACT`, `NET_CLS_MATCHALL`, `NET_ACT_PEDIT` and `NET_ACT_CSUM` + (mu300-mainline.config: the last three are modules, loaded one by one - OpenWrt's kmodloader `modprobe` takes one + module per call) and a `tc` that has pedit's `ex` syntax (OpenWrt's `tc-tiny` 6.18, which sqm-scripts brings, + does). The 5.4 vendor kernel has no `act_pedit`: there mu300-ttl keeps the nft rule and turns offloading off. + matchall cannot replace a filter (`tc filter replace` answers EEXIST once one is there), so `apply` deletes its + own (prefs 10 and 11) and adds them again; the filters belong to each sipa_eth* (all 16 get them), and + mobile-data's bring-up calls `mu300-ttl apply`. Checked on the U30 Air (7.2.9, openwrt-luci): `set 64` put both + filters on every sipa_eth*, the counters grew with traffic (538 packets for a 1 MB download), `flow_offloading` + stayed 1 and no nft table was made; `set 65` changed the key to 0x41; the filters removed by hand came back with + `ifup wan`; `off` removed them all. The VPN was on during the check, so the forwarded LAN traffic left through + xray's own sockets rather than an offloaded flow. * **The panel**: every page (Status, Network locks, SMS, AT terminal, Adapter settings, Device management) in a browser set to English, German, Turkish and Chinese on both devices: no Chinese in English, German or Turkish, no string of the catalogs left in English in Turkish or Chinese, German shows English. Backend refusals (a bad number, an over-long SMS) have Turkish and Chinese entries; a radio switch during a dial answers "busy". + + **Update 2026-10-07:** since PR #48 LuCI and the panel have a language switch. English, Turkish and Chinese are + in the images, and 46 languages in all come with the `lang` extra (`mu300-extra install lang`, or System > + Languages in the panel). German now comes from that extra. * **LEDs (K38, K39, K68)**: not ported here. The F50's lamp states were measured with someone watching and are implemented by the f50-leds-fixes work (FINDINGS 34); the fork's boot chase, lamp switches and LED page follow that branch. @@ -2447,3 +2703,132 @@ Open questions for the device: * What the bq256xx `charge_type` node does on writes: `N/A` stops charging, `Fast` resumes it, or the driver rewrites it from its own state. * The unit tests ran under dash and bash on the dev host; busybox ash (the shell on OpenWrt) has not run them there. + +### 37. System suspend + +Can mainline sleep the way Android idles - the AP asleep, the modem awake? Tested on F50-B (6.18.55, Ubuntu, +USB-powered, the SIM without service: `+CEREG: 2,8`) on 2026-10-06 with the config change of branch +`suspend-spike` (`CONFIG_SUSPEND`, `PM_DEBUG`, `PM_ADVANCED_DEBUG`, `PM_SLEEP_DEBUG`, `PM_WAKELOCKS`, +`PM_AUTOSLEEP` - autosleep built, off - and the tick change below). Short answer: **yes, the firmware does it**; +what stood in the way was three drivers and one config default (all fixed below, in the follow-up). + +**The firmware.** `/sys/kernel/debug/psci` on the release kernel already says `SYSTEM_SUSPEND is supported` +(PSCI v1.0 under the DT's `arm,psci-0.2`). The vendor 5.4 kernel has no platform suspend driver either; mainline's +`psci_init_system_suspend()` registers `mem`. With the options: `/sys/power/state` = `freeze mem`, +`/sys/power/mem_sleep` = `s2idle [deep]`. + +**Results** (`rtcwake -s 20`; `pm_test` stages first): + +| run | result | +|---|---| +| `freeze`, pm_test=freezer / `mem`, pm_test=devices | return after 5 s, everything works afterwards | +| `mem`, pm_test=processors, **periodic tick** | **panic**: hard lockup on CPU1 after the CPUs came back, board restarted by itself | +| one CPU offline/online, periodic tick, no suspend | the same panic: the CPU's timers never fire again | +| `mem` processors / core, **NO_HZ_IDLE + HIGH_RES_TIMERS** | return after 5 s | +| `freeze` (s2idle), Wi-Fi up | returns at once: the PCIe WAKE# irq calls `pm_wakeup_hard_event()` during noirq suspend | +| s2idle, Wi-Fi up, PCIe `power/wakeup` disabled | **20 s** (1.08 s, a WAKE# wakeup, back to sleep, 18.97 s), RTC wake through the PMIC irq (23); USB network, Wi-Fi client, AT, Bluetooth all fine | +| `mem` (PSCI SYSTEM_SUSPEND), Wi-Fi up | **returns after 0.43 s**: Marlin3 pulls WAKE# low right after its L2 entry; USB, Wi-Fi, AT, BT fine | +| `mem`, Wi-Fi and BT closed | **19.94 s asleep**, RTC wake (IRQ 23); USB, AT, BT fine; **Wi-Fi does not come back** | +| s2idle, Wi-Fi closed | 20 s; Wi-Fi does not come back either | + +So PSCI SYSTEM_SUSPEND enters and returns, the DDR content survives, the CPUs come back, and the modem keeps +running across it (AT answers at once, `sprd-mpm` sees its channels awake, no modem restart). No callback failed +(`suspend_stats`: 0 failures in every run) and no `Call trace` outside the two panics. + +**The tick.** allnoconfig leaves `HZ_PERIODIC` (250 Hz) without high-resolution timers. cpuidle's power-down +states stop the local timer, so `cpuidle_register_driver()` puts every CPU into the *periodic* broadcast once +(`tick_broadcast_mask: ff`, all `arch_sys_timer` shut down, the `sprd_timer` IPIs the tick to all eight CPUs). +`tick_broadcast_offline()` takes a CPU out of that mask and nothing puts it back when it comes online; without +`TICK_ONESHOT`, `tick_broadcast_enter()` still lets it into the power-down state, and it never gets a timer +interrupt again (`arch_timer` count frozen, `taskset -c 7 sleep 1` never returns, the buddy watchdog panics +~30 s later). Suspend takes CPUs 1-7 down and up, so it hit this every time. `NO_HZ_IDLE` + `HIGH_RES_TIMERS` +(arm64's defconfig) gives the one-shot broadcast that is armed on every idle entry: hotplug and suspend work. +It also stops waking all eight CPUs 250 times a second at idle; its effect on idle power was not measured here. + +**What broke in the spike** (the PCIe WAKE#, Wi-Fi after a suspend, the PMIC watchdog) was taken apart on +branch `suspend-drivers` (2026-10-06/07, F50-B, the same kernel plus the changes below; logs in `/root/susp2/`). +Two of the spike's conclusions were wrong, and the table above reads differently with what was found: + +* **WAKE# was the firmware's debug log.** wcn_bsp's `sprd_ep_resume()` sends `at+armlog=1` after every resume + (vendor code), and its sysfs default turns the log on at every chip power-on; `wifi-start`'s `at+armlog=0` did + not outlive the next power-on (Bluetooth's start powers the chip up again). With the log on, the firmware pulls + WAKE# within 0-2 s of every L2 entry to push log packets. Measured with PCIe wakeup enabled and Wi-Fi up: + log on, `mem` returned after 1.0-1.3 s (`pm_wakeup_irq` 18, the WAKE# line); `echo 0 > armlog_status`, the + full 20 s, woken by the RTC; the next resume turned the log on again and the sleep after it returned after + 4 s. Fixed in wcn_bsp: the log is off by default and the resume leaves it as it was (`echo 1 > + /sys/devices/virtual/misc/wcn/devices/armlog_status` turns it on for debugging). Three `mem` runs in a row + with Wi-Fi up and PCIe wakeup enabled then slept the full 20 s. +* **"Wi-Fi does not come back after a suspend while it was closed" was a suspend while it was *open*.** + Without a WoWLAN configuration cfg80211's `wiphy_suspend()` closes every interface (`cfg80211_leave_all`: the + P2P device's `CMD_CLOSE`, the station's `CMD_DISCONNECT`), and the WCN PCI function, which suspends + asynchronously, had usually taken the bus down by then: both commands were dropped (`send [CMD_CLOSE] fail + because bus done`), the firmware kept them open, and the driver thought them closed. Wi-Fi itself reconnected + after the resume. The *next close and open of Wi-Fi* - with or without a suspend in between - then got the + firmware assert (`WCN Assert in mchn.c line 137 ... get_wcn_bus_ops, chn10`), after which the chip is in + "card dump" and only a reboot helps. In the spike the Wi-Fi-up runs came first, so the closed-Wi-Fi runs got + the blame. Reproduced on demand: a Wi-Fi-up `mem`, then `ip link set wlan0 down/up` and no second suspend: + assert. On a chip with no Wi-Fi-up suspend since its power-on, sleeps with Wi-Fi closed (Bluetooth on) were + fine three times out of three (`mem`, s2idle, `mem`), and so was one with the chip off (Wi-Fi and Bluetooth + closed). `iw phy phy0 wowlan enable any` before the sleep avoided the assert, which proved the mechanism. + Fixed in sprd_wlan_combo: WoWLAN "any" is configured when the wiphy registers, so cfg80211 leaves the + interfaces as they are, and the firmware learns about the sleep through the PCIe channel's `power_notify` + (`CMD_POWER_SAVE`), as before. The station stays associated across the sleep (no reconnect); a hotspot stays an + access point. `iw phy phy0 wowlan disable` brings the old behaviour back. A device link that orders the WCN + platform device's suspend before the PCI function's was tried first: the commands then reached the firmware, + but the queued disconnect made `power_notify` refuse the suspend (`Q not empty suspend not allowed`, -EBUSY) + and the next sleep ended with `CMD_SET_REGDOM` timeouts and an assert; dropped. + +**Fixed, measured on F50-B** (6.18.55, these changes; each run `rtcwake`, `pm_wakeup_irq` 23 = the RTC): + +| run | result | +|---|---| +| idle, release kernel (periodic tick) | arch_timer 0/s, timer broadcast IPIs **1725/s**, sprd_timer 246/s, all IRQs 2162/s (20 s, twice) | +| idle, NO_HZ_IDLE + HIGH_RES_TIMERS | arch_timer 400-520/s, broadcast IPIs **112-120/s**, sprd_timer 170/s, all IRQs **980-1125/s** | +| `cpu7` offline/online ×3, then CPUs 1-6 at once | no lockup, `taskset -c N sleep` returns on every CPU (release kernel: panic) | +| `mem` 20 s, Wi-Fi client up | woken by the modem after 11.5 s (see wake sources); Wi-Fi associated, ping fine | +| `mem` 90 s, Wi-Fi up, radio off (`AT+CFUN=4`) | **91.1 s asleep, no reset**; the PMIC watchdog counts again afterwards (CTRL 0xa, counter running) | +| `mem` 120 s, Wi-Fi up | 120.8 s, Wi-Fi associated, ping fine | +| `mem` ×2, Wi-Fi up, then wlan0 down/up | no `bus done`, no assert, Wi-Fi rejoins | +| Wi-Fi closed (BT on): `mem` and s2idle, then open | no assert, Wi-Fi rejoins, ping fine | +| s2idle 20 s, Wi-Fi up | 21.3 s, RTC | +| `mem` 20 s, hotspot (AP) up | 21.2 s; still an AP on channel 36 with hostapd running (no client was at hand to associate) | +| `mem`, Wi-Fi up, PCIe `power/wakeup` enabled | woken by WAKE# after ~1 s: with WoWLAN "any" the firmware wakes the host for traffic, as asked | + +The rest: + +* **The PMIC watchdog** (`ump9620-pmic-wdt`) keeps counting while the AP sleeps. It is now stopped in its + `suspend_noirq` callback, if it was running, and loaded with a fresh count and started again in `resume_noirq` + - what the vendor's `sprd_wdt` does for the AP watchdog. A hang in the last suspend steps or the first resume + steps is not covered; the vendor accepts the same window. +* **pcie-sprd's WAKE#** is no longer `IRQF_NO_SUSPEND` and wake-armed for good: `pm_wakeup_hard_event()` only when + `device_may_wakeup()`, the line is disabled for the sleep like any other and unlazily (`IRQ_DISABLE_UNLAZY`), so + that it is masked in the EIC - PSCI SYSTEM_SUSPEND returns on any interrupt that reaches the GIC, whatever the + kernel thinks of it - and armed (`enable_irq_wake`) only when `power/wakeup` is enabled. It is off by default: + `echo enabled > /sys/devices/platform/soc/26100000.pcie/power/wakeup` makes Wi-Fi traffic wake the device. + With it off the firmware's WAKE# request waits for the resume (`wake# value:1, wake down count:N` in the log). +* `ums9620-ipa-sys-pd: power off maybe failed` on every suspend, harmless; the USB gadget drops for the sleep + (`br-lan: port usb0 disabled`) and comes back. +* The PM debug options cost nothing at runtime: `pm_print_times` and `pm_debug_messages` are 0 by default, so a + suspend logs what it logged before; they stay (pm_test). + +**Wake sources.** The RTC (PMIC irq 23) every time. **The modem wakes `mem` by itself**: the mailbox irq is +`IRQF_NO_SUSPEND`, as in the vendor 5.4 driver, and its interrupt reaches the GIC, which ends PSCI +SYSTEM_SUSPEND; no change was needed. With the radio on, the first sleeps ended after 11.5, 20 and 11.7 s on +`irq read smsg: dst=5, channel=6, type=4` (the AT channel's sbuf event): the modem's unsolicited `+CSQ`/`+CESQ` +signal reports on `stty_nr0`, every few seconds, and `mobile-data`'s registration poll (`up`, every 2 s, while +there is no service). With `AT+CFUN=4` the sleep ran to the alarm. A long sleep with the radio on needs those +reports off (what Android's RIL does on screen-off) - for `mu300-power`, not the kernel. Not tested yet (needs a +hand or a SIM with service): the power key (it shares the PMIC irq 23 with the RTC), a USB plug (a PMIC EIC +line), an incoming SMS (a `+CMTI` URC on the same channel as the reports, so it should). + +**What `mu300-power` can rely on:** `mem` with Wi-Fi up, down or the chip off; Wi-Fi as it was afterwards; sleeps +longer than the PMIC watchdog's 60 s; PCIe wakeup as an opt-in. What it has to arrange: the modem's signal +reports and the mobile-data poll off before a long sleep, or the modem wakes the device every 10-20 s. + +**Not measured:** power. The F50 has no battery; the U30 Air (fuel gauge) is where suspend's saving can be +measured, unplugged. + +Logs of every run stayed on F50-B under `/root/susp/` (the spike: `*.log`, dmesg before/after, `/proc/interrupts`, +the two panic records) and `/root/susp2/` (the follow-up, with the scripts that ran them). F50-B was left on the +6.18.55 build of branch `suspend-drivers` (radio on, Wi-Fi client, one more 20 s `mem` checked). The 7.2.9 +build of the branch compiles, kernel and all modules; it has not been booted yet. diff --git a/openwrt/luci-app-mu300/README.md b/openwrt/luci-app-mu300/README.md index b77fbb27..9449ebf3 100644 --- a/openwrt/luci-app-mu300/README.md +++ b/openwrt/luci-app-mu300/README.md @@ -7,6 +7,8 @@ dashboard, live radio readings, persistent network/band/cell/EN-DC locks, a guarded AT terminal and an SMS UI. The Device Management page controls USB role and gadget network policy, and lists host-side USB network adapters for optional attachment to the LAN bridge. +The TTL page (Cellular) sets the TTL of everything that leaves through mobile data +(`mu300-ttl`, through the `unisoc-modem/ttl` adapter). The dashboard follows LuCI's selected language. Its colors follow Aurora's existing tokens when present, or the official Bootstrap theme's light/dark tokens. diff --git a/openwrt/luci-app-mu300/htdocs/luci-static/resources/mu300/common.js b/openwrt/luci-app-mu300/htdocs/luci-static/resources/mu300/common.js index 08858f95..bd1419f7 100644 --- a/openwrt/luci-app-mu300/htdocs/luci-static/resources/mu300/common.js +++ b/openwrt/luci-app-mu300/htdocs/luci-static/resources/mu300/common.js @@ -34,6 +34,8 @@ var callLangGet = rpc.declare({ object: 'mu300dash', method: 'lang_get', expect: var callLangSet = rpc.declare({ object: 'mu300dash', method: 'lang_set', params: [ 'op', 'codes', 'source' ], expect: { '': {} } }); var callPowerGet = rpc.declare({ object: 'mu300dash', method: 'power_get', expect: { '': {} } }); var callPowerSet = rpc.declare({ object: 'mu300dash', method: 'power_set', params: [ 'op', 'key', 'value' ], expect: { '': {} } }); +var callTtlGet = rpc.declare({ object: 'mu300dash', method: 'ttl_get', expect: { '': {} } }); +var callTtlSet = rpc.declare({ object: 'mu300dash', method: 'ttl_set', params: [ 'value' ], expect: { '': {} } }); /* Mainland carriers by PLMN, for when COPS gives the numeric format. The names are messages: translated once, when * the module loads (a page's language does not change without a reload). */ @@ -608,6 +610,7 @@ return baseclass.extend({ callUsbNetList: callUsbNetList, callUsbNetAdd: callUsbNetAdd, callLangGet: callLangGet, callLangSet: callLangSet, callPowerGet: callPowerGet, callPowerSet: callPowerSet, + callTtlGet: callTtlGet, callTtlSet: callTtlSet, carrierName: carrierName, qLevel: qLevel, qLevelLabel: qLevelLabel, qLabel: qLabel, qCol: qCol, qScore: qScore, esc: esc, fmtBytes: fmtBytes, fmtRate: fmtRate, fmtUptime: fmtUptime, PLMN_CN: PLMN_CN, injectCss: injectCss, v: v, set: set, spark: spark, neighborRows: neighborRows, diff --git a/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/ttl.js b/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/ttl.js new file mode 100644 index 00000000..9c1b3bc8 --- /dev/null +++ b/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/ttl.js @@ -0,0 +1,92 @@ +'use strict'; +'require view'; +'require dom'; +'require mu300.common as M'; + +/* Every value from the backend goes into E() inside an array: LuCI's E() takes a lone string as HTML, an array's + * strings as text. */ +/* Cellular > TTL: the TTL (IPv6: hop limit) of everything that leaves through mobile data. The backend is mu300dash + * ttl_get/ttl_set (unisoc-modem/ttl, mu300-ttl): tc on the mainline kernels, nftables (with the firewall's + * fast-path off while a TTL is set) on the 5.4 vendor kernel. */ +return view.extend({ + load: function() { return L.resolveDefault(M.callTtlGet(), {}); }, + + render: function(state) { + M.injectCss(); + this.root = E('div', { 'class': 'mud' }); + this.paint(state || {}); + return this.root; + }, + + reload: function() { + var self = this; + return L.resolveDefault(M.callTtlGet(), {}).then(function(st) { self.paint(st || {}); return st; }); + }, + + /* run a ttl_set (a number from 1 to 255, or off) and show its result */ + set: function(btn, value) { + var self = this; + M.busy(btn, true); + return M.callTtlSet(String(value)).then(function(r) { + M.busy(btn, false); + if (!r || r.ok !== 1) { + M.toast(_('Failed: %s').format(M.errText(r)), { type: 'error', timeout: 6000 }); + return; + } + M.toast(_('Saved'), { type: 'success' }); + return self.reload(); + }, function() { + M.busy(btn, false); + M.toast(_('Management connection lost'), { type: 'error', timeout: 6000 }); + }); + }, + + paint: function(st) { + var self = this, ifs = st.iface || []; + + var rule = st.backend === 'tc' ? 'tc (' + ifs.join(', ') + ')' : st.backend === 'nft' ? 'nftables' : '--'; + var rows = [ + [ _('Current setting'), st.enabled ? _('Fixed at %d').format(st.value) : _('Not changed (default)') ], + [ _('Rule in force'), rule ] + ]; + if (st.offload === 0 || st.offload === 1) + rows.push([ _('Flow offloading'), st.offload ? _('Enabled') : _('Disabled') ]); + var card = E('section', { 'class': 'mud-card', 'id': 'mud-ttl' }, [ + E('h3', {}, _('TTL of mobile data')), + E('div', { 'class': 'mud-note' }, + _('Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart.')) + ].concat(rows.map(function(r) { + return E('div', { 'class': 'mud-r' }, [ E('span', { 'class': 'mud-k' }, [ r[0] ]), E('span', { 'class': 'mud-v' }, [ r[1] ]) ]); + }))); + if (st.backend === 'nft') + card.appendChild(E('div', { 'class': 'mud-note', 'id': 'mud-ttl-nft' }, + _('On this kernel the firewall fast-path is off while a TTL is set'))); + + var actions = E('div', { 'style': 'display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0' }); + [ 64, 65, 128 ].forEach(function(n) { + var b = E('button', { 'class': 'mud-btn', 'id': 'mud-ttl-' + n }, [ _('Set %d').format(n) ]); + b.addEventListener('click', function() { self.set(b, n); }); + actions.appendChild(b); + }); + var input = E('input', { 'type': 'number', 'min': '1', 'max': '255', 'step': '1', 'class': 'cbi-input-text', + 'id': 'mud-ttl-value', 'style': 'width:6em', 'placeholder': '1-255' }); + var custom = E('button', { 'class': 'mud-btn', 'id': 'mud-ttl-custom' }, _('Set')); + custom.addEventListener('click', function() { + var v = String(input.value).trim(); + if (!/^[1-9][0-9]{0,2}$/.test(v) || +v > 255) { + M.toast(_('Enter a number from 1 to 255'), { type: 'error' }); + return; + } + self.set(custom, +v); + }); + actions.appendChild(input); + actions.appendChild(custom); + var off = E('button', { 'class': 'mud-btn warn', 'id': 'mud-ttl-off', 'disabled': st.enabled ? null : '' }, _('Turn off')); + off.addEventListener('click', function() { self.set(off, 'off'); }); + actions.appendChild(off); + card.appendChild(actions); + card.appendChild(E('div', { 'class': 'mud-note' }, _("64 makes every packet leave like the device's own traffic"))); + + dom.content(this.root, card); + } +}); diff --git a/openwrt/luci-app-mu300/po/ar/mu300.po b/openwrt/luci-app-mu300/po/ar/mu300.po index 2134b8c2..66ff88c0 100644 --- a/openwrt/luci-app-mu300/po/ar/mu300.po +++ b/openwrt/luci-app-mu300/po/ar/mu300.po @@ -21,6 +21,9 @@ msgstr "طرفية AT" msgid "Adapter settings" msgstr "إعدادات المحوّل" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "إدارة الجهاز" @@ -1140,6 +1143,45 @@ msgstr "أنا: %s" msgid "Delete" msgstr "حذف" +msgid "Current setting" +msgstr "الإعداد الحالي" + +msgid "Fixed at %d" +msgstr "ثابت على %d" + +msgid "Not changed (default)" +msgstr "دون تغيير (افتراضي)" + +msgid "Rule in force" +msgstr "القاعدة السارية" + +msgid "Flow offloading" +msgstr "تفريغ التدفقات (flow offloading)" + +msgid "TTL of mobile data" +msgstr "قيمة TTL لبيانات الجوال" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "كل حزمة تخرج عبر بيانات الجوال تحصل على قيمة TTL هذه (IPv6: حد القفزات). الهاتف أو الحاسوب المحمول خلف نقطة الاتصال يرسل 64 (Windows: 128) والجهاز يمررها بقيمة أقل بواحد، وهكذا يستطيع المشغل تمييز حركة المرور المشتركة." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "في هذه النواة يكون المسار السريع للجدار الناري متوقفًا ما دامت قيمة TTL مضبوطة" + +msgid "Set %d" +msgstr "اضبط %d" + +msgid "Set" +msgstr "اضبط" + +msgid "Enter a number from 1 to 255" +msgstr "أدخل رقمًا من 1 إلى 255" + +msgid "Turn off" +msgstr "إيقاف" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "مع 64 تخرج كل حزمة كأنها من حركة مرور الجهاز نفسه" + msgid "Dashboard info failed" msgstr "فشل جلب معلومات اللوحة" @@ -1278,6 +1320,12 @@ msgstr "طلب لغة غير صالح" msgid "Unknown source" msgstr "مصدر غير معروف" +msgid "The TTL adapter gave no valid reply" +msgstr "لم يُرجع محول TTL ردًا صالحًا" + +msgid "Invalid TTL" +msgstr "قيمة TTL غير صالحة" + msgid "Request too large" msgstr "الطلب كبير جداً" @@ -1409,3 +1457,12 @@ msgstr "لا توجد خلية خادمة للقفل عليها" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "تعذرت قراءة إعداد TTL" + +msgid "The TTL could not be set" +msgstr "تعذر ضبط TTL" + +msgid "Unknown TTL operation" +msgstr "عملية TTL غير معروفة" diff --git a/openwrt/luci-app-mu300/po/az/mu300.po b/openwrt/luci-app-mu300/po/az/mu300.po index 70aac9d5..66324da9 100644 --- a/openwrt/luci-app-mu300/po/az/mu300.po +++ b/openwrt/luci-app-mu300/po/az/mu300.po @@ -21,6 +21,9 @@ msgstr "AT terminalı" msgid "Adapter settings" msgstr "Adapter parametrləri" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Cihazın idarəsi" @@ -1140,6 +1143,45 @@ msgstr "Mən: %s" msgid "Delete" msgstr "Sil" +msgid "Current setting" +msgstr "Cari ayar" + +msgid "Fixed at %d" +msgstr "%d olaraq sabit" + +msgid "Not changed (default)" +msgstr "Dəyişdirilməyib (standart)" + +msgid "Rule in force" +msgstr "Qüvvədə olan qayda" + +msgid "Flow offloading" +msgstr "Axın yüngülləşdirmə (flow offloading)" + +msgid "TTL of mobile data" +msgstr "Mobil məlumatın TTL dəyəri" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Mobil məlumat vasitəsilə çıxan hər paket bu TTL dəyərini alır (IPv6: hop limit). Hotspota qoşulan telefon və ya noutbuk 64 (Windows: 128) göndərir, cihaz isə onu bir azı ilə ötürür — operator paylaşılan trafiki bundan tanıya bilər." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Bu nüvədə TTL təyin olunduqca firewall-un sürətli yolu söndürülüdür" + +msgid "Set %d" +msgstr "%d təyin et" + +msgid "Set" +msgstr "Təyin et" + +msgid "Enter a number from 1 to 255" +msgstr "1 ilə 255 arasında rəqəm daxil edin" + +msgid "Turn off" +msgstr "Söndür" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64 ilə hər paket cihazın öz trafiki kimi çıxır" + msgid "Dashboard info failed" msgstr "Panel məlumatını almaq mümkün olmadı" @@ -1278,6 +1320,12 @@ msgstr "Yanlış dil sorğusu" msgid "Unknown source" msgstr "Naməlum mənbə" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL adapteri etibarlı cavab vermədi" + +msgid "Invalid TTL" +msgstr "Yanlış TTL" + msgid "Request too large" msgstr "Sorğu çox böyükdür" @@ -1409,3 +1457,12 @@ msgstr "Kilidlənəcək xidmət edən hüceyrə yoxdur" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL ayarı oxuna bilmədi" + +msgid "The TTL could not be set" +msgstr "TTL təyin edilə bilmədi" + +msgid "Unknown TTL operation" +msgstr "Naməlum TTL əməliyyatı" diff --git a/openwrt/luci-app-mu300/po/bg/mu300.po b/openwrt/luci-app-mu300/po/bg/mu300.po index 040eb1e6..fc1bc2d7 100644 --- a/openwrt/luci-app-mu300/po/bg/mu300.po +++ b/openwrt/luci-app-mu300/po/bg/mu300.po @@ -21,6 +21,9 @@ msgstr "AT терминал" msgid "Adapter settings" msgstr "Настройки на адаптера" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Управление на устройството" @@ -1140,6 +1143,45 @@ msgstr "Аз: %s" msgid "Delete" msgstr "Изтриване" +msgid "Current setting" +msgstr "Текуща настройка" + +msgid "Fixed at %d" +msgstr "Фиксиран на %d" + +msgid "Not changed (default)" +msgstr "Без промяна (по подразбиране)" + +msgid "Rule in force" +msgstr "Действащо правило" + +msgid "Flow offloading" +msgstr "Разтоварване на потоци (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL на мобилните данни" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Всеки пакет, който излиза през мобилните данни, получава този TTL (IPv6: hop limit). Телефон или лаптоп зад точката за достъп изпраща 64 (Windows: 128), а устройството го препраща с едно по-малко – така операторът може да разпознае споделения трафик." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "На това ядро бързият път на защитната стена е изключен, докато е зададен TTL" + +msgid "Set %d" +msgstr "Задай %d" + +msgid "Set" +msgstr "Задай" + +msgid "Enter a number from 1 to 255" +msgstr "Въведете число от 1 до 255" + +msgid "Turn off" +msgstr "Изключи" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "С 64 всеки пакет излиза като собствения трафик на устройството" + msgid "Dashboard info failed" msgstr "Информацията за таблото е недостъпна" @@ -1278,6 +1320,12 @@ msgstr "Невалидна езикова заявка" msgid "Unknown source" msgstr "Неизвестен източник" +msgid "The TTL adapter gave no valid reply" +msgstr "Адаптерът за TTL не върна валиден отговор" + +msgid "Invalid TTL" +msgstr "Невалиден TTL" + msgid "Request too large" msgstr "Заявката е твърде голяма" @@ -1409,3 +1457,12 @@ msgstr "Няма обслужваща клетка за заключване" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Настройката за TTL не можа да бъде прочетена" + +msgid "The TTL could not be set" +msgstr "TTL не можа да бъде зададен" + +msgid "Unknown TTL operation" +msgstr "Неизвестна операция с TTL" diff --git a/openwrt/luci-app-mu300/po/cs/mu300.po b/openwrt/luci-app-mu300/po/cs/mu300.po index 7e536ec4..bd58ec72 100644 --- a/openwrt/luci-app-mu300/po/cs/mu300.po +++ b/openwrt/luci-app-mu300/po/cs/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminál AT" msgid "Adapter settings" msgstr "Nastavení adaptéru" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Správa zařízení" @@ -1140,6 +1143,45 @@ msgstr "Já: %s" msgid "Delete" msgstr "Smazat" +msgid "Current setting" +msgstr "Aktuální nastavení" + +msgid "Fixed at %d" +msgstr "Pevně %d" + +msgid "Not changed (default)" +msgstr "Nezměněno (výchozí)" + +msgid "Rule in force" +msgstr "Platné pravidlo" + +msgid "Flow offloading" +msgstr "Odlehčení toků (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL mobilních dat" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Každý paket, který odchází přes mobilní data, dostane toto TTL (IPv6: hop limit). Telefon nebo notebook za hotspotem posílá 64 (Windows: 128) a zařízení jej přepošle o jedna menší, podle čehož operátor pozná sdílený provoz." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Na tomto jádře je rychlá cesta firewallu vypnutá, dokud je nastaveno TTL" + +msgid "Set %d" +msgstr "Nastavit %d" + +msgid "Set" +msgstr "Nastavit" + +msgid "Enter a number from 1 to 255" +msgstr "Zadejte číslo od 1 do 255" + +msgid "Turn off" +msgstr "Vypnout" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "S 64 odchází každý paket jako vlastní provoz zařízení" + msgid "Dashboard info failed" msgstr "Informace přehledu selhaly" @@ -1278,6 +1320,12 @@ msgstr "Neplatný jazykový požadavek" msgid "Unknown source" msgstr "Neznámý zdroj" +msgid "The TTL adapter gave no valid reply" +msgstr "Adaptér TTL nevrátil platnou odpověď" + +msgid "Invalid TTL" +msgstr "Neplatné TTL" + msgid "Request too large" msgstr "Požadavek je příliš velký" @@ -1409,3 +1457,12 @@ msgstr "Žádná obsluhující buňka k uzamčení" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Nastavení TTL nelze přečíst" + +msgid "The TTL could not be set" +msgstr "TTL nelze nastavit" + +msgid "Unknown TTL operation" +msgstr "Neznámá operace TTL" diff --git a/openwrt/luci-app-mu300/po/da/mu300.po b/openwrt/luci-app-mu300/po/da/mu300.po index 9a3ff021..61e5400f 100644 --- a/openwrt/luci-app-mu300/po/da/mu300.po +++ b/openwrt/luci-app-mu300/po/da/mu300.po @@ -21,6 +21,9 @@ msgstr "AT-terminal" msgid "Adapter settings" msgstr "Adapterindstillinger" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Enhedsstyring" @@ -1140,6 +1143,45 @@ msgstr "Mig: %s" msgid "Delete" msgstr "Slet" +msgid "Current setting" +msgstr "Aktuel indstilling" + +msgid "Fixed at %d" +msgstr "Fast på %d" + +msgid "Not changed (default)" +msgstr "Ikke ændret (standard)" + +msgid "Rule in force" +msgstr "Aktiv regel" + +msgid "Flow offloading" +msgstr "Flow-offloading" + +msgid "TTL of mobile data" +msgstr "TTL for mobildata" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Hver pakke, der forlader enheden via mobildata, får denne TTL (IPv6: hop limit). En telefon eller bærbar bag hotspottet sender 64 (Windows: 128), og enheden videresender den med én mindre, og sådan kan en operatør kende delt trafik." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "På denne kerne er firewallens hurtige vej slået fra, mens en TTL er sat" + +msgid "Set %d" +msgstr "Sæt %d" + +msgid "Set" +msgstr "Sæt" + +msgid "Enter a number from 1 to 255" +msgstr "Indtast et tal fra 1 til 255" + +msgid "Turn off" +msgstr "Slå fra" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Med 64 forlader hver pakke enheden som dens egen trafik" + msgid "Dashboard info failed" msgstr "Kunne ikke hente oversigtsdata" @@ -1278,6 +1320,12 @@ msgstr "Ugyldig sproganmodning" msgid "Unknown source" msgstr "Ukendt kilde" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL-adapteren gav intet gyldigt svar" + +msgid "Invalid TTL" +msgstr "Ugyldig TTL" + msgid "Request too large" msgstr "Anmodningen er for stor" @@ -1409,3 +1457,12 @@ msgstr "Ingen betjenende celle at låse til" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL-indstillingen kunne ikke læses" + +msgid "The TTL could not be set" +msgstr "TTL kunne ikke sættes" + +msgid "Unknown TTL operation" +msgstr "Ukendt TTL-handling" diff --git a/openwrt/luci-app-mu300/po/de/mu300.po b/openwrt/luci-app-mu300/po/de/mu300.po index 18f2233f..0daf2291 100644 --- a/openwrt/luci-app-mu300/po/de/mu300.po +++ b/openwrt/luci-app-mu300/po/de/mu300.po @@ -21,6 +21,9 @@ msgstr "AT-Terminal" msgid "Adapter settings" msgstr "Adaptereinstellungen" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Geräteverwaltung" @@ -1140,6 +1143,45 @@ msgstr "Ich: %s" msgid "Delete" msgstr "Löschen" +msgid "Current setting" +msgstr "Aktuelle Einstellung" + +msgid "Fixed at %d" +msgstr "Fest auf %d" + +msgid "Not changed (default)" +msgstr "Nicht geändert (Standard)" + +msgid "Rule in force" +msgstr "Aktive Regel" + +msgid "Flow offloading" +msgstr "Flow-Offloading" + +msgid "TTL of mobile data" +msgstr "TTL der mobilen Daten" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Jedes Paket, das über die mobilen Daten hinausgeht, bekommt diese TTL (IPv6: Hop-Limit). Ein Telefon oder Laptop am Hotspot sendet 64 (Windows: 128), und das Gerät leitet es mit eins weniger weiter – daran kann ein Netzbetreiber geteilten Datenverkehr erkennen." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Auf diesem Kernel ist der Schnellpfad der Firewall aus, solange eine TTL gesetzt ist" + +msgid "Set %d" +msgstr "Auf %d setzen" + +msgid "Set" +msgstr "Setzen" + +msgid "Enter a number from 1 to 255" +msgstr "Geben Sie eine Zahl von 1 bis 255 ein" + +msgid "Turn off" +msgstr "Ausschalten" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Mit 64 verlässt jedes Paket das Gerät wie dessen eigener Datenverkehr" + msgid "Dashboard info failed" msgstr "Dashboard-Informationen fehlgeschlagen" @@ -1278,6 +1320,12 @@ msgstr "Ungültige Sprachanfrage" msgid "Unknown source" msgstr "Unbekannte Quelle" +msgid "The TTL adapter gave no valid reply" +msgstr "Der TTL-Adapter gab keine gültige Antwort" + +msgid "Invalid TTL" +msgstr "Ungültige TTL" + msgid "Request too large" msgstr "Anfrage zu groß" @@ -1409,3 +1457,12 @@ msgstr "Keine versorgende Zelle zum Sperren" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Die TTL-Einstellung konnte nicht gelesen werden" + +msgid "The TTL could not be set" +msgstr "Die TTL konnte nicht gesetzt werden" + +msgid "Unknown TTL operation" +msgstr "Unbekannte TTL-Operation" diff --git a/openwrt/luci-app-mu300/po/el/mu300.po b/openwrt/luci-app-mu300/po/el/mu300.po index 2b705181..ba53c447 100644 --- a/openwrt/luci-app-mu300/po/el/mu300.po +++ b/openwrt/luci-app-mu300/po/el/mu300.po @@ -21,6 +21,9 @@ msgstr "Τερματικό AT" msgid "Adapter settings" msgstr "Ρυθμίσεις προσαρμογέα" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Διαχείριση συσκευής" @@ -1140,6 +1143,45 @@ msgstr "Εγώ: %s" msgid "Delete" msgstr "Διαγραφή" +msgid "Current setting" +msgstr "Τρέχουσα ρύθμιση" + +msgid "Fixed at %d" +msgstr "Σταθερό στο %d" + +msgid "Not changed (default)" +msgstr "Χωρίς αλλαγή (προεπιλογή)" + +msgid "Rule in force" +msgstr "Ενεργός κανόνας" + +msgid "Flow offloading" +msgstr "Εκφόρτωση ροών (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL των δεδομένων κινητής" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Κάθε πακέτο που φεύγει μέσω των δεδομένων κινητής παίρνει αυτό το TTL (IPv6: hop limit). Ένα τηλέφωνο ή φορητός πίσω από το hotspot στέλνει 64 (Windows: 128) και η συσκευή το προωθεί με ένα λιγότερο — έτσι ένας πάροχος μπορεί να αναγνωρίσει την κοινόχρηστη κίνηση." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Σε αυτόν τον πυρήνα η γρήγορη διαδρομή του τείχους προστασίας είναι κλειστή όσο έχει οριστεί TTL" + +msgid "Set %d" +msgstr "Ορισμός %d" + +msgid "Set" +msgstr "Ορισμός" + +msgid "Enter a number from 1 to 255" +msgstr "Εισαγάγετε έναν αριθμό από 1 έως 255" + +msgid "Turn off" +msgstr "Απενεργοποίηση" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Με 64 κάθε πακέτο φεύγει όπως η κίνηση της ίδιας της συσκευής" + msgid "Dashboard info failed" msgstr "Οι πληροφορίες του πίνακα απέτυχαν" @@ -1278,6 +1320,12 @@ msgstr "Μη έγκυρο αίτημα γλώσσας" msgid "Unknown source" msgstr "Άγνωστη πηγή" +msgid "The TTL adapter gave no valid reply" +msgstr "Ο προσαρμογέας TTL δεν έδωσε έγκυρη απάντηση" + +msgid "Invalid TTL" +msgstr "Μη έγκυρο TTL" + msgid "Request too large" msgstr "Το αίτημα είναι πολύ μεγάλο" @@ -1409,3 +1457,12 @@ msgstr "Δεν υπάρχει κυψέλη εξυπηρέτησης για κλ msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Δεν ήταν δυνατή η ανάγνωση της ρύθμισης TTL" + +msgid "The TTL could not be set" +msgstr "Δεν ήταν δυνατός ο ορισμός του TTL" + +msgid "Unknown TTL operation" +msgstr "Άγνωστη λειτουργία TTL" diff --git a/openwrt/luci-app-mu300/po/es/mu300.po b/openwrt/luci-app-mu300/po/es/mu300.po index d6684f3e..1d5b2603 100644 --- a/openwrt/luci-app-mu300/po/es/mu300.po +++ b/openwrt/luci-app-mu300/po/es/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminal AT" msgid "Adapter settings" msgstr "Ajustes del adaptador" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Administración del dispositivo" @@ -1140,6 +1143,45 @@ msgstr "Yo: %s" msgid "Delete" msgstr "Eliminar" +msgid "Current setting" +msgstr "Ajuste actual" + +msgid "Fixed at %d" +msgstr "Fijado en %d" + +msgid "Not changed (default)" +msgstr "Sin cambios (predeterminado)" + +msgid "Rule in force" +msgstr "Regla en vigor" + +msgid "Flow offloading" +msgstr "Descarga de flujos (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL de los datos móviles" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Cada paquete que sale por los datos móviles recibe este TTL (IPv6: límite de saltos). Un teléfono o portátil detrás del punto de acceso envía 64 (Windows: 128) y el dispositivo lo reenvía con uno menos, que es como un operador puede distinguir el tráfico compartido." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "En este kernel la vía rápida del cortafuegos está desactivada mientras haya un TTL fijado" + +msgid "Set %d" +msgstr "Fijar %d" + +msgid "Set" +msgstr "Fijar" + +msgid "Enter a number from 1 to 255" +msgstr "Introduzca un número del 1 al 255" + +msgid "Turn off" +msgstr "Desactivar" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Con 64 cada paquete sale como el tráfico propio del dispositivo" + msgid "Dashboard info failed" msgstr "Error en la información del panel" @@ -1278,6 +1320,12 @@ msgstr "Solicitud de idioma no válida" msgid "Unknown source" msgstr "Origen desconocido" +msgid "The TTL adapter gave no valid reply" +msgstr "El adaptador de TTL no dio una respuesta válida" + +msgid "Invalid TTL" +msgstr "TTL no válido" + msgid "Request too large" msgstr "Solicitud demasiado grande" @@ -1409,3 +1457,12 @@ msgstr "No hay celda de servicio que bloquear" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "No se pudo leer el ajuste de TTL" + +msgid "The TTL could not be set" +msgstr "No se pudo fijar el TTL" + +msgid "Unknown TTL operation" +msgstr "Operación de TTL desconocida" diff --git a/openwrt/luci-app-mu300/po/fa/mu300.po b/openwrt/luci-app-mu300/po/fa/mu300.po index 92fdbe67..10912faf 100644 --- a/openwrt/luci-app-mu300/po/fa/mu300.po +++ b/openwrt/luci-app-mu300/po/fa/mu300.po @@ -21,6 +21,9 @@ msgstr "ترمینال AT" msgid "Adapter settings" msgstr "تنظیمات آداپتور" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "مدیریت دستگاه" @@ -1140,6 +1143,45 @@ msgstr "من: %s" msgid "Delete" msgstr "حذف" +msgid "Current setting" +msgstr "تنظیم فعلی" + +msgid "Fixed at %d" +msgstr "ثابت روی %d" + +msgid "Not changed (default)" +msgstr "تغییر نکرده (پیش‌فرض)" + +msgid "Rule in force" +msgstr "قانون فعال" + +msgid "Flow offloading" +msgstr "تخلیه جریان‌ها (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL داده تلفن همراه" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "هر بسته‌ای که از طریق داده تلفن همراه خارج می‌شود این TTL را می‌گیرد (IPv6: hop limit). تلفن یا لپ‌تاپ پشت هات‌اسپات 64 (Windows: 128) می‌فرستد و دستگاه آن را با یکی کمتر ارسال می‌کند؛ اپراتور از همین راه ترافیک اشتراکی را تشخیص می‌دهد." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "در این کرنل تا وقتی TTL تنظیم شده است مسیر سریع دیوار آتش خاموش است" + +msgid "Set %d" +msgstr "تنظیم روی %d" + +msgid "Set" +msgstr "تنظیم" + +msgid "Enter a number from 1 to 255" +msgstr "عددی از 1 تا 255 وارد کنید" + +msgid "Turn off" +msgstr "خاموش کردن" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "با 64 هر بسته مانند ترافیک خود دستگاه خارج می‌شود" + msgid "Dashboard info failed" msgstr "دریافت اطلاعات داشبورد ناموفق بود" @@ -1278,6 +1320,12 @@ msgstr "درخواست زبان نامعتبر" msgid "Unknown source" msgstr "منبع نامشخص" +msgid "The TTL adapter gave no valid reply" +msgstr "آداپتور TTL پاسخ معتبری نداد" + +msgid "Invalid TTL" +msgstr "TTL نامعتبر" + msgid "Request too large" msgstr "درخواست بیش از حد بزرگ است" @@ -1409,3 +1457,12 @@ msgstr "سلول سرویس‌دهنده‌ای برای قفل کردن نیس msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "تنظیم TTL خوانده نشد" + +msgid "The TTL could not be set" +msgstr "TTL تنظیم نشد" + +msgid "Unknown TTL operation" +msgstr "عملیات TTL ناشناخته" diff --git a/openwrt/luci-app-mu300/po/fi/mu300.po b/openwrt/luci-app-mu300/po/fi/mu300.po index fe65ee68..8e128aeb 100644 --- a/openwrt/luci-app-mu300/po/fi/mu300.po +++ b/openwrt/luci-app-mu300/po/fi/mu300.po @@ -21,6 +21,9 @@ msgstr "AT-pääte" msgid "Adapter settings" msgstr "Sovittimen asetukset" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Laitehallinta" @@ -1140,6 +1143,45 @@ msgstr "Minä: %s" msgid "Delete" msgstr "Poista" +msgid "Current setting" +msgstr "Nykyinen asetus" + +msgid "Fixed at %d" +msgstr "Kiinteä %d" + +msgid "Not changed (default)" +msgstr "Ei muutettu (oletus)" + +msgid "Rule in force" +msgstr "Voimassa oleva sääntö" + +msgid "Flow offloading" +msgstr "Vuon purku (flow offloading)" + +msgid "TTL of mobile data" +msgstr "Mobiilidatan TTL" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Jokainen mobiilidatan kautta lähtevä paketti saa tämän TTL:n (IPv6: hop limit). Tukiaseman takana oleva puhelin tai kannettava lähettää 64 (Windows: 128), ja laite välittää sen yhtä pienemmällä arvolla, mistä operaattori voi tunnistaa jaetun liikenteen." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Tässä ytimessä palomuurin pikapolku on pois päältä, kun TTL on asetettu" + +msgid "Set %d" +msgstr "Aseta %d" + +msgid "Set" +msgstr "Aseta" + +msgid "Enter a number from 1 to 255" +msgstr "Anna luku väliltä 1–255" + +msgid "Turn off" +msgstr "Poista käytöstä" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Arvolla 64 jokainen paketti lähtee kuin laitteen oma liikenne" + msgid "Dashboard info failed" msgstr "Yleiskatsauksen tietojen haku epäonnistui" @@ -1278,6 +1320,12 @@ msgstr "Virheellinen kielipyyntö" msgid "Unknown source" msgstr "Tuntematon lähde" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL-sovitin ei antanut kelvollista vastausta" + +msgid "Invalid TTL" +msgstr "Virheellinen TTL" + msgid "Request too large" msgstr "Pyyntö on liian suuri" @@ -1409,3 +1457,12 @@ msgstr "Ei palvelevaa solua lukittavaksi" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL-asetusta ei voitu lukea" + +msgid "The TTL could not be set" +msgstr "TTL:ää ei voitu asettaa" + +msgid "Unknown TTL operation" +msgstr "Tuntematon TTL-toiminto" diff --git a/openwrt/luci-app-mu300/po/fr/mu300.po b/openwrt/luci-app-mu300/po/fr/mu300.po index e48197aa..27512fcb 100644 --- a/openwrt/luci-app-mu300/po/fr/mu300.po +++ b/openwrt/luci-app-mu300/po/fr/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminal AT" msgid "Adapter settings" msgstr "Paramètres de l'adaptateur" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Gestion de l'appareil" @@ -1140,6 +1143,45 @@ msgstr "Moi : %s" msgid "Delete" msgstr "Supprimer" +msgid "Current setting" +msgstr "Réglage actuel" + +msgid "Fixed at %d" +msgstr "Fixé à %d" + +msgid "Not changed (default)" +msgstr "Inchangé (par défaut)" + +msgid "Rule in force" +msgstr "Règle en vigueur" + +msgid "Flow offloading" +msgstr "Délestage des flux (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL des données mobiles" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Chaque paquet qui sort par les données mobiles reçoit ce TTL (IPv6 : hop limit). Un téléphone ou un portable derrière le point d'accès envoie 64 (Windows : 128) et l'appareil le transmet avec un de moins, ce qui permet à un opérateur de reconnaître le trafic partagé." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Sur ce noyau, le chemin rapide du pare-feu est désactivé tant qu'un TTL est défini" + +msgid "Set %d" +msgstr "Mettre %d" + +msgid "Set" +msgstr "Définir" + +msgid "Enter a number from 1 to 255" +msgstr "Saisissez un nombre de 1 à 255" + +msgid "Turn off" +msgstr "Désactiver" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Avec 64, chaque paquet sort comme le trafic propre de l'appareil" + msgid "Dashboard info failed" msgstr "Échec des informations du tableau de bord" @@ -1278,6 +1320,12 @@ msgstr "Requête de langue invalide" msgid "Unknown source" msgstr "Source inconnue" +msgid "The TTL adapter gave no valid reply" +msgstr "L'adaptateur TTL n'a pas donné de réponse valide" + +msgid "Invalid TTL" +msgstr "TTL invalide" + msgid "Request too large" msgstr "Requête trop volumineuse" @@ -1409,3 +1457,12 @@ msgstr "Aucune cellule de service à verrouiller" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Le réglage du TTL n'a pas pu être lu" + +msgid "The TTL could not be set" +msgstr "Le TTL n'a pas pu être défini" + +msgid "Unknown TTL operation" +msgstr "Opération TTL inconnue" diff --git a/openwrt/luci-app-mu300/po/he/mu300.po b/openwrt/luci-app-mu300/po/he/mu300.po index b2c4c9d3..e174b27c 100644 --- a/openwrt/luci-app-mu300/po/he/mu300.po +++ b/openwrt/luci-app-mu300/po/he/mu300.po @@ -21,6 +21,9 @@ msgstr "מסוף AT" msgid "Adapter settings" msgstr "הגדרות מתאם" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "ניהול התקן" @@ -1140,6 +1143,45 @@ msgstr "אני: %s" msgid "Delete" msgstr "מחיקה" +msgid "Current setting" +msgstr "הגדרה נוכחית" + +msgid "Fixed at %d" +msgstr "קבוע על %d" + +msgid "Not changed (default)" +msgstr "לא שונה (ברירת מחדל)" + +msgid "Rule in force" +msgstr "כלל בתוקף" + +msgid "Flow offloading" +msgstr "הקלת זרימות (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL של נתונים סלולריים" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "כל חבילה שיוצאת דרך הנתונים הסלולריים מקבלת TTL זה (IPv6: hop limit). טלפון או מחשב נייד מאחורי הנקודה החמה שולחים 64 (Windows: 128) והמכשיר מעביר אותה עם אחד פחות, וכך מפעיל יכול לזהות תעבורה משותפת." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "בליבה זו הנתיב המהיר של חומת האש כבוי כל עוד מוגדר TTL" + +msgid "Set %d" +msgstr "קבע %d" + +msgid "Set" +msgstr "קבע" + +msgid "Enter a number from 1 to 255" +msgstr "הזן מספר בין 1 ל-255" + +msgid "Turn off" +msgstr "כבה" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "עם 64 כל חבילה יוצאת כמו התעבורה של המכשיר עצמו" + msgid "Dashboard info failed" msgstr "קבלת נתוני לוח המצב נכשלה" @@ -1278,6 +1320,12 @@ msgstr "בקשת שפה לא חוקית" msgid "Unknown source" msgstr "מקור לא ידוע" +msgid "The TTL adapter gave no valid reply" +msgstr "מתאם ה-TTL לא החזיר תשובה תקינה" + +msgid "Invalid TTL" +msgstr "TTL לא תקין" + msgid "Request too large" msgstr "הבקשה גדולה מדי" @@ -1409,3 +1457,12 @@ msgstr "אין תא משרת לנעילה" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "לא ניתן לקרוא את הגדרת ה-TTL" + +msgid "The TTL could not be set" +msgstr "לא ניתן להגדיר את ה-TTL" + +msgid "Unknown TTL operation" +msgstr "פעולת TTL לא ידועה" diff --git a/openwrt/luci-app-mu300/po/hi/mu300.po b/openwrt/luci-app-mu300/po/hi/mu300.po index e0c16b0f..c7d6f23b 100644 --- a/openwrt/luci-app-mu300/po/hi/mu300.po +++ b/openwrt/luci-app-mu300/po/hi/mu300.po @@ -21,6 +21,9 @@ msgstr "AT टर्मिनल" msgid "Adapter settings" msgstr "एडेप्टर सेटिंग्स" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "डिवाइस प्रबंधन" @@ -1140,6 +1143,45 @@ msgstr "मैं: %s" msgid "Delete" msgstr "हटाएँ" +msgid "Current setting" +msgstr "वर्तमान सेटिंग" + +msgid "Fixed at %d" +msgstr "%d पर स्थिर" + +msgid "Not changed (default)" +msgstr "नहीं बदला (डिफ़ॉल्ट)" + +msgid "Rule in force" +msgstr "लागू नियम" + +msgid "Flow offloading" +msgstr "फ़्लो ऑफ़लोडिंग" + +msgid "TTL of mobile data" +msgstr "मोबाइल डेटा का TTL" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "मोबाइल डेटा से बाहर जाने वाले हर पैकेट को यह TTL (IPv6: hop limit) मिलता है। हॉटस्पॉट से जुड़ा फ़ोन या लैपटॉप 64 (Windows: 128) भेजता है और डिवाइस उसे एक कम करके आगे भेजता है, इसी से ऑपरेटर साझा ट्रैफ़िक पहचान सकता है।" + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "इस कर्नेल पर TTL सेट रहने तक फ़ायरवॉल का तेज़ पथ बंद रहता है" + +msgid "Set %d" +msgstr "%d सेट करें" + +msgid "Set" +msgstr "सेट करें" + +msgid "Enter a number from 1 to 255" +msgstr "1 से 255 तक की संख्या दर्ज करें" + +msgid "Turn off" +msgstr "बंद करें" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64 से हर पैकेट डिवाइस के अपने ट्रैफ़िक की तरह बाहर जाता है" + msgid "Dashboard info failed" msgstr "डैशबोर्ड जानकारी प्राप्त नहीं हो सकी" @@ -1278,6 +1320,12 @@ msgstr "अमान्य भाषा अनुरोध" msgid "Unknown source" msgstr "अज्ञात स्रोत" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL एडेप्टर ने कोई मान्य उत्तर नहीं दिया" + +msgid "Invalid TTL" +msgstr "अमान्य TTL" + msgid "Request too large" msgstr "अनुरोध बहुत बड़ा है" @@ -1409,3 +1457,12 @@ msgstr "लॉक करने के लिए कोई सर्विंग msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL सेटिंग पढ़ी नहीं जा सकी" + +msgid "The TTL could not be set" +msgstr "TTL सेट नहीं किया जा सका" + +msgid "Unknown TTL operation" +msgstr "अज्ञात TTL कार्रवाई" diff --git a/openwrt/luci-app-mu300/po/hu/mu300.po b/openwrt/luci-app-mu300/po/hu/mu300.po index 2dd419de..8f171525 100644 --- a/openwrt/luci-app-mu300/po/hu/mu300.po +++ b/openwrt/luci-app-mu300/po/hu/mu300.po @@ -21,6 +21,9 @@ msgstr "AT-terminál" msgid "Adapter settings" msgstr "Adapterbeállítások" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Eszközkezelés" @@ -1140,6 +1143,45 @@ msgstr "Én: %s" msgid "Delete" msgstr "Törlés" +msgid "Current setting" +msgstr "Jelenlegi beállítás" + +msgid "Fixed at %d" +msgstr "Rögzítve: %d" + +msgid "Not changed (default)" +msgstr "Nincs módosítva (alapértelmezett)" + +msgid "Rule in force" +msgstr "Érvényes szabály" + +msgid "Flow offloading" +msgstr "Folyamtehermentesítés (flow offloading)" + +msgid "TTL of mobile data" +msgstr "A mobiladat TTL-je" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Minden csomag, amely a mobiladaton át távozik, ezt a TTL-t kapja (IPv6: hop limit). A hotspot mögötti telefon vagy laptop 64-et küld (Windows: 128), az eszköz pedig eggyel kevesebbel továbbítja – erről ismerheti fel a szolgáltató a megosztott forgalmat." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Ezen a kernelen a tűzfal gyorsútja ki van kapcsolva, amíg TTL van beállítva" + +msgid "Set %d" +msgstr "Legyen %d" + +msgid "Set" +msgstr "Beállítás" + +msgid "Enter a number from 1 to 255" +msgstr "Adjon meg egy számot 1 és 255 között" + +msgid "Turn off" +msgstr "Kikapcsolás" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64 esetén minden csomag úgy távozik, mint az eszköz saját forgalma" + msgid "Dashboard info failed" msgstr "Az irányítópult adatai nem érhetők el" @@ -1278,6 +1320,12 @@ msgstr "Érvénytelen nyelvi kérés" msgid "Unknown source" msgstr "Ismeretlen forrás" +msgid "The TTL adapter gave no valid reply" +msgstr "A TTL-adapter nem adott érvényes választ" + +msgid "Invalid TTL" +msgstr "Érvénytelen TTL" + msgid "Request too large" msgstr "A kérés túl nagy" @@ -1409,3 +1457,12 @@ msgstr "Nincs kiszolgáló cella a zároláshoz" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "A TTL-beállítás nem olvasható" + +msgid "The TTL could not be set" +msgstr "A TTL nem állítható be" + +msgid "Unknown TTL operation" +msgstr "Ismeretlen TTL-művelet" diff --git a/openwrt/luci-app-mu300/po/id/mu300.po b/openwrt/luci-app-mu300/po/id/mu300.po index 1055dbe7..3d753d7c 100644 --- a/openwrt/luci-app-mu300/po/id/mu300.po +++ b/openwrt/luci-app-mu300/po/id/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminal AT" msgid "Adapter settings" msgstr "Pengaturan adaptor" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Manajemen perangkat" @@ -1140,6 +1143,45 @@ msgstr "Saya: %s" msgid "Delete" msgstr "Hapus" +msgid "Current setting" +msgstr "Pengaturan saat ini" + +msgid "Fixed at %d" +msgstr "Tetap pada %d" + +msgid "Not changed (default)" +msgstr "Tidak diubah (bawaan)" + +msgid "Rule in force" +msgstr "Aturan yang berlaku" + +msgid "Flow offloading" +msgstr "Flow offloading" + +msgid "TTL of mobile data" +msgstr "TTL data seluler" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Setiap paket yang keluar melalui data seluler mendapat TTL ini (IPv6: hop limit). Ponsel atau laptop di balik hotspot mengirim 64 (Windows: 128) dan perangkat meneruskannya dengan nilai kurang satu, dari situlah operator dapat mengenali lalu lintas yang dibagikan." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Pada kernel ini jalur cepat firewall nonaktif selama TTL diatur" + +msgid "Set %d" +msgstr "Atur %d" + +msgid "Set" +msgstr "Atur" + +msgid "Enter a number from 1 to 255" +msgstr "Masukkan angka dari 1 sampai 255" + +msgid "Turn off" +msgstr "Matikan" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Dengan 64 setiap paket keluar seperti lalu lintas perangkat itu sendiri" + msgid "Dashboard info failed" msgstr "Gagal memuat info dasbor" @@ -1278,6 +1320,12 @@ msgstr "Permintaan bahasa tidak valid" msgid "Unknown source" msgstr "Sumber tidak diketahui" +msgid "The TTL adapter gave no valid reply" +msgstr "Adaptor TTL tidak memberi balasan yang valid" + +msgid "Invalid TTL" +msgstr "TTL tidak valid" + msgid "Request too large" msgstr "Permintaan terlalu besar" @@ -1409,3 +1457,12 @@ msgstr "Tidak ada sel layanan untuk dikunci" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Pengaturan TTL tidak dapat dibaca" + +msgid "The TTL could not be set" +msgstr "TTL tidak dapat diatur" + +msgid "Unknown TTL operation" +msgstr "Operasi TTL tidak dikenal" diff --git a/openwrt/luci-app-mu300/po/it/mu300.po b/openwrt/luci-app-mu300/po/it/mu300.po index a0a3c80d..d95545bb 100644 --- a/openwrt/luci-app-mu300/po/it/mu300.po +++ b/openwrt/luci-app-mu300/po/it/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminale AT" msgid "Adapter settings" msgstr "Impostazioni adattatore" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Gestione dispositivo" @@ -1140,6 +1143,45 @@ msgstr "Io: %s" msgid "Delete" msgstr "Elimina" +msgid "Current setting" +msgstr "Impostazione attuale" + +msgid "Fixed at %d" +msgstr "Fisso a %d" + +msgid "Not changed (default)" +msgstr "Non modificato (predefinito)" + +msgid "Rule in force" +msgstr "Regola in vigore" + +msgid "Flow offloading" +msgstr "Offload dei flussi (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL dei dati mobili" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Ogni pacchetto che esce tramite i dati mobili riceve questo TTL (IPv6: hop limit). Un telefono o un portatile dietro l'hotspot invia 64 (Windows: 128) e il dispositivo lo inoltra con uno in meno: così un operatore può riconoscere il traffico condiviso." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Su questo kernel il percorso rapido del firewall è disattivato finché è impostato un TTL" + +msgid "Set %d" +msgstr "Imposta %d" + +msgid "Set" +msgstr "Imposta" + +msgid "Enter a number from 1 to 255" +msgstr "Inserisci un numero da 1 a 255" + +msgid "Turn off" +msgstr "Disattiva" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Con 64 ogni pacchetto esce come il traffico del dispositivo stesso" + msgid "Dashboard info failed" msgstr "Informazioni del pannello non riuscite" @@ -1278,6 +1320,12 @@ msgstr "Richiesta di lingua non valida" msgid "Unknown source" msgstr "Origine sconosciuta" +msgid "The TTL adapter gave no valid reply" +msgstr "L'adattatore TTL non ha dato una risposta valida" + +msgid "Invalid TTL" +msgstr "TTL non valido" + msgid "Request too large" msgstr "Richiesta troppo grande" @@ -1409,3 +1457,12 @@ msgstr "Nessuna cella di servizio da bloccare" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Impossibile leggere l'impostazione del TTL" + +msgid "The TTL could not be set" +msgstr "Impossibile impostare il TTL" + +msgid "Unknown TTL operation" +msgstr "Operazione TTL sconosciuta" diff --git a/openwrt/luci-app-mu300/po/ja/mu300.po b/openwrt/luci-app-mu300/po/ja/mu300.po index ea473475..6f3b061d 100644 --- a/openwrt/luci-app-mu300/po/ja/mu300.po +++ b/openwrt/luci-app-mu300/po/ja/mu300.po @@ -21,6 +21,9 @@ msgstr "AT ターミナル" msgid "Adapter settings" msgstr "アダプタ設定" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "デバイス管理" @@ -1140,6 +1143,45 @@ msgstr "自分: %s" msgid "Delete" msgstr "削除" +msgid "Current setting" +msgstr "現在の設定" + +msgid "Fixed at %d" +msgstr "%d に固定" + +msgid "Not changed (default)" +msgstr "変更なし(既定)" + +msgid "Rule in force" +msgstr "適用中のルール" + +msgid "Flow offloading" +msgstr "フローオフロード" + +msgid "TTL of mobile data" +msgstr "モバイルデータの TTL" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "モバイルデータから出ていくすべてのパケットにこの TTL(IPv6: ホップ制限)が付きます。ホットスポットにつないだスマートフォンやノート PC は 64(Windows: 128)で送信し、デバイスは 1 減らして転送するため、通信事業者はそこから共有トラフィックを見分けられます。" + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "このカーネルでは、TTL を設定している間はファイアウォールの高速経路がオフになります" + +msgid "Set %d" +msgstr "%d に設定" + +msgid "Set" +msgstr "設定" + +msgid "Enter a number from 1 to 255" +msgstr "1 から 255 までの数値を入力してください" + +msgid "Turn off" +msgstr "オフにする" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64 にすると、すべてのパケットがデバイス自身の通信と同じように送出されます" + msgid "Dashboard info failed" msgstr "ダッシュボード情報の取得に失敗しました" @@ -1278,6 +1320,12 @@ msgstr "無効な言語リクエスト" msgid "Unknown source" msgstr "不明なソース" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL アダプターから有効な応答がありませんでした" + +msgid "Invalid TTL" +msgstr "無効な TTL" + msgid "Request too large" msgstr "リクエストが大きすぎます" @@ -1409,3 +1457,12 @@ msgstr "ロックできるサービングセルがありません" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL 設定を読み取れませんでした" + +msgid "The TTL could not be set" +msgstr "TTL を設定できませんでした" + +msgid "Unknown TTL operation" +msgstr "不明な TTL 操作" diff --git a/openwrt/luci-app-mu300/po/kk/mu300.po b/openwrt/luci-app-mu300/po/kk/mu300.po index da62b321..ba029735 100644 --- a/openwrt/luci-app-mu300/po/kk/mu300.po +++ b/openwrt/luci-app-mu300/po/kk/mu300.po @@ -21,6 +21,9 @@ msgstr "AT терминалы" msgid "Adapter settings" msgstr "Адаптер параметрлері" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Құрылғыны басқару" @@ -1140,6 +1143,45 @@ msgstr "Мен: %s" msgid "Delete" msgstr "Жою" +msgid "Current setting" +msgstr "Ағымдағы баптау" + +msgid "Fixed at %d" +msgstr "%d мәнінде бекітілген" + +msgid "Not changed (default)" +msgstr "Өзгертілмеген (әдепкі)" + +msgid "Rule in force" +msgstr "Қолданыстағы ереже" + +msgid "Flow offloading" +msgstr "Ағындарды жеңілдету (flow offloading)" + +msgid "TTL of mobile data" +msgstr "Мобильді деректердің TTL мәні" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Мобильді деректер арқылы шығатын әр пакет осы TTL мәнін алады (IPv6: hop limit). Хотспотқа қосылған телефон не ноутбук 64 (Windows: 128) жібереді, ал құрылғы оны бірге кем етіп жібереді — оператор бөлісілген трафикті осыдан танып алады." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Бұл ядрода TTL орнатылып тұрғанда брандмауэрдің жылдам жолы өшірулі" + +msgid "Set %d" +msgstr "%d орнату" + +msgid "Set" +msgstr "Орнату" + +msgid "Enter a number from 1 to 255" +msgstr "1 мен 255 аралығындағы санды енгізіңіз" + +msgid "Turn off" +msgstr "Өшіру" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64 мәнінде әр пакет құрылғының өз трафигі сияқты шығады" + msgid "Dashboard info failed" msgstr "Тақта деректерін алу сәтсіз" @@ -1278,6 +1320,12 @@ msgstr "Жарамсыз тіл сұрауы" msgid "Unknown source" msgstr "Белгісіз дереккөз" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL адаптері жарамды жауап бермеді" + +msgid "Invalid TTL" +msgstr "Жарамсыз TTL" + msgid "Request too large" msgstr "Сұрау тым үлкен" @@ -1409,3 +1457,12 @@ msgstr "Бекітетін қызмет көрсететін ұяшық жоқ" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL баптауын оқу мүмкін болмады" + +msgid "The TTL could not be set" +msgstr "TTL орнату мүмкін болмады" + +msgid "Unknown TTL operation" +msgstr "Белгісіз TTL әрекеті" diff --git a/openwrt/luci-app-mu300/po/ko/mu300.po b/openwrt/luci-app-mu300/po/ko/mu300.po index 19854725..d6ca0b4b 100644 --- a/openwrt/luci-app-mu300/po/ko/mu300.po +++ b/openwrt/luci-app-mu300/po/ko/mu300.po @@ -21,6 +21,9 @@ msgstr "AT 터미널" msgid "Adapter settings" msgstr "어댑터 설정" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "장치 관리" @@ -1140,6 +1143,45 @@ msgstr "나: %s" msgid "Delete" msgstr "삭제" +msgid "Current setting" +msgstr "현재 설정" + +msgid "Fixed at %d" +msgstr "%d(으)로 고정" + +msgid "Not changed (default)" +msgstr "변경 안 함(기본값)" + +msgid "Rule in force" +msgstr "적용 중인 규칙" + +msgid "Flow offloading" +msgstr "플로 오프로딩" + +msgid "TTL of mobile data" +msgstr "모바일 데이터의 TTL" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "모바일 데이터로 나가는 모든 패킷이 이 TTL(IPv6: 홉 제한)을 갖습니다. 핫스폿에 연결된 휴대폰이나 노트북은 64(Windows: 128)를 보내고 기기는 하나 줄여 전달하므로, 통신사는 이를 보고 공유 트래픽을 구별할 수 있습니다." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "이 커널에서는 TTL이 설정된 동안 방화벽 빠른 경로가 꺼집니다" + +msgid "Set %d" +msgstr "%d(으)로 설정" + +msgid "Set" +msgstr "설정" + +msgid "Enter a number from 1 to 255" +msgstr "1부터 255까지의 숫자를 입력하세요" + +msgid "Turn off" +msgstr "끄기" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64로 하면 모든 패킷이 기기 자체의 트래픽처럼 나갑니다" + msgid "Dashboard info failed" msgstr "대시보드 정보를 가져오지 못함" @@ -1278,6 +1320,12 @@ msgstr "잘못된 언어 요청" msgid "Unknown source" msgstr "알 수 없는 소스" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL 어댑터가 올바른 응답을 주지 않았습니다" + +msgid "Invalid TTL" +msgstr "잘못된 TTL" + msgid "Request too large" msgstr "요청이 너무 큽니다" @@ -1409,3 +1457,12 @@ msgstr "잠글 서빙 셀이 없습니다" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL 설정을 읽을 수 없습니다" + +msgid "The TTL could not be set" +msgstr "TTL을 설정할 수 없습니다" + +msgid "Unknown TTL operation" +msgstr "알 수 없는 TTL 작업" diff --git a/openwrt/luci-app-mu300/po/nl/mu300.po b/openwrt/luci-app-mu300/po/nl/mu300.po index 7255470d..a8b8daf0 100644 --- a/openwrt/luci-app-mu300/po/nl/mu300.po +++ b/openwrt/luci-app-mu300/po/nl/mu300.po @@ -21,6 +21,9 @@ msgstr "AT-terminal" msgid "Adapter settings" msgstr "Adapterinstellingen" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Apparaatbeheer" @@ -1140,6 +1143,45 @@ msgstr "Ik: %s" msgid "Delete" msgstr "Verwijderen" +msgid "Current setting" +msgstr "Huidige instelling" + +msgid "Fixed at %d" +msgstr "Vast op %d" + +msgid "Not changed (default)" +msgstr "Niet gewijzigd (standaard)" + +msgid "Rule in force" +msgstr "Actieve regel" + +msgid "Flow offloading" +msgstr "Flow-offloading" + +msgid "TTL of mobile data" +msgstr "TTL van mobiele data" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Elk pakket dat via mobiele data vertrekt, krijgt deze TTL (IPv6: hop limit). Een telefoon of laptop achter de hotspot verstuurt 64 (Windows: 128) en het apparaat stuurt het door met één minder; zo kan een provider gedeeld verkeer herkennen." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Op deze kernel staat het snelle pad van de firewall uit zolang er een TTL is ingesteld" + +msgid "Set %d" +msgstr "%d instellen" + +msgid "Set" +msgstr "Instellen" + +msgid "Enter a number from 1 to 255" +msgstr "Voer een getal van 1 tot 255 in" + +msgid "Turn off" +msgstr "Uitschakelen" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Met 64 vertrekt elk pakket zoals het eigen verkeer van het apparaat" + msgid "Dashboard info failed" msgstr "Dashboardinformatie mislukt" @@ -1278,6 +1320,12 @@ msgstr "Ongeldig taalverzoek" msgid "Unknown source" msgstr "Onbekende bron" +msgid "The TTL adapter gave no valid reply" +msgstr "De TTL-adapter gaf geen geldig antwoord" + +msgid "Invalid TTL" +msgstr "Ongeldige TTL" + msgid "Request too large" msgstr "Verzoek te groot" @@ -1409,3 +1457,12 @@ msgstr "Geen serving cell om op te vergrendelen" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "De TTL-instelling kon niet worden gelezen" + +msgid "The TTL could not be set" +msgstr "De TTL kon niet worden ingesteld" + +msgid "Unknown TTL operation" +msgstr "Onbekende TTL-bewerking" diff --git a/openwrt/luci-app-mu300/po/pl/mu300.po b/openwrt/luci-app-mu300/po/pl/mu300.po index 21082a14..3c24ad83 100644 --- a/openwrt/luci-app-mu300/po/pl/mu300.po +++ b/openwrt/luci-app-mu300/po/pl/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminal AT" msgid "Adapter settings" msgstr "Ustawienia adaptera" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Zarządzanie urządzeniem" @@ -1140,6 +1143,45 @@ msgstr "Ja: %s" msgid "Delete" msgstr "Usuń" +msgid "Current setting" +msgstr "Bieżące ustawienie" + +msgid "Fixed at %d" +msgstr "Stała wartość %d" + +msgid "Not changed (default)" +msgstr "Bez zmian (domyślnie)" + +msgid "Rule in force" +msgstr "Obowiązująca reguła" + +msgid "Flow offloading" +msgstr "Odciążanie przepływów (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL danych mobilnych" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Każdy pakiet wychodzący przez dane mobilne otrzymuje ten TTL (IPv6: hop limit). Telefon lub laptop za hotspotem wysyła 64 (Windows: 128), a urządzenie przekazuje go z wartością o jeden mniejszą – po tym operator może rozpoznać udostępniany ruch." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Na tym jądrze szybka ścieżka zapory jest wyłączona, dopóki ustawiony jest TTL" + +msgid "Set %d" +msgstr "Ustaw %d" + +msgid "Set" +msgstr "Ustaw" + +msgid "Enter a number from 1 to 255" +msgstr "Wpisz liczbę od 1 do 255" + +msgid "Turn off" +msgstr "Wyłącz" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Przy 64 każdy pakiet wychodzi jak własny ruch urządzenia" + msgid "Dashboard info failed" msgstr "Błąd informacji panelu" @@ -1278,6 +1320,12 @@ msgstr "Nieprawidłowe żądanie językowe" msgid "Unknown source" msgstr "Nieznane źródło" +msgid "The TTL adapter gave no valid reply" +msgstr "Adapter TTL nie zwrócił poprawnej odpowiedzi" + +msgid "Invalid TTL" +msgstr "Nieprawidłowy TTL" + msgid "Request too large" msgstr "Żądanie jest za duże" @@ -1409,3 +1457,12 @@ msgstr "Brak komórki obsługującej do zablokowania" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Nie udało się odczytać ustawienia TTL" + +msgid "The TTL could not be set" +msgstr "Nie udało się ustawić TTL" + +msgid "Unknown TTL operation" +msgstr "Nieznana operacja TTL" diff --git a/openwrt/luci-app-mu300/po/pt_BR/mu300.po b/openwrt/luci-app-mu300/po/pt_BR/mu300.po index c959d9c1..2d175ae2 100644 --- a/openwrt/luci-app-mu300/po/pt_BR/mu300.po +++ b/openwrt/luci-app-mu300/po/pt_BR/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminal AT" msgid "Adapter settings" msgstr "Configurações do adaptador" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Gerenciamento do dispositivo" @@ -1140,6 +1143,45 @@ msgstr "Eu: %s" msgid "Delete" msgstr "Excluir" +msgid "Current setting" +msgstr "Configuração atual" + +msgid "Fixed at %d" +msgstr "Fixo em %d" + +msgid "Not changed (default)" +msgstr "Não alterado (padrão)" + +msgid "Rule in force" +msgstr "Regra em vigor" + +msgid "Flow offloading" +msgstr "Descarregamento de fluxos (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL dos dados móveis" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Cada pacote que sai pelos dados móveis recebe este TTL (IPv6: limite de saltos). Um celular ou notebook atrás do hotspot envia 64 (Windows: 128) e o dispositivo o encaminha com um a menos, e é assim que uma operadora consegue distinguir o tráfego compartilhado." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Neste kernel o caminho rápido do firewall fica desligado enquanto um TTL estiver definido" + +msgid "Set %d" +msgstr "Definir %d" + +msgid "Set" +msgstr "Definir" + +msgid "Enter a number from 1 to 255" +msgstr "Digite um número de 1 a 255" + +msgid "Turn off" +msgstr "Desligar" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Com 64 cada pacote sai como o tráfego do próprio dispositivo" + msgid "Dashboard info failed" msgstr "Falha nas informações do painel" @@ -1278,6 +1320,12 @@ msgstr "Solicitação de idioma inválida" msgid "Unknown source" msgstr "Origem desconhecida" +msgid "The TTL adapter gave no valid reply" +msgstr "O adaptador de TTL não deu uma resposta válida" + +msgid "Invalid TTL" +msgstr "TTL inválido" + msgid "Request too large" msgstr "Solicitação grande demais" @@ -1409,3 +1457,12 @@ msgstr "Sem célula servidora para bloquear" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Não foi possível ler a configuração de TTL" + +msgid "The TTL could not be set" +msgstr "Não foi possível definir o TTL" + +msgid "Unknown TTL operation" +msgstr "Operação de TTL desconhecida" diff --git a/openwrt/luci-app-mu300/po/ro/mu300.po b/openwrt/luci-app-mu300/po/ro/mu300.po index f389b6e6..8951f33a 100644 --- a/openwrt/luci-app-mu300/po/ro/mu300.po +++ b/openwrt/luci-app-mu300/po/ro/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminal AT" msgid "Adapter settings" msgstr "Setări adaptor" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Gestionare dispozitiv" @@ -1140,6 +1143,45 @@ msgstr "Eu: %s" msgid "Delete" msgstr "Ștergere" +msgid "Current setting" +msgstr "Setarea curentă" + +msgid "Fixed at %d" +msgstr "Fixat la %d" + +msgid "Not changed (default)" +msgstr "Neschimbat (implicit)" + +msgid "Rule in force" +msgstr "Regula în vigoare" + +msgid "Flow offloading" +msgstr "Descărcarea fluxurilor (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL pentru datele mobile" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Fiecare pachet care pleacă prin datele mobile primește acest TTL (IPv6: hop limit). Un telefon sau laptop din spatele hotspotului trimite 64 (Windows: 128), iar dispozitivul îl redirecționează cu unu mai puțin, după care un operator poate recunoaște traficul partajat." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Pe acest kernel calea rapidă a firewallului este oprită cât timp este setat un TTL" + +msgid "Set %d" +msgstr "Setează %d" + +msgid "Set" +msgstr "Setează" + +msgid "Enter a number from 1 to 255" +msgstr "Introduceți un număr de la 1 la 255" + +msgid "Turn off" +msgstr "Dezactivează" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Cu 64 fiecare pachet pleacă la fel ca traficul propriu al dispozitivului" + msgid "Dashboard info failed" msgstr "Informațiile panoului au eșuat" @@ -1278,6 +1320,12 @@ msgstr "Cerere de limbă invalidă" msgid "Unknown source" msgstr "Sursă necunoscută" +msgid "The TTL adapter gave no valid reply" +msgstr "Adaptorul TTL nu a dat un răspuns valid" + +msgid "Invalid TTL" +msgstr "TTL nevalid" + msgid "Request too large" msgstr "Cerere prea mare" @@ -1409,3 +1457,12 @@ msgstr "Nicio celulă de servire pe care să se blocheze" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Setarea TTL nu a putut fi citită" + +msgid "The TTL could not be set" +msgstr "TTL-ul nu a putut fi setat" + +msgid "Unknown TTL operation" +msgstr "Operație TTL necunoscută" diff --git a/openwrt/luci-app-mu300/po/ru/mu300.po b/openwrt/luci-app-mu300/po/ru/mu300.po index d278c1ff..8db65515 100644 --- a/openwrt/luci-app-mu300/po/ru/mu300.po +++ b/openwrt/luci-app-mu300/po/ru/mu300.po @@ -21,6 +21,9 @@ msgstr "AT-терминал" msgid "Adapter settings" msgstr "Настройки адаптера" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Управление устройством" @@ -1140,6 +1143,45 @@ msgstr "Я: %s" msgid "Delete" msgstr "Удалить" +msgid "Current setting" +msgstr "Текущая настройка" + +msgid "Fixed at %d" +msgstr "Фиксирован на %d" + +msgid "Not changed (default)" +msgstr "Не изменён (по умолчанию)" + +msgid "Rule in force" +msgstr "Действующее правило" + +msgid "Flow offloading" +msgstr "Разгрузка потоков (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL мобильных данных" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Каждый пакет, уходящий через мобильные данные, получает этот TTL (IPv6: hop limit). Телефон или ноутбук за точкой доступа отправляет 64 (Windows: 128), а устройство пересылает его с уменьшением на единицу — по этому оператор может распознать раздаваемый трафик." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "На этом ядре быстрый путь межсетевого экрана выключен, пока задан TTL" + +msgid "Set %d" +msgstr "Задать %d" + +msgid "Set" +msgstr "Задать" + +msgid "Enter a number from 1 to 255" +msgstr "Введите число от 1 до 255" + +msgid "Turn off" +msgstr "Выключить" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "С 64 каждый пакет уходит как собственный трафик устройства" + msgid "Dashboard info failed" msgstr "Ошибка получения данных панели" @@ -1278,6 +1320,12 @@ msgstr "Недопустимый языковой запрос" msgid "Unknown source" msgstr "Неизвестный источник" +msgid "The TTL adapter gave no valid reply" +msgstr "Адаптер TTL не дал корректного ответа" + +msgid "Invalid TTL" +msgstr "Недопустимый TTL" + msgid "Request too large" msgstr "Слишком большой запрос" @@ -1409,3 +1457,12 @@ msgstr "Нет обслуживающей соты для фиксации" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Не удалось прочитать настройку TTL" + +msgid "The TTL could not be set" +msgstr "Не удалось задать TTL" + +msgid "Unknown TTL operation" +msgstr "Неизвестная операция TTL" diff --git a/openwrt/luci-app-mu300/po/sk/mu300.po b/openwrt/luci-app-mu300/po/sk/mu300.po index 03455caa..290fca29 100644 --- a/openwrt/luci-app-mu300/po/sk/mu300.po +++ b/openwrt/luci-app-mu300/po/sk/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminál AT" msgid "Adapter settings" msgstr "Nastavenia adaptéra" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Správa zariadenia" @@ -1140,6 +1143,45 @@ msgstr "Ja: %s" msgid "Delete" msgstr "Odstrániť" +msgid "Current setting" +msgstr "Aktuálne nastavenie" + +msgid "Fixed at %d" +msgstr "Pevne %d" + +msgid "Not changed (default)" +msgstr "Nezmenené (predvolené)" + +msgid "Rule in force" +msgstr "Platné pravidlo" + +msgid "Flow offloading" +msgstr "Odľahčenie tokov (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL mobilných dát" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Každý paket, ktorý odchádza cez mobilné dáta, dostane toto TTL (IPv6: hop limit). Telefón alebo notebook za hotspotom posiela 64 (Windows: 128) a zariadenie ho prepošle o jedna menšie, podľa čoho operátor rozpozná zdieľanú prevádzku." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Na tomto jadre je rýchla cesta firewallu vypnutá, kým je nastavené TTL" + +msgid "Set %d" +msgstr "Nastaviť %d" + +msgid "Set" +msgstr "Nastaviť" + +msgid "Enter a number from 1 to 255" +msgstr "Zadajte číslo od 1 do 255" + +msgid "Turn off" +msgstr "Vypnúť" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "S 64 odchádza každý paket ako vlastná prevádzka zariadenia" + msgid "Dashboard info failed" msgstr "Informácie prehľadu zlyhali" @@ -1278,6 +1320,12 @@ msgstr "Neplatná jazyková požiadavka" msgid "Unknown source" msgstr "Neznámy zdroj" +msgid "The TTL adapter gave no valid reply" +msgstr "Adaptér TTL nevrátil platnú odpoveď" + +msgid "Invalid TTL" +msgstr "Neplatné TTL" + msgid "Request too large" msgstr "Požiadavka je príliš veľká" @@ -1409,3 +1457,12 @@ msgstr "Žiadna obsluhujúca bunka na uzamknutie" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Nastavenie TTL sa nepodarilo prečítať" + +msgid "The TTL could not be set" +msgstr "TTL sa nepodarilo nastaviť" + +msgid "Unknown TTL operation" +msgstr "Neznáma operácia TTL" diff --git a/openwrt/luci-app-mu300/po/sv/mu300.po b/openwrt/luci-app-mu300/po/sv/mu300.po index c8db653e..391a86bc 100644 --- a/openwrt/luci-app-mu300/po/sv/mu300.po +++ b/openwrt/luci-app-mu300/po/sv/mu300.po @@ -21,6 +21,9 @@ msgstr "AT-terminal" msgid "Adapter settings" msgstr "Adapterinställningar" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Enhetshantering" @@ -1140,6 +1143,45 @@ msgstr "Jag: %s" msgid "Delete" msgstr "Radera" +msgid "Current setting" +msgstr "Aktuell inställning" + +msgid "Fixed at %d" +msgstr "Fast på %d" + +msgid "Not changed (default)" +msgstr "Inte ändrad (standard)" + +msgid "Rule in force" +msgstr "Aktiv regel" + +msgid "Flow offloading" +msgstr "Flödesavlastning (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL för mobildata" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Varje paket som lämnar via mobildata får denna TTL (IPv6: hop limit). En telefon eller bärbar dator bakom surfzonen skickar 64 (Windows: 128) och enheten vidarebefordrar det med ett mindre, vilket är hur en operatör kan känna igen delad trafik." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "På denna kärna är brandväggens snabbväg avstängd medan en TTL är satt" + +msgid "Set %d" +msgstr "Sätt %d" + +msgid "Set" +msgstr "Sätt" + +msgid "Enter a number from 1 to 255" +msgstr "Ange ett tal från 1 till 255" + +msgid "Turn off" +msgstr "Stäng av" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Med 64 lämnar varje paket enheten som dess egen trafik" + msgid "Dashboard info failed" msgstr "Panelinformation misslyckades" @@ -1278,6 +1320,12 @@ msgstr "Ogiltig språkbegäran" msgid "Unknown source" msgstr "Okänd källa" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL-adaptern gav inget giltigt svar" + +msgid "Invalid TTL" +msgstr "Ogiltig TTL" + msgid "Request too large" msgstr "Begäran för stor" @@ -1409,3 +1457,12 @@ msgstr "Ingen betjänande cell att låsa till" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL-inställningen kunde inte läsas" + +msgid "The TTL could not be set" +msgstr "TTL kunde inte sättas" + +msgid "Unknown TTL operation" +msgstr "Okänd TTL-åtgärd" diff --git a/openwrt/luci-app-mu300/po/tr/mu300.po b/openwrt/luci-app-mu300/po/tr/mu300.po index f6c06903..337ee590 100644 --- a/openwrt/luci-app-mu300/po/tr/mu300.po +++ b/openwrt/luci-app-mu300/po/tr/mu300.po @@ -21,6 +21,9 @@ msgstr "AT terminali" msgid "Adapter settings" msgstr "Bağdaştırıcı ayarları" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Cihaz yönetimi" @@ -1140,6 +1143,45 @@ msgstr "Ben: %s" msgid "Delete" msgstr "Sil" +msgid "Current setting" +msgstr "Geçerli ayar" + +msgid "Fixed at %d" +msgstr "%d olarak sabit" + +msgid "Not changed (default)" +msgstr "Değiştirilmedi (varsayılan)" + +msgid "Rule in force" +msgstr "Etkin kural" + +msgid "Flow offloading" +msgstr "Akış hızlandırma (flow offloading)" + +msgid "TTL of mobile data" +msgstr "Mobil verinin TTL değeri" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Mobil veriden çıkan her paket bu TTL değerini alır (IPv6: hop limit). Hotspot'a bağlı bir telefon ya da dizüstü bilgisayar 64 (Windows: 128) gönderir ve cihaz paketi bir eksiğiyle iletir; operatör paylaşılan trafiği bu farktan anlayabilir." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Bu çekirdekte TTL ayarlıyken güvenlik duvarının hızlı yolu kapalıdır" + +msgid "Set %d" +msgstr "%d yap" + +msgid "Set" +msgstr "Ayarla" + +msgid "Enter a number from 1 to 255" +msgstr "1 ile 255 arasında bir sayı girin" + +msgid "Turn off" +msgstr "Kapat" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64, her paketin cihazın kendi trafiği gibi çıkmasını sağlar" + msgid "Dashboard info failed" msgstr "Gösterge paneli bilgisi alınamadı" @@ -1278,6 +1320,12 @@ msgstr "Geçersiz dil isteği" msgid "Unknown source" msgstr "Bilinmeyen kaynak" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL bağdaştırıcısı geçerli bir yanıt vermedi" + +msgid "Invalid TTL" +msgstr "Geçersiz TTL" + msgid "Request too large" msgstr "İstek çok büyük" @@ -1409,3 +1457,12 @@ msgstr "Kilitlenecek hizmet hücresi yok" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "TTL ayarı okunamadı" + +msgid "The TTL could not be set" +msgstr "TTL ayarlanamadı" + +msgid "Unknown TTL operation" +msgstr "Bilinmeyen TTL işlemi" diff --git a/openwrt/luci-app-mu300/po/uk/mu300.po b/openwrt/luci-app-mu300/po/uk/mu300.po index 79bf101f..3d5e18ed 100644 --- a/openwrt/luci-app-mu300/po/uk/mu300.po +++ b/openwrt/luci-app-mu300/po/uk/mu300.po @@ -21,6 +21,9 @@ msgstr "AT-термінал" msgid "Adapter settings" msgstr "Налаштування адаптера" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Керування пристроєм" @@ -1140,6 +1143,45 @@ msgstr "Я: %s" msgid "Delete" msgstr "Видалити" +msgid "Current setting" +msgstr "Поточне налаштування" + +msgid "Fixed at %d" +msgstr "Зафіксовано на %d" + +msgid "Not changed (default)" +msgstr "Не змінено (типово)" + +msgid "Rule in force" +msgstr "Чинне правило" + +msgid "Flow offloading" +msgstr "Розвантаження потоків (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL мобільних даних" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Кожен пакет, що виходить через мобільні дані, отримує цей TTL (IPv6: hop limit). Телефон чи ноутбук за точкою доступу надсилає 64 (Windows: 128), а пристрій пересилає його зі зменшенням на одиницю — за цим оператор може розпізнати роздаваний трафік." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "На цьому ядрі швидкий шлях брандмауера вимкнено, доки задано TTL" + +msgid "Set %d" +msgstr "Задати %d" + +msgid "Set" +msgstr "Задати" + +msgid "Enter a number from 1 to 255" +msgstr "Введіть число від 1 до 255" + +msgid "Turn off" +msgstr "Вимкнути" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "З 64 кожен пакет виходить як власний трафік пристрою" + msgid "Dashboard info failed" msgstr "Помилка отримання даних панелі" @@ -1278,6 +1320,12 @@ msgstr "Неприпустимий мовний запит" msgid "Unknown source" msgstr "Невідоме джерело" +msgid "The TTL adapter gave no valid reply" +msgstr "Адаптер TTL не дав коректної відповіді" + +msgid "Invalid TTL" +msgstr "Неприпустимий TTL" + msgid "Request too large" msgstr "Запит завеликий" @@ -1409,3 +1457,12 @@ msgstr "Немає обслуговуючої соти для фіксації" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Не вдалося прочитати налаштування TTL" + +msgid "The TTL could not be set" +msgstr "Не вдалося задати TTL" + +msgid "Unknown TTL operation" +msgstr "Невідома операція TTL" diff --git a/openwrt/luci-app-mu300/po/vi/mu300.po b/openwrt/luci-app-mu300/po/vi/mu300.po index 5bdb087d..64079769 100644 --- a/openwrt/luci-app-mu300/po/vi/mu300.po +++ b/openwrt/luci-app-mu300/po/vi/mu300.po @@ -21,6 +21,9 @@ msgstr "Terminal AT" msgid "Adapter settings" msgstr "Cài đặt bộ điều hợp" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "Quản lý thiết bị" @@ -1140,6 +1143,45 @@ msgstr "Tôi: %s" msgid "Delete" msgstr "Xóa" +msgid "Current setting" +msgstr "Cài đặt hiện tại" + +msgid "Fixed at %d" +msgstr "Cố định ở %d" + +msgid "Not changed (default)" +msgstr "Không thay đổi (mặc định)" + +msgid "Rule in force" +msgstr "Quy tắc đang áp dụng" + +msgid "Flow offloading" +msgstr "Giảm tải luồng (flow offloading)" + +msgid "TTL of mobile data" +msgstr "TTL của dữ liệu di động" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "Mọi gói tin đi ra qua dữ liệu di động đều nhận TTL này (IPv6: hop limit). Điện thoại hoặc máy tính xách tay sau điểm phát gửi 64 (Windows: 128) và thiết bị chuyển tiếp với giá trị bớt một, nhờ đó nhà mạng có thể nhận ra lưu lượng chia sẻ." + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "Trên nhân này, đường nhanh của tường lửa bị tắt khi đang đặt TTL" + +msgid "Set %d" +msgstr "Đặt %d" + +msgid "Set" +msgstr "Đặt" + +msgid "Enter a number from 1 to 255" +msgstr "Nhập một số từ 1 đến 255" + +msgid "Turn off" +msgstr "Tắt" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "Với 64, mọi gói tin đi ra giống như lưu lượng của chính thiết bị" + msgid "Dashboard info failed" msgstr "Không lấy được thông tin bảng trạng thái" @@ -1278,6 +1320,12 @@ msgstr "Yêu cầu ngôn ngữ không hợp lệ" msgid "Unknown source" msgstr "Nguồn không xác định" +msgid "The TTL adapter gave no valid reply" +msgstr "Bộ điều hợp TTL không trả lời hợp lệ" + +msgid "Invalid TTL" +msgstr "TTL không hợp lệ" + msgid "Request too large" msgstr "Yêu cầu quá lớn" @@ -1409,3 +1457,12 @@ msgstr "Không có cell phục vụ để khóa" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "Không đọc được cài đặt TTL" + +msgid "The TTL could not be set" +msgstr "Không đặt được TTL" + +msgid "Unknown TTL operation" +msgstr "Thao tác TTL không xác định" diff --git a/openwrt/luci-app-mu300/po/zh_Hans/mu300.po b/openwrt/luci-app-mu300/po/zh_Hans/mu300.po index 2aec6216..966b2cf7 100644 --- a/openwrt/luci-app-mu300/po/zh_Hans/mu300.po +++ b/openwrt/luci-app-mu300/po/zh_Hans/mu300.po @@ -21,6 +21,9 @@ msgstr "AT 终端" msgid "Adapter settings" msgstr "适配设置" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "设备管理" @@ -1140,6 +1143,45 @@ msgstr "我: %s" msgid "Delete" msgstr "删除" +msgid "Current setting" +msgstr "当前设置" + +msgid "Fixed at %d" +msgstr "固定为 %d" + +msgid "Not changed (default)" +msgstr "未更改(默认)" + +msgid "Rule in force" +msgstr "生效的规则" + +msgid "Flow offloading" +msgstr "流量分载(flow offloading)" + +msgid "TTL of mobile data" +msgstr "移动数据的 TTL" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "经移动数据发出的每个数据包都会使用此 TTL(IPv6:跳数限制)。热点后面的手机或笔记本电脑发送 64(Windows:128),设备转发时会减一,运营商可以借此识别共享流量。" + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "在此内核上,设置 TTL 期间防火墙快速路径处于关闭状态" + +msgid "Set %d" +msgstr "设为 %d" + +msgid "Set" +msgstr "设置" + +msgid "Enter a number from 1 to 255" +msgstr "请输入 1 到 255 之间的数字" + +msgid "Turn off" +msgstr "关闭" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64 使每个数据包都像设备自身的流量一样发出" + msgid "Dashboard info failed" msgstr "获取仪表盘信息失败" @@ -1278,6 +1320,12 @@ msgstr "语言请求无效" msgid "Unknown source" msgstr "未知的来源" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL 适配器未返回有效回复" + +msgid "Invalid TTL" +msgstr "无效的 TTL" + msgid "Request too large" msgstr "请求过大" @@ -1409,3 +1457,12 @@ msgstr "没有可锁定的服务小区" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "无法读取 TTL 设置" + +msgid "The TTL could not be set" +msgstr "无法设置 TTL" + +msgid "Unknown TTL operation" +msgstr "未知的 TTL 操作" diff --git a/openwrt/luci-app-mu300/po/zh_Hant/mu300.po b/openwrt/luci-app-mu300/po/zh_Hant/mu300.po index 8e40af0b..c36a29cc 100644 --- a/openwrt/luci-app-mu300/po/zh_Hant/mu300.po +++ b/openwrt/luci-app-mu300/po/zh_Hant/mu300.po @@ -21,6 +21,9 @@ msgstr "AT 終端機" msgid "Adapter settings" msgstr "轉接器設定" +msgid "TTL" +msgstr "TTL" + msgid "Device management" msgstr "裝置管理" @@ -1140,6 +1143,45 @@ msgstr "我:%s" msgid "Delete" msgstr "刪除" +msgid "Current setting" +msgstr "目前設定" + +msgid "Fixed at %d" +msgstr "固定為 %d" + +msgid "Not changed (default)" +msgstr "未變更(預設)" + +msgid "Rule in force" +msgstr "生效的規則" + +msgid "Flow offloading" +msgstr "流量卸載(flow offloading)" + +msgid "TTL of mobile data" +msgstr "行動數據的 TTL" + +msgid "Every packet that leaves through mobile data gets this TTL (IPv6: hop limit). A phone or laptop behind the hotspot sends 64 (Windows: 128) and the device forwards it with one less, which is how an operator can tell tethered traffic apart." +msgstr "經行動數據送出的每個封包都會使用此 TTL(IPv6:跳數限制)。熱點後方的手機或筆電送出 64(Windows:128),裝置轉送時會減一,電信業者可藉此辨識分享的流量。" + +msgid "On this kernel the firewall fast-path is off while a TTL is set" +msgstr "在此核心上,設定 TTL 期間防火牆快速路徑為關閉狀態" + +msgid "Set %d" +msgstr "設為 %d" + +msgid "Set" +msgstr "設定" + +msgid "Enter a number from 1 to 255" +msgstr "請輸入 1 到 255 之間的數字" + +msgid "Turn off" +msgstr "關閉" + +msgid "64 makes every packet leave like the device's own traffic" +msgstr "64 讓每個封包都像裝置本身的流量一樣送出" + msgid "Dashboard info failed" msgstr "取得儀表板資訊失敗" @@ -1278,6 +1320,12 @@ msgstr "語言請求無效" msgid "Unknown source" msgstr "未知的來源" +msgid "The TTL adapter gave no valid reply" +msgstr "TTL 介面卡未傳回有效回覆" + +msgid "Invalid TTL" +msgstr "無效的 TTL" + msgid "Request too large" msgstr "請求過大" @@ -1409,3 +1457,12 @@ msgstr "沒有可鎖定的服務基地台" msgid "usage: power get|set KEY VALUE|wake|idle" msgstr "usage: power get|set KEY VALUE|wake|idle" + +msgid "The TTL setting could not be read" +msgstr "無法讀取 TTL 設定" + +msgid "The TTL could not be set" +msgstr "無法設定 TTL" + +msgid "Unknown TTL operation" +msgstr "未知的 TTL 操作" diff --git a/openwrt/luci-app-mu300/root/usr/libexec/rpcd/mu300dash b/openwrt/luci-app-mu300/root/usr/libexec/rpcd/mu300dash index 33612d70..1ca201d8 100755 --- a/openwrt/luci-app-mu300/root/usr/libexec/rpcd/mu300dash +++ b/openwrt/luci-app-mu300/root/usr/libexec/rpcd/mu300dash @@ -23,6 +23,7 @@ # at_history that history, raw text. # lang_get, lang_set LuCI's languages and the lang extra (unisoc-modem/languages, mu300-extra) # power_get, power_set the power profiles (unisoc-modem/power, mu300-power) +# ttl_get, ttl_set value the TTL of mobile data (unisoc-modem/ttl, mu300-ttl); value off or 1-255 # # The AT terminal's whole wait is capped below the 30 s endpoint limit (AT_LOCK_WAIT # for the channel lock plus AT_BUDGET for the answer, mu300-at's MU300_AT_BUDGET), @@ -532,6 +533,18 @@ m_lang_set() { reply_obj "$out" 'The languages adapter gave no valid reply' } +# ---------------------------------------------------------------- TTL +# The TTL page: mu300-ttl through the adapter, which checks the value again +TTLA=${MU300_TTL_BIN:-$DASH/ttl} +m_ttl_get() { reply_obj "$("$TTLA" get 2>/dev/null)" 'The TTL adapter gave no valid reply'; } +m_ttl_set() { + local value + inp '@.value'; value=$V + allowed "$value" '(off|[1-9][0-9]{0,2})' || { refuse 'Invalid TTL'; return; } + [ "$value" = off ] || [ "$value" -le 255 ] || { refuse 'Invalid TTL'; return; } + reply_obj "$("$TTLA" set "$value" 2>/dev/null)" 'The TTL adapter gave no valid reply' +} + do_list() { cat < 20 mA); the -# page goes by status first, the sign only for Unknown and the like. An install +# under mainline (the status comes from bq256xx-charger, patch 0010; without +# it patch 0006 derives "Charging" from current > 20 mA); the page goes by +# status first, the sign only for Unknown and the like. An install # whose ramdisk does not name the device reads as an F50 under mainline (no # charger_policy_service in that device tree): no tile, never a wrong one. The # charger (5.4: "usb"/"ac") says whether external power is on and, where it -# exposes them, the input voltage and current; mainline has no charger driver. +# exposes them, the input voltage and current; mainline: bq256xx-charger (online only). PSY=${MU300_POWER_SUPPLY_DIR:-/sys/class/power_supply} P_DIR= if [ "$(mu300-device 2>/dev/null)" != f50 ]; then diff --git a/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/ttl b/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/ttl new file mode 100755 index 00000000..1e482da9 --- /dev/null +++ b/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/ttl @@ -0,0 +1,50 @@ +#!/bin/sh +# TTL adapter: mu300-ttl for the panel's TTL page (mu300dash ttl_get, ttl_set). Every reply is one JSON object. +# ttl get {"ok":1,"enabled":0|1,"value":N|null,"backend":"tc"|"nft"|"none","offload":0|1|null,"iface":[...]} +# ttl set N|off {"ok":1}, or {"ok":0,"error":...}; N from 1 to 255, checked here again +set -u +export PATH="$PATH:/opt/mu300/bin:/usr/sbin:/sbin" +LIB=${0%/*}/../../share/unisoc-modem/lib.sh +[ -f "$LIB" ] || LIB=/usr/share/unisoc-modem/lib.sh +. "$LIB" + +TTL_CMD=${MU300_TTL_CMD:-/opt/mu300/bin/mu300-ttl} + +error() { printf '{"ok":0,"error":%s}\n' "$(json_str "$1")"; exit 0; } +num() { case $1 in ''|*[!0-9]*) return 1 ;; esac; } + +do_get() { + st=$("$TTL_CMD" state 2>/dev/null) || error 'The TTL setting could not be read' + v=$(printf '%s\n' "$st" | sed -n 's/^TTL=//p' | head -n1) + b=$(printf '%s\n' "$st" | sed -n 's/^BACKEND=//p' | head -n1) + o=$(printf '%s\n' "$st" | sed -n 's/^OFFLOAD=//p' | head -n1) + ifs=$(printf '%s\n' "$st" | sed -n 's/^IFACES=//p' | head -n1) + case $b in tc|nft) ;; *) b=none ;; esac + if num "$v" && [ "$v" -ge 1 ] && [ "$v" -le 255 ]; then en=1; else en=0; v=null; fi + case $o in 0|1) ;; *) o=null ;; esac + list= sep= + for i in $ifs; do + case $i in sipa_eth[0-9]|sipa_eth[0-9][0-9]) list="$list$sep\"$i\""; sep=, ;; esac + done + printf '{"ok":1,"enabled":%s,"value":%s,"backend":"%s","offload":%s,"iface":[%s]}\n' "$en" "$v" "$b" "$o" "$list" +} + +do_set() { + case ${1:-} in + off) set -- off ;; + 0*) error 'Invalid TTL' ;; + *) { num "${1:-}" && [ "${#1}" -le 3 ] && [ "$1" -ge 1 ] && [ "$1" -le 255 ]; } || error 'Invalid TTL' + set -- set "$1" ;; + esac + if out=$("$TTL_CMD" "$@" 2>&1 >/dev/null); then + echo '{"ok":1}' + else + printf '{"ok":0,"error":"The TTL could not be set","detail":%s}\n' "$(json_str "$(printf '%s\n' "$out" | tail -n1)")" + fi +} + +case ${1:-} in + get) do_get ;; + set) do_set "${2:-}" ;; + *) error 'Unknown TTL operation' ;; +esac diff --git a/openwrt/luci-app-mu300/root/usr/share/luci/menu.d/luci-app-mu300.json b/openwrt/luci-app-mu300/root/usr/share/luci/menu.d/luci-app-mu300.json index 6ea8864f..e9824cc6 100644 --- a/openwrt/luci-app-mu300/root/usr/share/luci/menu.d/luci-app-mu300.json +++ b/openwrt/luci-app-mu300/root/usr/share/luci/menu.d/luci-app-mu300.json @@ -60,7 +60,7 @@ "admin/modem/settings": { "title": "Adapter settings", - "order": 5, + "order": 6, "action": { "type": "view", "path": "mu300/settings" @@ -69,9 +69,15 @@ "acl": [ "luci-app-mu300" ] } }, + "admin/modem/ttl": { + "title": "TTL", + "order": 4, + "action": { "type": "view", "path": "mu300/ttl" }, + "depends": { "acl": [ "luci-app-mu300" ] } + }, "admin/modem/device": { "title": "Device management", - "order": 4, + "order": 5, "action": { "type": "view", "path": "mu300/device" }, "depends": { "acl": [ "luci-app-mu300" ] } }, diff --git a/openwrt/luci-app-mu300/root/usr/share/rpcd/acl.d/luci-app-mu300.json b/openwrt/luci-app-mu300/root/usr/share/rpcd/acl.d/luci-app-mu300.json index f1a4d0b6..dd33db94 100644 --- a/openwrt/luci-app-mu300/root/usr/share/rpcd/acl.d/luci-app-mu300.json +++ b/openwrt/luci-app-mu300/root/usr/share/rpcd/acl.d/luci-app-mu300.json @@ -3,7 +3,7 @@ "description": "MU300 control center: status dashboard, network locks, AT terminal and SMS", "read": { "ubus": { - "mu300dash": [ "sysinfo", "status", "signal", "lock_get", "usb_get", "usb_net_list", "lang_get", "power_get" ] + "mu300dash": [ "sysinfo", "status", "signal", "lock_get", "usb_get", "usb_net_list", "lang_get", "power_get", "ttl_get" ] }, "uci": { "unisoc_modem": [ "*" ] @@ -11,7 +11,7 @@ }, "write": { "ubus": { - "mu300dash": [ "act", "at", "at_history", "lock_set", "sms_list", "sms_show", "sms_send", "sms_delete", "sms_sync", "usb_set", "usb_net_add", "lang_set", "power_set" ] + "mu300dash": [ "act", "at", "at_history", "lock_set", "sms_list", "sms_show", "sms_send", "sms_delete", "sms_sync", "usb_set", "usb_net_add", "lang_set", "power_set", "ttl_set" ] }, "uci": { "unisoc_modem": [ "*" ] diff --git a/rootfs/overlay/opt/mu300/bin/mobile-data b/rootfs/overlay/opt/mu300/bin/mobile-data index ca7926dd..3a94b2b1 100755 --- a/rootfs/overlay/opt/mu300/bin/mobile-data +++ b/rootfs/overlay/opt/mu300/bin/mobile-data @@ -607,6 +607,8 @@ up_locked() { # On OpenWrt this is undone a moment later - netifd turns IPv6 back on while it configures the interface - # so the proto handler repeats it after proto_send_update. Relay mode (v6_relay_ra) keeps it on instead. v6_relay_ra || { [ -n "$iid" ] || v6_off; } + # mu300-ttl's rule, again on every bring-up: its tc backend's filters belong to the interface (idempotent) + "${MU300_TTL_CMD:-/opt/mu300/bin/mu300-ttl}" apply >/dev/null 2>&1 || true if [ "${MU300_NETIFD:-0}" = 1 ]; then # OpenWrt: netifd (proto mu300cell) configures the address, routes, DNS and firewall itself printf 'IFACE=%s\nIP=%s\nPREFIX=%s\nDNS1=%s\nDNS2=%s\nIID6=%s\n' "$IFACE" "$ip4" "$prefix" "$dns1" "$dns2" "$iid" diff --git a/rootfs/overlay/opt/mu300/bin/mu300-toolkit b/rootfs/overlay/opt/mu300/bin/mu300-toolkit index c221a97e..723accff 100755 --- a/rootfs/overlay/opt/mu300/bin/mu300-toolkit +++ b/rootfs/overlay/opt/mu300/bin/mu300-toolkit @@ -445,11 +445,11 @@ menu_stress() { # ---------------------------------------------------------------- info # charging, full, on battery...: the SQC charger says "Unknown" once the battery is full, so the power source says -# more than the status alone +# more than the status alone (5.4: usb/ac; mainline: the U30 Air's bq256xx-charger) battery_state() { st=$(cat "$BATDIR/status" 2>/dev/null) [ "$st" = Unknown ] && st= - ext=0; for s in usb ac; do [ "$(cat /sys/class/power_supply/$s/online 2>/dev/null)" = 1 ] && ext=1; done + ext=0; for s in usb ac bq256xx-charger; do [ "$(cat /sys/class/power_supply/$s/online 2>/dev/null)" = 1 ] && ext=1; done case $st in Charging) echo charging ;; Full) echo "full, on USB power" ;; diff --git a/rootfs/overlay/opt/mu300/bin/mu300-ttl b/rootfs/overlay/opt/mu300/bin/mu300-ttl index b02b6fd4..449c8337 100755 --- a/rootfs/overlay/opt/mu300/bin/mu300-ttl +++ b/rootfs/overlay/opt/mu300/bin/mu300-ttl @@ -8,30 +8,92 @@ # # Why: a phone or laptop behind the hotspot sends TTL 64 (Windows: 128); the device routes it, and it leaves with # 63 (127) - one less than what the device itself sends, which is how an operator can tell tethered traffic apart. -# With "set 64" every packet leaves exactly like the device's own. The rule matches the interface by name -# (sipa_eth*), so it survives mobile data reconnecting, and it lives in its own nftables table (inet mu300_ttl), -# next to OpenWrt's fw4 and the Ubuntu firewall. -# OpenWrt: fw4's software flowtable (flow_offloading, 90-mu300) forwards an established flow from LAN ingress straight -# to sipa_eth0, past postrouting, so the rule would only see each connection's first packets. While a TTL is set, -# offloading is off (also at boot: apply); "off" turns it back on. Ubuntu has no fw4: nothing to do there. +# With "set 64" every packet leaves exactly like the device's own. +# Two ways to do it, the first one the kernel can: +# tc (mainline: act_pedit, act_csum, cls_matchall): a matchall filter on clsact egress of every sipa_eth*, which +# rewrites the TTL and fixes the IPv4 checksum. Egress is dev_queue_xmit's, which fw4's software flowtable also +# transmits through, so flow offloading stays as it is. The filters belong to the interface: mobile-data calls +# "apply" on every bring-up (idempotent), and a sipa_eth* that is not there yet gets them then. +# nft (the 5.4 vendor kernel, no act_pedit; Ubuntu too when tc cannot): its own table (inet mu300_ttl), postrouting, +# matched by name (sipa_eth*), next to OpenWrt's fw4 and the Ubuntu firewall. fw4's flowtable forwards an +# established flow from LAN ingress straight to sipa_eth0, past postrouting, so the rule would only see each +# connection's first packets: while a TTL is set, offloading is off (also at boot: apply), and it comes back on +# with "off" - or with the tc backend, which does not need it off (ttl.offload-off says it was this script that +# turned it off). Ubuntu has no fw4: nothing to do there. export PATH="$PATH:/opt/mu300/bin:/usr/sbin:/sbin" -CONF=${MU300_TTL_CONF:-/etc/mu300/ttl.conf} # (the variable is for tests/) +CONF=${MU300_TTL_CONF:-/etc/mu300/ttl.conf} # (the variables are for tests/) +MARK=${CONF%/*}/ttl.offload-off +NET=${MU300_TTL_NET:-/sys/class/net} TABLE="inet mu300_ttl" +P4=10 P6=11 # the tc filters' preferences on egress (ours alone: removed by preference) saved() { sed -n 's/^TTL=\([0-9]*\)$/\1/p' "$CONF" 2>/dev/null | tail -n1; } valid() { case $1 in ''|*[!0-9]*) return 1 ;; esac; [ "$1" -ge 1 ] && [ "$1" -le 255 ]; } +has_fw4() { command -v fw4 >/dev/null 2>&1 && command -v uci >/dev/null 2>&1; } # offload 0|1: fw4's flow_offloading, changed (and the firewall reloaded) only when it differs; OpenWrt only offload() { - command -v fw4 >/dev/null 2>&1 && command -v uci >/dev/null 2>&1 || return 0 + has_fw4 || return 0 [ "$(uci -q get "firewall.@defaults[0].flow_offloading")" = "$1" ] && return 0 uci -q set "firewall.@defaults[0].flow_offloading=$1" && uci commit firewall && fw4 -q reload } +# offload back on, if this script turned it off +offload_back() { + [ -e "$MARK" ] || return 0 + offload 1 && rm -f "$MARK" || echo "flow offloading could not be turned back on" >&2 +} + +sipas() { for d in "$NET"/sipa_eth*; do [ -e "$d" ] && echo "${d##*/}"; done; } +# the kernel can rewrite TTLs in tc (OpenWrt's kmodloader modprobe takes one module at a time) +tc_ok() { + command -v tc >/dev/null 2>&1 || return 1 + for m in act_pedit act_csum cls_matchall; do modprobe "$m" >/dev/null 2>&1 || return 1; done +} +tc_clear() { + for i in $(sipas); do + tc filter del dev "$i" egress pref $P4 2>/dev/null + tc filter del dev "$i" egress pref $P6 2>/dev/null + done + return 0 +} +# tc_set N: every sipa_eth* there is. matchall cannot replace a filter (EEXIST): ours go first, then come back. +tc_set() { + tc_clear + for i in $(sipas); do + tc qdisc add dev "$i" clsact 2>/dev/null # already there: fine + tc filter add dev "$i" egress pref $P4 protocol ip matchall \ + action pedit ex munge ip ttl set "$1" pipe action csum ip >/dev/null || return 1 + tc filter add dev "$i" egress pref $P6 protocol ipv6 matchall \ + action pedit ex munge ip6 hoplimit set "$1" >/dev/null || return 1 + done +} +# the interfaces that have our filter +tc_ifaces() { + command -v tc >/dev/null 2>&1 || return 0 + for i in $(sipas); do + tc filter show dev "$i" egress 2>/dev/null | grep -q "pref $P4 " && echo "$i" + done +} apply() { - nft delete table $TABLE 2>/dev/null t=$(saved) - valid "$t" || return 0 + if ! valid "$t"; then + tc_clear + nft delete table $TABLE 2>/dev/null + return 0 + fi + if tc_ok; then + if tc_set "$t"; then + nft delete table $TABLE 2>/dev/null + offload_back + return 0 + fi + tc_clear + echo "tc could not set the TTL, using nftables" >&2 + else + tc_clear + fi + nft delete table $TABLE 2>/dev/null nft -f - <&2 + if has_fw4 && [ "$(uci -q get "firewall.@defaults[0].flow_offloading")" != 0 ]; then + if offload 0; then mkdir -p "${MARK%/*}" && : > "$MARK" + else echo "flow offloading could not be turned off: bulk traffic may keep the client's TTL" >&2; fi + fi + return 0 +} + +offload_state() { has_fw4 && uci -q get "firewall.@defaults[0].flow_offloading"; } + +# state: key=value lines for the LuCI adapter (TTL, BACKEND tc|nft|none, IFACES, OFFLOAD 0|1|"" without fw4) +state() { + ifs=$(tc_ifaces | tr '\n' ' '); ifs=${ifs% } + if [ -n "$ifs" ]; then b=tc + elif nft list table $TABLE >/dev/null 2>&1; then b=nft + else b=none; fi + printf 'TTL=%s\nBACKEND=%s\nIFACES=%s\nOFFLOAD=%s\n' "$(saved)" "$b" "$ifs" "$(offload_state)" } status() { @@ -51,10 +128,26 @@ status() { else echo "TTL: not changed (default)"; fi if [ "$(id -u)" != 0 ]; then echo "rule in force: (only root can read it: sudo mu300-ttl)" + return 0 + fi + ifs=$(tc_ifaces) + if [ -n "$ifs" ]; then + set -- $ifs + more=; [ $# -gt 1 ] && more=" (+$(($# - 1)) more)" + echo "rule in force: tc on $1$more, flow offload untouched" + for i in $ifs; do tc -s filter show dev "$i" egress; done | awk -v t="$t" ' + /^filter protocol ip pref '$P4' .*handle/ { f = 4; next } + /^filter protocol ipv6 pref '$P6' .*handle/ { f = 6; next } + /^filter / { f = 0 } + f && /Sent .* pkt/ { for (i = 1; i <= NF; i++) if ($i == "pkt") n[f] += $(i - 1); f = 0 } + END { printf " IPv4 TTL %s (%d packets so far)\n", t, n[4] + printf " IPv6 hop limit %s (%d packets so far)\n", t, n[6] }' elif nft list table $TABLE >/dev/null 2>&1; then + o=$(offload_state) + echo "rule in force: nft${o:+, flow offload $( [ "$o" = 0 ] && echo off || echo on)}" nft list table $TABLE | awk ' /ip ttl set/ { for (i = 1; i <= NF; i++) { if ($i == "set") v = $(i + 1); if ($i == "packets") p = $(i + 1) } - printf "rule in force: IPv4 TTL %s (%s packets so far)\n", v, p } + printf " IPv4 TTL %s (%s packets so far)\n", v, p } /hoplimit set/ { for (i = 1; i <= NF; i++) { if ($i == "set") v = $(i + 1); if ($i == "packets") p = $(i + 1) } printf " IPv6 hop limit %s (%s packets so far)\n", v, p }' else @@ -71,15 +164,18 @@ case ${1:-status} in valid "${2:-}" || { echo "usage: mu300-ttl set N (N from 1 to 255; 64 is what the device itself sends)" >&2; exit 2; } mkdir -p "${CONF%/*}" echo "TTL=$2" > "$CONF" - apply || { echo "the rule could not be set (nftables)" >&2; exit 1; } + apply || { echo "the rule could not be set (tc and nftables)" >&2; exit 1; } status ;; off) root rm -f "$CONF" + # an nft rule set before ttl.offload-off existed turned offloading off as well + nft list table $TABLE >/dev/null 2>&1 && has_fw4 && { mkdir -p "${MARK%/*}"; : > "$MARK"; } apply - offload 1 || echo "flow offloading could not be turned back on" >&2 + offload_back status ;; apply) root; apply ;; + state) state ;; -h|--help|help) sed -n '2,8s/^# \{0,1\}//p' "$0" ;; *) echo "usage: mu300-ttl [status|set N|off|apply]" >&2; exit 2 ;; esac diff --git a/rootfs/overlay/opt/mu300/bin/mu300-usb b/rootfs/overlay/opt/mu300/bin/mu300-usb index ded93aa1..51d7f433 100755 --- a/rootfs/overlay/opt/mu300/bin/mu300-usb +++ b/rootfs/overlay/opt/mu300/bin/mu300-usb @@ -7,9 +7,11 @@ # mu300-usb boot at boot (mu300-fixups, OpenWrt's mu300-hw): boost off. The charger runs on the battery, # so its registers outlive a reboot, and a boost left on would meet a computer's 5 V. # There is no Type-C driver under mainline to see what is plugged in, so the role is chosen here. The 5 V come from -# the charger IC (SGM41511, bq2560x-compatible, I2C 0x6b), which has no driver either: only its OTG_CONFIG bit is -# switched, charging stays on the chip's own settings. Its watchdog puts it back to those defaults (boost off) 40 s -# after an I2C write unless it is kept alive, so host mode turns the watchdog off and device mode back on. +# the charger IC (SGM41511, bq2560x-compatible, I2C 0x6b): only its OTG_CONFIG bit is switched here. Without a +# driver its watchdog puts it back to its defaults (boost off) 40 s after an I2C write unless it is kept alive, so host +# mode turns the watchdog off and device mode back on. With the kernel's driver (bq256xx, mainline kernels since the +# charger patch) the address is the driver's: it is reached with -f, and the watchdog stays off, as the driver set +# it (40 s later the chip would drop the driver's charge settings); the driver reads REG01 before each write. # The F50 has no battery: its USB port is its power supply, so it cannot be a host. export PATH="$PATH:/opt/mu300/bin:/usr/sbin:/sbin" R=${MU300_SYSROOT:-} # (for tests/: a fake /sys) @@ -22,9 +24,16 @@ REG_PART=0x0b die() { echo "mu300-usb: $*" >&2; exit 1; } i2c() { # i2c get|set ARGS: i2c-tools when there, else busybox's op=$1; shift - if command -v "i2c$op" >/dev/null 2>&1 && [ "$(command -v "i2c$op")" != /usr/bin/busybox ]; then "i2c$op" -y "$@" - elif [ -z "$R" ] && [ -x /opt/mu300/bin/busybox ]; then /opt/mu300/bin/busybox "i2c$op" -y "$@" - else busybox "i2c$op" -y "$@"; fi + if command -v "i2c$op" >/dev/null 2>&1 && [ "$(command -v "i2c$op")" != /usr/bin/busybox ]; then "i2c$op" -y $FORCE "$@" + elif [ -z "$R" ] && [ -x /opt/mu300/bin/busybox ]; then /opt/mu300/bin/busybox "i2c$op" -y $FORCE "$@" + else busybox "i2c$op" -y $FORCE "$@"; fi +} +FORCE= +driver() { # the kernel drives the charger (bq256xx): sets FORCE for i2c-dev + [ -e "$R/sys/bus/i2c/devices/$BUS-006b/driver" ] && FORCE=-f || : +} +watchdog_on() { # back to the chip's defaults 40 s after the last write; never under the driver + [ -n "$FORCE" ] || setbits $REG_TIMER 0x30 0x10 } bus() { # the I2C bus of the charger: the controller at 22a0000 on the UMS9620 for a in "$R"/sys/bus/i2c/devices/i2c-*; do @@ -42,9 +51,10 @@ setbits() { # setbits REG MASK VALUE if [ "${1:-}" = boot ]; then # quietly, on whatever kernel: the 5.4 one has its own charger driver and no I2C device node for this [ "$(mu300-device)" = u30air ] && BUS=$(bus) || exit 0 + driver v=$(reg $REG_CTRL1) || exit 0 if [ $(( v & 0x20 )) -ne 0 ]; then - i2c set "$BUS" $ADDR $REG_CTRL1 $(( v & ~0x20 )) && setbits $REG_TIMER 0x30 0x10 + i2c set "$BUS" $ADDR $REG_CTRL1 $(( v & ~0x20 )) && watchdog_on echo "mu300-usb: the charger's boost was still on from before the reboot: switched off" fi exit 0 @@ -52,6 +62,7 @@ fi [ "$(mu300-device)" = u30air ] || die "only the U30 Air can be a USB host: the F50 is powered through that port" ROLE=$(role_switch) || die "no USB role switch (this needs a mainline kernel with dual-role USB, v2026.10.03 or newer)" BUS=$(bus) || die "the charger's I2C bus is not there (a kernel without I2C)" +driver boost() { [ "$(id -u)" = 0 ] || { echo "(run as root to read the charger)"; return; } @@ -84,7 +95,7 @@ case ${1:-status} in [ "$(id -u)" = 0 ] || die "run as root (sudo mu300-usb device)" echo device > "$ROLE" || die "could not switch the role" setbits $REG_CTRL1 0x20 0x00 # boost off - setbits $REG_TIMER 0x30 0x10 # watchdog back (40 s): the chip returns to its own defaults + watchdog_on # watchdog back (40 s): the chip returns to its own defaults sleep 1 # the role switch works in the background echo "USB device: the USB network and serial console are back" ;; *) sed -n '2,6s/^# \{0,1\}//p' "$0" >&2; exit 2 ;; diff --git a/tests/README.md b/tests/README.md index 68c91a56..6bcac0cb 100644 --- a/tests/README.md +++ b/tests/README.md @@ -32,7 +32,7 @@ macOS and Windows (`.github/workflows/tests.yml`). | `test_mu300cell.py` | `mu300cell.sh` (the OpenWrt netifd protocol), sourced with the netifd functions, `ip`, `mobile-data` stubbed: external updates, the v4 address installed by the script, v6 flush, teardown, `sleep 20` after an attach failure, the extendprefix interface; relay mode (K30, K35-K37, K64): the monitor `mu300cell-v6.sh`, `ndp-learn`, `init.d/mu300-ndp`, `91-mu300-luci`, mobile-data's `v6_relay_ra` | | `test_atd_dash.py` | `init.d/mu300-atd-dash` (K19): two procd instances on nr6/nr7 with their own `MU300_AT_DIR` and no URC channel, START 19, mode 100755, enabled only in the luci block of `build-rootfs.sh`; the panel's collector tries `/run/mu300-at6`, `at7`, then nr1 | | `test_early_dhcp.py` | the USB host's early DHCP lease from `boot/init` into the system (K5, K9, K11, K13, K25-K27): OpenWrt's preinit server on the system's own LAN subnet, the LAN hook that ends it and reattaches `rndis0`, the first-boot defaults (the host pinned with a broadcast lease, never the router; the `earlyusb` zone once; `rndis0` bridged only when it exists), Ubuntu's `lan-start`; under each shell | -| `test_ttl.py` | `mu300-ttl` with fake `uci`/`fw4`: OpenWrt's flow offloading is off while a TTL is set (also at boot), back on after `off`, untouched without fw4 (Ubuntu) | +| `test_ttl.py` | `mu300-ttl` with fake `uci`/`fw4`/`tc`/`modprobe`: the nft backend (no `act_pedit`) turns OpenWrt's flow offloading off while a TTL is set (also at boot), back on after `off`, untouched without fw4 (Ubuntu); the tc backend (`TtlTc`) puts matchall/pedit filters on every sipa_eth*, idempotently, leaves offloading alone, falls back to nft when tc fails, and `off` removes both | | `test_luci_i18n.py` | the control panel's catalogs: every `po/` complete and in the language table, CJK only in catalogs; the pages (the Languages page too) under Node | | `test_po2lmo.py` | `tools/po2lmo.py` against catalogs LuCI's own po2lmo produced (`tests/fixtures/po2lmo`) | | `test_mu300dash_security.py` | the panel's rpcd backend `mu300dash` and its adapters (S1): every parameter checked against an allow-list, untrusted text only as one exact argument or on stdin, every reply JSON, the shared escaper, the ACL | diff --git a/tests/test_device_scripts.py b/tests/test_device_scripts.py index 2f496b0f..fecc96e1 100644 --- a/tests/test_device_scripts.py +++ b/tests/test_device_scripts.py @@ -544,6 +544,20 @@ at() { self.assertFalse([c for c in cmds if c.startswith('sipa-dele-start')], cmds) self.assertIn('AT+CGACT=1,1', cmds) + def test_up_applies_the_ttl(self): + """Every bring-up (netifd, the watchdog's reconnect) re-applies mu300-ttl's rule: the tc backend's filters + belong to the interface. Its output never reaches netifd's parser, and its failure fails nothing.""" + env = dict(MU300_NETIFD=1, MU300_AT_DEV='/dev/null', MU300_URC_LOG=self.tmp / 'none', MU300_CFUN_WAIT=0, + CEREG='+CEREG: 2,1,"1A2B","0123ABCD",7', MU300_TTL_CMD=self.stubs / 'ttl') + for rc in (0, 1): + self.stub('ttl', f'echo "$*" >> "$STUBLOG/ttl.log"; echo noise; echo err >&2; exit {rc}') + (self.tmp / 'ttl.log').unlink(missing_ok=True) + r, _ = self.lib('up_locked', **env) + self.assertEqual(r.returncode, 0, r.stderr) + self.assertIn('IP=10.1.2.3\n', r.stdout) + self.assertNotIn('noise', r.stdout) + self.assertEqual((self.tmp / 'ttl.log').read_text(), 'apply\n') + def test_sipa_dele_only_with_the_module(self): """R35: a kernel without sipa-dele.ko (neither in /lib/modules/ nor under extra/) dials without the loader, and the boot timeline has no dial-sipa-dele mark; with the module (either place) the loader runs and @@ -1915,6 +1929,7 @@ class Ttl(ShellTest): super().setUp() self.conf = self.tmp / 'etc' / 'ttl.conf' self.stub('id', 'echo 0') + self.stub('modprobe', 'exit 1') # no act_pedit (the 5.4 kernel): the nft backend; test_ttl.TtlTc has tc # nft records its arguments, and the ruleset it is given on stdin self.stub('nft', 'echo "$*" >> "$STUBLOG/nft.args"; [ "$1" = -f ] && cat >> "$STUBLOG/nft.in"; ' '[ "$1" = list ] && exit 1; exit 0') @@ -2072,8 +2087,10 @@ class Usb(ShellTest): self.stub('sleep', ':') # i2c-tools (which mu300-usb prefers to busybox's): i2cget -y BUS ADDR REG / i2cset -y BUS ADDR REG VALUE, # one file per register. (Not a stub called busybox: that would also replace the "busybox sh" under test.) - self.stub('i2cget', '[ "$1" = -y ] && shift; cat "$STUBLOG/reg-$3" 2>/dev/null || echo 0x00') - self.stub('i2cset', '[ "$1" = -y ] && shift; printf "0x%02x\\n" $(( $4 )) > "$STUBLOG/reg-$3"; ' + # The options (-y, and -f when a kernel driver owns the address) go to $STUBLOG/flags. + opts = 'while case $1 in -*) true ;; *) false ;; esac; do echo "$1" >> "$STUBLOG/flags"; shift; done; ' + self.stub('i2cget', opts + 'cat "$STUBLOG/reg-$3" 2>/dev/null || echo 0x00') + self.stub('i2cset', opts + 'printf "0x%02x\\n" $(( $4 )) > "$STUBLOG/reg-$3"; ' 'echo "$3=$(( $4 ))" >> "$STUBLOG/writes"') def regs(self, **values): @@ -2126,6 +2143,34 @@ class Usb(ShellTest): self.assertEqual(self.usb(shell, 'boot').stdout, '') self.assertFalse((self.tmp / 'writes').exists()) + def test_under_the_kernel_driver(self): + # bq256xx owns 6-006b (mainline with the charger patch): i2c-dev needs -f, and the watchdog stays off, or 40 s + # later the chip would drop the driver's charge settings (input current, charge current, charging on) + drv = self.root / 'sys/bus/i2c/devices/6-006b' + drv.mkdir(parents=True) + (drv / 'driver').symlink_to(self.root / 'run') + for shell in self.each_shell(): + (self.tmp / 'flags').unlink(missing_ok=True) + self.regs(r01='0x1a', r05='0x87', r08='0x00') + r = self.usb(shell, 'host') + self.assertEqual(r.returncode, 0, r.stdout + r.stderr) + self.assertEqual(self.reg('0x01'), 0x1a | 0x20) + r = self.usb(shell, 'device') + self.assertEqual(r.returncode, 0, r.stderr) + self.assertEqual(self.reg('0x01'), 0x1a) + self.assertEqual(self.reg('0x05'), 0x87) # watchdog still off + self.regs(r01='0x3a') + r = self.usb(shell, 'boot') + self.assertEqual(self.reg('0x01'), 0x1a) + self.assertEqual(self.reg('0x05'), 0x87) + self.assertIn('-f', (self.tmp / 'flags').read_text().split()) + # without the driver, no -f + (drv / 'driver').unlink() + for shell in self.each_shell(): + (self.tmp / 'flags').unlink(missing_ok=True) + self.usb(shell, 'boot') + self.assertNotIn('-f', (self.tmp / 'flags').read_text().split()) + def test_f50(self): for shell in self.each_shell(): (self.root / 'run/mu300/device').write_text('f50\n') diff --git a/tests/test_luci_i18n.py b/tests/test_luci_i18n.py index 66679a14..91dc50b8 100644 --- a/tests/test_luci_i18n.py +++ b/tests/test_luci_i18n.py @@ -411,7 +411,7 @@ if (selected !== true) throw Error('the Bootstrap token bridge must survive the VIEWS = APP / 'htdocs/luci-static/resources/view/mu300' -VIEW_NAMES = ('home', 'locks', 'sms', 'at', 'settings', 'device', 'languages') +VIEW_NAMES = ('home', 'locks', 'sms', 'at', 'settings', 'device', 'languages', 'ttl') CJK_RE = re.compile('[\u2e80-\u9fff\uf900-\ufaff\uff00-\uffef]') @@ -725,11 +725,23 @@ rpcReply = { ok: 0, error: 'Invalid language code' }; await V.set(null, 'enable' rpcReply = { ok: 1, started: 1 }; await V.set(null, 'install', '', 'release'); await flush(); rpcReply = { ok: 1, job: { state: 'done' }, extra: {} }; timers.splice(0).forEach((f) => f()); await flush(); await flush(); rpcReply = { ok: 1 }; await V.set(null, 'disable', 'ja'); await flush(); +return notes();''' + + TTL = ''' +V.render({ ok: 1, enabled: 1, value: 64, backend: 'nft', offload: 0, iface: [] }); +V.paint({ ok: 1, enabled: 0, value: null, backend: 'tc', offload: 1, iface: [ 'sipa_eth0' ] }); +rpcReply = { ok: 0, error: 'Invalid TTL' }; await V.set(null, 64); await flush(); +rpcReply = { ok: 1, enabled: 1, value: 65, backend: 'tc', offload: 1, iface: [ 'sipa_eth0' ] }; +await V.set(null, 65); await flush(); await flush(); return notes();''' # a backend error on each page: (view, body returning what was shown, [(template, error, detail)]); the # page shows the error through the catalog, inside its template if any, and the detail after it as data BACKEND_ERRORS = [ + ('ttl', """V.render({}); toasts.length = 0; +rpcReply = { ok: 0, error: 'The TTL could not be set', detail: 'tc and nftables' }; +await V.set(null, 64); await flush(); +return [ notes().pop() ];""", [('Failed: %s', 'The TTL could not be set', 'tc and nftables')]), ('home', """V.render(); await flush(); toasts.length = 0; rpcReply = { ok: 0, op: 'wifi on', error: 'Expected on or off' }; get('mud-btn-wifi').onclick.call(get('mud-btn-wifi')); await flush(); diff --git a/tests/test_mu300dash_security.py b/tests/test_mu300dash_security.py index 61f367fb..110f8d71 100644 --- a/tests/test_mu300dash_security.py +++ b/tests/test_mu300dash_security.py @@ -91,7 +91,7 @@ exit 0 DEFAULTS = { 'dashboard-info': '{"ok":1,"host":"f50"}', 'cell': '{"ok":1}', 'action': '{"ok":1,"op":"x"}', 'lock': '{"ok":1,"mode":{"label":"auto"}}', 'device-usb': '{"ok":1}', 'at': 'OK', 'sms': 'sent (12)', - 'languages': '{"ok":1}', 'power': '{"ok":1}', + 'languages': '{"ok":1}', 'power': '{"ok":1}', 'ttl': '{"ok":1}', } # The methods that start something with setsid (in the background of mu300dash) @@ -212,7 +212,8 @@ class Mu300Dash(ShellTest): class Inventory(Mu300Dash): METHODS = {'sysinfo', 'status', 'signal', 'act', 'at', 'at_history', 'lock_get', 'lock_set', 'sms_list', 'sms_show', 'sms_send', 'sms_delete', 'sms_sync', 'usb_get', 'usb_set', 'usb_net_list', 'usb_net_add', - 'lang_get', 'lang_set', 'power_get', 'power_set'} + 'lang_get', 'lang_set', 'power_get', 'power_set', + 'ttl_get', 'ttl_set'} def test_list_declares_every_method(self): for shell in self.each_shell(): @@ -234,7 +235,7 @@ class Inventory(Mu300Dash): def test_the_changed_scripts_parse(self): for shell in self.each_shell(): for p in [DASH, LIB] + [ADAPTERS / n for n in ('action', 'at', 'boot-replay', 'cell', 'dashboard-info', - 'device-usb', 'lock', 'languages', 'power')]: + 'device-usb', 'lock', 'languages', 'power', 'ttl')]: with self.subTest(p=p.name): r = subprocess.run(shell + ['-n', str(p)], capture_output=True, text=True) self.assertEqual(r.returncode, 0, r.stderr) @@ -285,6 +286,8 @@ class Refusals(Mu300Dash): ('usb_set', {'kind': 'net', 'value': 'ncm', 'scope': 'once', 'auto': '1'}, 'scope', 'once'), ('usb_set', {'kind': 'net', 'value': 'ncm', 'scope': 'once', 'auto': '1'}, 'auto', '1'), ('usb_net_add', {}, 'iface', 'eth1'), + ('ttl_set', {}, 'value', '64'), + ('ttl_set', {}, 'value', 'off'), ] def test_hostile_values_are_refused(self): @@ -346,6 +349,19 @@ class Refusals(Mu300Dash): ('power op format', 'power_set', {'op': 'format'}), ('power wake with key', 'power_set', {'op': 'wake', 'key': 'PROFILE', 'value': 'saver'}), ('power set no value', 'power_set', {'op': 'set', 'key': 'PROFILE', 'value': ''}), + ('ttl zero', 'ttl_set', {'value': '0'}), + ('ttl 256', 'ttl_set', {'value': '256'}), + ('ttl 999', 'ttl_set', {'value': '999'}), + ('ttl four digits', 'ttl_set', {'value': '1000'}), + ('ttl leading zero', 'ttl_set', {'value': '064'}), + ('ttl negative', 'ttl_set', {'value': '-1'}), + ('ttl empty', 'ttl_set', {'value': ''}), + ('ttl missing', 'ttl_set', {}), + ('ttl OFF', 'ttl_set', {'value': 'OFF'}), + ('ttl word', 'ttl_set', {'value': 'on'}), + ('ttl float', 'ttl_set', {'value': '64.5'}), + ('ttl hex', 'ttl_set', {'value': '0x40'}), + ('ttl two', 'ttl_set', {'value': '64 65'}), ] for shell in self.each_shell(): self.assert_refused(shell, jobs) @@ -396,6 +412,12 @@ class Passthrough(Mu300Dash): ('power_set', {'op': 'set', 'key': 'PROFILE', 'value': 'saver'}, [['power', 'set', 'PROFILE', 'saver']]), ('power_set', {'op': 'wake'}, [['power', 'wake']]), ('power_set', {'op': 'idle'}, [['power', 'idle']]), + ('ttl_get', {}, [['ttl', 'get']]), + ('ttl_set', {'value': '64'}, [['ttl', 'set', '64']]), + ('ttl_set', {'value': 128}, [['ttl', 'set', '128']]), + ('ttl_set', {'value': '255'}, [['ttl', 'set', '255']]), + ('ttl_set', {'value': '1'}, [['ttl', 'set', '1']]), + ('ttl_set', {'value': 'off'}, [['ttl', 'set', 'off']]), ] def test_valid_values_reach_the_adapter(self): @@ -457,7 +479,7 @@ class Replies(Mu300Dash): ('lock_get', {'fresh': '1'}), ('lock_set', {'kind': 'lte', 'val': '1'}), ('sms_list', {}), ('sms_show', {'id': '1'}), ('sms_send', {'num': '123', 'text': 'x'}), ('sms_delete', {'id': '1'}), ('sms_sync', {}), ('usb_get', {}), ('usb_set', {'kind': 'role', 'value': 'device', 'auto': '0'}), - ('usb_net_list', {}), ('usb_net_add', {'iface': 'eth1'}), + ('usb_net_list', {}), ('usb_net_add', {'iface': 'eth1'}), ('ttl_get', {}), ('ttl_set', {'value': '64'}), ] OUTPUTS = { 'garbage': NASTY, @@ -484,7 +506,7 @@ class Replies(Mu300Dash): want = json.loads(NASTY_JSON) for shell in self.each_shell(): for m, p in [('sysinfo', {}), ('act', {'op': 'wifi', 'arg': 'on'}), ('lock_get', {}), ('usb_get', {}), - ('usb_net_list', {})]: + ('usb_net_list', {}), ('ttl_get', {}), ('ttl_set', {'value': 'off'})]: with self.subTest(method=m): r, _, _ = self.call(shell, m, p) self.assertEqual(self.reply(r), want) @@ -696,11 +718,79 @@ class LanguagesAdapter(ShellTest): (self.job / 'lang-job.pid').unlink() +class TtlAdapter(ShellTest): + """unisoc-modem/ttl: mu300-ttl's state as JSON for the TTL page, and set/off with the value checked again""" + + def setUp(self): + super().setUp() + self.state = self.tmp / 'state' + self.state.write_text('TTL=64\nBACKEND=tc\nIFACES=sipa_eth0 sipa_eth1\nOFFLOAD=1\n') + # mu300-ttl: records its arguments; "state" prints $STUBLOG/state; set fails with $STUBLOG/fail's text + self.stub('mu300-ttl', 'echo "$*" >> "$STUBLOG/ttl.log"\n' + 'case $1 in state) cat "$STUBLOG/state" ;;\n' + ' *) echo "TTL: something"; [ -e "$STUBLOG/fail" ] && { cat "$STUBLOG/fail" >&2; exit 1; } ;; esac\n' + 'exit 0') + + def run_ad(self, shell, *args): + r = self.script(shell, ADAPTERS / 'ttl', *args, MU300_TTL_CMD=self.stubs / 'mu300-ttl') + self.assertEqual(r.returncode, 0, r.stderr) + return json.loads(r.stdout) + + def log(self): + p = self.tmp / 'ttl.log' + t = p.read_text() if p.exists() else '' + p.unlink(missing_ok=True) + return t + + def test_get(self): + for shell in self.each_shell(): + self.state.write_text('TTL=64\nBACKEND=tc\nIFACES=sipa_eth0 sipa_eth1\nOFFLOAD=1\n') + self.assertEqual(self.run_ad(shell, 'get'), {'ok': 1, 'enabled': 1, 'value': 64, 'backend': 'tc', + 'offload': 1, 'iface': ['sipa_eth0', 'sipa_eth1']}) + self.state.write_text('TTL=128\nBACKEND=nft\nIFACES=\nOFFLOAD=0\n') + self.assertEqual(self.run_ad(shell, 'get'), {'ok': 1, 'enabled': 1, 'value': 128, 'backend': 'nft', + 'offload': 0, 'iface': []}) + # off, Ubuntu (no fw4), and whatever odd text: still JSON, nothing odd passed on + self.state.write_text('TTL=\nBACKEND=none\nIFACES=\nOFFLOAD=\n') + self.assertEqual(self.run_ad(shell, 'get'), {'ok': 1, 'enabled': 0, 'value': None, 'backend': 'none', + 'offload': None, 'iface': []}) + self.state.write_text('TTL=6"4\nBACKEND=x"y\nIFACES=sipa_eth0 a"b\\c\nOFFLOAD=1"\n') + self.assertEqual(self.run_ad(shell, 'get'), {'ok': 1, 'enabled': 0, 'value': None, 'backend': 'none', + 'offload': None, 'iface': ['sipa_eth0']}) + + def test_set_and_off(self): + for shell in self.each_shell(): + self.log() + for v in ('1', '64', '65', '128', '255'): + self.assertEqual(self.run_ad(shell, 'set', v), {'ok': 1}, v) + self.assertEqual(self.log(), f'set {v}\n') + self.assertEqual(self.run_ad(shell, 'set', 'off'), {'ok': 1}) + self.assertEqual(self.log(), 'off\n') + + def test_bad_values_run_nothing(self): + for shell in self.each_shell(): + self.log() + for v in ('0', '256', '1000', '064', '-1', '', 'abc', '6 4', '64;reboot', '$(id)', '--help', 'OFF'): + with self.subTest(v=v): + r = self.run_ad(shell, 'set', v) + self.assertEqual(r, {'ok': 0, 'error': 'Invalid TTL'}) + self.assertEqual(self.log(), '') + self.assertEqual(self.run_ad(shell, 'rm')['ok'], 0) + self.assertEqual(self.log(), '') + + def test_a_failure_says_why(self): + (self.tmp / 'fail').write_text('first\nthe rule could not be set "x" \\ (tc and nftables)\n') + for shell in self.each_shell(): + r = self.run_ad(shell, 'set', '64') + self.assertEqual(r, {'ok': 0, 'error': 'The TTL could not be set', + 'detail': 'the rule could not be set "x" \\ (tc and nftables)'}) + + class Acl(unittest.TestCase): # SMS bodies (one-time codes) and the AT history (AT+CPIN PINs) are not for read-only users (ruling R14) - READ = {'sysinfo', 'status', 'signal', 'lock_get', 'usb_get', 'usb_net_list', 'lang_get', 'power_get'} + READ = {'sysinfo', 'status', 'signal', 'lock_get', 'usb_get', 'usb_net_list', 'lang_get', 'power_get', 'ttl_get'} WRITE = {'act', 'at', 'at_history', 'lock_set', 'sms_list', 'sms_show', 'sms_send', 'sms_delete', 'sms_sync', - 'usb_set', 'usb_net_add', 'lang_set', 'power_set'} + 'usb_set', 'usb_net_add', 'lang_set', 'power_set', 'ttl_set'} def test_actions_need_write_access(self): acl = json.loads(ACL.read_text())['luci-app-mu300'] diff --git a/tests/test_static.py b/tests/test_static.py index 19311960..529c71d3 100644 --- a/tests/test_static.py +++ b/tests/test_static.py @@ -303,6 +303,100 @@ class Rules(unittest.TestCase): # and the build stops when the edit did not apply self.assertIn("'MU300: the eMMC is mmc0', 'WRITE_ONCE(sdhci_sprd_emmc_added, true);'", port) + def test_mainline_drives_the_u30_air_charger(self): + # Without a driver the charger kept what Android left in it: charging off (CHG_CONFIG 0), 500 mA input, and + # the battery drained while plugged in. bq256xx drives the vendor node "ti,bq2560x_chg" now. + cfg = (TOP / 'upstream' / 'mu300-mainline.config').read_text() + for k in ('CONFIG_CHARGER_BQ256XX=y', 'CONFIG_REGMAP_I2C=y', 'CONFIG_I2C_SPRD=y', 'CONFIG_EXTCON_USB_GPIO=y'): + self.assertRegex(cfg, rf'(?m)^{k}$') + port = (TOP / 'upstream' / 'port' / 'install.py').read_text() + # the edit itself, on the two forms of the I2C table (6.18 positional, 7.x designated), twice (idempotent) + code = port[port.index("bp = os.path.join(tree, 'drivers/power/supply/bq256xx_charger.c')"): + port.index('# Every edit above is a text substitution')] + of = ('static const struct of_device_id bq256xx_of_match[] = {\n' + '\t{ .compatible = "ti,bq25601", .data = &bq256xx_chip_info_tbl[BQ25601] },\n\t{}\n};\n') + acpi = ('static const struct acpi_device_id bq256xx_acpi_match[] = {\n' + '\t{ "bq25601", (kernel_ulong_t)&bq256xx_chip_info_tbl[BQ25601] },\n\t{}\n};\n') + for entry, want in (('{ "bq25601", (kernel_ulong_t)&bq256xx_chip_info_tbl[BQ25601] }', + '\t{ "bq2560x_chg", (kernel_ulong_t)&bq256xx_chip_info_tbl[BQ25601] },\n'), + ('{ .name = "bq25601", .driver_data = (kernel_ulong_t)&bq256xx_chip_info_tbl[BQ25601] }', + '\t{ .name = "bq2560x_chg", .driver_data = (kernel_ulong_t)&bq256xx_chip_info_tbl[BQ25601] },\n')): + with tempfile.TemporaryDirectory() as tree: + f = Path(tree, 'drivers/power/supply/bq256xx_charger.c') + f.parent.mkdir(parents=True) + f.write_text('static const struct i2c_device_id bq256xx_i2c_ids[] = {\n\t' + entry + ',\n\t{}\n};\n' + 'MODULE_DEVICE_TABLE(i2c, bq256xx_i2c_ids);\n' + of + acpi) + for _ in range(2): + exec(code, {'os': os, 'tree': tree}) + t = f.read_text() + self.assertEqual(t.count(want), 1, t) + self.assertEqual(t.count('"ti,bq2560x_chg", .data = &bq256xx_chip_info_tbl[BQ25601]'), 1, t) + self.assertNotIn('bq2560x_chg', t[t.index('acpi_device_id'):]) # the ACPI table stays as it was + # and the build stops when it did not apply + self.assertIn("('drivers/power/supply/bq256xx_charger.c', ['\"ti,bq2560x_chg\"", port) + # the driver's handling of that node: no stale cache, Android's 1.98 A and 4.208 V at most, the chip's own + # input current from the PMIC's charger detection on every VBUS change from the extcon, the chip's own only as + # a fallback, charging on unless userspace said "N/A" + p9 = (TOP / 'upstream' / 'patches' / '0009-power-bq256xx-drive-the-U30-Air-charger.patch').read_text() + for s in ('.cache_type = REGCACHE_NONE', 'BQ2560X_CHG_ICHG_MAX_uA\t\t1980000', 'BQ2560X_CHG_VBATREG_MAX_uV\t4208000', + 'BQ256XX_IINDET_EN', 'devm_extcon_register_notifier(dev, bq->vbus_edev, EXTCON_USB', + '"linux,extcon-usb-gpio"', 'bq->init_data.iindpm = 500000;', 'WRITE_ONCE(bq->chg_off', + 'off ? 0 : BQ256XX_CHG_CONFIG_MASK', 'case BQ256XX_VBUS_STAT_USB_CDP:\n+\t\treturn 1500000;', + 'case BQ256XX_VBUS_STAT_USB_DCP:\n+\t\treturn 2000000;', 'case BQ256XX_VBUS_STAT_NONSTD:\n+\t\treturn 1000000;', + 'static char *supplied_to[] = { "sc27xx-fgu" };', + # the PMIC's charger detection first: the charger's own (IINDET_EN) drives D+/D-, the gadget's lines + 'sprd_pmic_detect_charger_type(bq->pmic)', 'of_find_compatible_node(NULL, NULL, "sprd,ump9620")', + 'bus_find_device_by_of_node(&spi_bus_type, np)', 'no charger type from the PMIC'): + self.assertIn(s, p9) + # the fuel gauge asks the charger by the name the driver registers + p10 = (TOP / 'upstream' / 'patches' / '0010-power-sc27xx-fuel-gauge-status-from-bq256xx.patch').read_text() + self.assertIn('+\t"bq256xx-charger",', p10) + # the PMIC's charger detection reads the UMP9620's own register (0x239c), not the SC2730's (0x1b9c), and a + # tree prepared with the old one is corrected + self.assertIn(r"#define SPRD_UMP9620_CHG_DET\t\t0x239c", port) + self.assertIn(r"'\t.charger_det = SPRD_SC2730_CHG_DET,\n};\n', UMP9620_DATA)", port) + self.assertIn("'.charger_det = SPRD_UMP9620_CHG_DET,'", port) + # Android's last capacity in the FGU's user area is in 0.1 % (575 read as 575 %), and capacity stays 0-100 + p11 = (TOP / 'upstream' / 'patches' / '0011-power-sc27xx-fuel-gauge-UMP9620-capacity-in-tenths.patch').read_text() + for s in ('+\t\tcap = clamp(cap, 0, 100) * 10;', '+\t\t*cap = min(DIV_ROUND_CLOSEST(*cap, 10), 100);', + '+\t\tval->intval = clamp(value, 0, 100);'): + self.assertIn(s, p11) + # mu300-usb reaches the chip past the driver and leaves its watchdog off then + usb = (BIN / 'mu300-usb').read_text() + self.assertIn('[ -e "$R/sys/bus/i2c/devices/$BUS-006b/driver" ] && FORCE=-f', usb) + + def test_mainline_can_suspend(self): + # System suspend (PSCI SYSTEM_SUSPEND) and a tickless idle: under the periodic tick a CPU brought back online + # was left out of the timer broadcast and locked up, which every suspend (and `cpu7 offline/online`) hit + cfg = (TOP / 'upstream' / 'mu300-mainline.config').read_text() + for k in ('CONFIG_SUSPEND', 'CONFIG_PM_SLEEP', 'CONFIG_NO_HZ_IDLE', 'CONFIG_HIGH_RES_TIMERS'): + self.assertRegex(cfg, rf'(?m)^{k}=y$') + drv = TOP / 'upstream' / 'port' / 'drivers' + # the PMIC watchdog keeps counting while the AP sleeps: stopped for the sleep, armed again after it + wdt = (drv / 'watchdog' / 'ump9620-pmic-wdt.c').read_text() + self.assertIn('NOIRQ_SYSTEM_SLEEP_PM_OPS(ump9620_wdt_suspend_noirq, ump9620_wdt_resume_noirq)', wdt) + self.assertIn('.pm = pm_sleep_ptr(&ump9620_wdt_pm_ops)', wdt) + self.assertIn('platform_set_drvdata(pdev, w);', wdt) + # PCIe WAKE# is a wakeup only when power/wakeup says so, and is masked (unlazily) for the sleep otherwise + pcie = (drv / 'pci' / 'controller' / 'dwc' / 'pcie-sprd.c').read_text() + self.assertIn('if (device_may_wakeup(pci->dev))\n\t\tpm_wakeup_hard_event(pci->dev);', pcie) + self.assertNotIn('IRQF_TRIGGER_FALLING | IRQF_NO_SUSPEND', pcie) + self.assertIn('irq_set_status_flags(ctrl->wakeup_irq, IRQ_DISABLE_UNLAZY);', pcie) + self.assertNotIn('device_init_wakeup(dev, true)', pcie) + self.assertIn('SET_SYSTEM_SLEEP_PM_OPS(sprd_pcie_pm_suspend, sprd_pcie_pm_resume)', pcie) + # the firmware's debug log pulled WAKE# right after every L2 entry: off by default, and a resume leaves it be + mods = TOP / 'upstream' / 'modules' + sysfs = (mods / 'wcn_bsp' / 'platform' / 'sysfs.c').read_text() + self.assertRegex(sysfs, r'#endif\n(\t.*\n)*\tsysfs_info\.armlog_status = 0;\n') + ep = (mods / 'wcn_bsp' / 'pcie' / 'pcie.c').read_text() + resume = ep[ep.index('static int sprd_ep_resume('):ep.index('const struct dev_pm_ops sprd_ep_pm_ops')] + self.assertNotIn('wcn_set_armlog(true)', resume) + # without a WoWLAN configuration cfg80211 closed the interfaces while the bus was going down, and the + # firmware asserted at the next Wi-Fi open: WoWLAN "any" from the wiphy's registration on + iface = (mods / 'sprd_wlan_combo' / 'common' / 'iface.c').read_text() + self.assertIn('wowlan->any = true;\n\t\t\twiphy->wowlan_config = wowlan;', iface) + self.assertLess(iface.index('ret = wiphy_register(wiphy);'), iface.index('wiphy->wowlan_config = wowlan;')) + def test_mainline_config_has_kvm_and_the_module_set(self): # /dev/kvm (the CPUs start at EL2) and the router/container modules; the kernel's own modules reach the bundle cfg = (TOP / 'upstream' / 'mu300-mainline.config').read_text() @@ -322,6 +416,44 @@ class Rules(unittest.TestCase): self.assertIn('INSTALL_MOD_STRIP=1 DEPMOD=true modules_install', mods) self.assertIn('has the name of an in-tree module', mods) + def test_ttl_page_is_wired(self): + # Cellular > TTL: the menu entry right after the AT terminal, its view, the rpc declarations in common.js, + # ttl_get readable and ttl_set only with write access, the adapter executable + import json + app = TOP / 'openwrt' / 'luci-app-mu300' + menu = json.loads((app / 'root/usr/share/luci/menu.d/luci-app-mu300.json').read_text()) + ttl = menu['admin/modem/ttl'] + self.assertEqual(ttl['title'], 'TTL') + self.assertEqual(ttl['action'], {'type': 'view', 'path': 'mu300/ttl'}) + cellular = sorted((v['order'], k) for k, v in menu.items() if k.startswith('admin/modem/')) + keys = [k for _, k in cellular] + self.assertEqual(keys[keys.index('admin/modem/at') + 1], 'admin/modem/ttl') + self.assertEqual(len({o for o, _ in cellular}), len(cellular), 'two Cellular pages with the same order') + self.assertTrue((app / 'htdocs/luci-static/resources/view/mu300/ttl.js').is_file()) + common = (app / 'htdocs/luci-static/resources/mu300/common.js').read_text() + self.assertIn("method: 'ttl_get'", common) + self.assertIn("method: 'ttl_set', params: [ 'value' ]", common) + self.assertIn('callTtlGet: callTtlGet, callTtlSet: callTtlSet', common) + acl = json.loads((app / 'root/usr/share/rpcd/acl.d/luci-app-mu300.json').read_text())['luci-app-mu300'] + self.assertIn('ttl_get', acl['read']['ubus']['mu300dash']) + self.assertNotIn('ttl_set', acl['read']['ubus']['mu300dash']) + self.assertIn('ttl_set', acl['write']['ubus']['mu300dash']) + self.assertTrue((app / 'root/usr/libexec/unisoc-modem/ttl').stat().st_mode & 0o111) + # the fast-path note belongs to the nft backend only + view = (app / 'htdocs/luci-static/resources/view/mu300/ttl.js').read_text() + self.assertRegex(view, r"if \(st\.backend === 'nft'\)\s*card\.appendChild\([^;]*firewall fast-path is off") + + def test_mainline_rewrites_the_ttl_in_tc(self): + # mu300-ttl's tc backend (clsact egress, matchall, pedit, csum): the flowtable transmits through egress, so + # flow offloading stays on. The 5.4 kernel has no pedit: mu300-ttl falls back to nftables there. + cfg = (TOP / 'upstream' / 'mu300-mainline.config').read_text() + for k in ('CONFIG_NET_SCH_INGRESS', 'CONFIG_NET_CLS_ACT'): + self.assertRegex(cfg, rf'(?m)^{k}=y$') + for k in ('CONFIG_NET_CLS_MATCHALL', 'CONFIG_NET_ACT_PEDIT', 'CONFIG_NET_ACT_CSUM'): + self.assertRegex(cfg, rf'(?m)^{k}=[ym]$') + # tc itself: tc-tiny comes with sqm-scripts on OpenWrt + self.assertIn('sqm-scripts', (TOP / 'openwrt' / 'build-rootfs.sh').read_text()) + def test_every_release_kernel_bundle_has_the_sd_host(self): # 5.4 reads the card as well (FINDINGS 31j): its bundle says so, and the release audit fails when any of the # three bundles does not (mu300-update refuses such a bundle for a system on the card) diff --git a/tests/test_ttl.py b/tests/test_ttl.py index a6833855..930238e9 100644 --- a/tests/test_ttl.py +++ b/tests/test_ttl.py @@ -7,11 +7,13 @@ from helpers import BIN, ShellTest KEY = 'firewall.@defaults[0].flow_offloading' -class TtlOffload(ShellTest): +class TtlBase(ShellTest): def setUp(self): super().setUp() self.conf = self.tmp / 'etc' / 'ttl.conf' self.stub('id', 'echo 0') + # the 5.4 vendor kernel: no act_pedit, so the nft backend (TtlTc below has the tc one) + self.stub('modprobe', 'exit 1') self.stub('nft', 'echo "$*" >> "$STUBLOG/nft.args"; [ "$1" = -f ] && cat >> "$STUBLOG/nft.in"; ' '[ "$1" = list ] && exit 1; exit 0') @@ -30,12 +32,14 @@ esac''') self.stub('fw4', 'echo "$*" >> "$STUBLOG/fw4.log"') def ttl(self, shell, *args): - return self.script(shell, BIN / 'mu300-ttl', *args, MU300_TTL_CONF=self.conf) + return self.script(shell, BIN / 'mu300-ttl', *args, MU300_TTL_CONF=self.conf, + MU300_TTL_NET=self.tmp / 'net') def reset(self, offloading='1'): - for f in ('nft.args', 'nft.in', 'uci.log', 'fw4.log'): + for f in ('nft.args', 'nft.in', 'uci.log', 'fw4.log', 'tc.log', 'modprobe.log'): (self.tmp / f).unlink(missing_ok=True) self.conf.unlink(missing_ok=True) + (self.conf.parent / 'ttl.offload-off').unlink(missing_ok=True) if hasattr(self, 'store'): self.store.write_text(offloading + '\n') @@ -46,6 +50,8 @@ esac''') def offloading(self): return self.store.read_text().strip() + +class TtlOffload(TtlBase): def test_set_turns_offloading_off_and_off_turns_it_back_on(self): self.openwrt() for shell in self.each_shell(): @@ -145,5 +151,186 @@ esac''') self.assertEqual(self.log('uci.log'), '') +class TtlTc(TtlBase): + """Mainline kernels (act_pedit, act_csum, cls_matchall): the TTL is rewritten by tc on clsact egress of every + sipa_eth*, which an offloaded flow still passes (the flowtable transmits with dev_queue_xmit), so flow offloading + is left alone. The 5.4 vendor kernel has no act_pedit: modprobe fails and the nft backend above is used.""" + + V4 = 'egress pref 10 protocol ip matchall action pedit ex munge ip ttl set {} pipe action csum ip' + V6 = 'egress pref 11 protocol ipv6 matchall action pedit ex munge ip6 hoplimit set {}' + + def setUp(self): + super().setUp() + self.stub('modprobe', 'echo "$*" >> "$STUBLOG/modprobe.log"') + # tc logs its arguments; "filter show" prints $STUBLOG/tc.show; an add fails when $STUBLOG/tc.fail exists + self.stub('tc', 'echo "$*" >> "$STUBLOG/tc.log"\n' + 'case "$*" in *"filter show"*) cat "$STUBLOG/tc.show" 2>/dev/null ;;\n' + ' *"filter add"*) [ -e "$STUBLOG/tc.fail" ] && exit 2 ;; esac\nexit 0') + net = self.tmp / 'net' + for i in ('sipa_eth0', 'sipa_eth1', 'lo', 'br-lan'): + (net / i).mkdir(parents=True, exist_ok=True) + + def tc_log(self): + return self.log('tc.log').splitlines() + + def test_set_uses_tc_on_every_sipa_and_leaves_offloading_alone(self): + self.openwrt() + for shell in self.each_shell(): + self.reset() + r = self.ttl(shell, 'set', '64') + self.assertEqual(r.returncode, 0, r.stderr) + self.assertEqual(self.log('modprobe.log').split(), ['act_pedit', 'act_csum', 'cls_matchall']) + tc = self.tc_log() + for i in ('sipa_eth0', 'sipa_eth1'): + self.assertIn(f'qdisc add dev {i} clsact', tc) + self.assertIn(f'filter add dev {i} ' + self.V4.format(64), tc) + self.assertIn(f'filter add dev {i} ' + self.V6.format(64), tc) + self.assertFalse([c for c in tc if ' lo ' in c + ' ' or 'br-lan' in c], tc) + self.assertEqual(self.log('nft.in'), '') # no nft rule + self.assertIn('delete table inet mu300_ttl', self.log('nft.args')) # an old one goes + self.assertEqual(self.offloading(), '1') + self.assertNotIn('set', self.log('uci.log')) + self.assertEqual(self.log('fw4.log'), '') + + def test_apply_is_idempotent(self): + # mobile-data calls apply on every bring-up: matchall has no replace (EEXIST, seen on the U30 Air), so each + # filter is deleted before it is added again - never a second one, never a failed add + for shell in self.each_shell(): + self.reset() + self.conf.parent.mkdir(parents=True, exist_ok=True) + self.conf.write_text('TTL=65\n') + self.assertEqual(self.ttl(shell, 'apply').returncode, 0) + self.assertEqual(self.ttl(shell, 'apply').returncode, 0) + tc = self.tc_log() + self.assertFalse([c for c in tc if 'replace' in c], tc) + add = 'filter add dev sipa_eth0 ' + self.V4.format(65) + self.assertEqual(tc.count(add), 2) + # the second add comes after a delete of the first + last_add = max(i for i, x in enumerate(tc) if x == add) + self.assertIn('filter del dev sipa_eth0 egress pref 10', tc[tc.index(add) + 1:last_add]) + + def test_tc_failure_falls_back_to_nft(self): + self.openwrt() + (self.tmp / 'tc.fail').write_text('') + for shell in self.each_shell(): + self.reset() + r = self.ttl(shell, 'set', '64') + self.assertEqual(r.returncode, 0, r.stderr) + self.assertIn('ip ttl set 64', self.log('nft.in')) + self.assertIn('filter del dev sipa_eth0 egress pref 10', self.tc_log()) # half-set filters removed + self.assertEqual(self.offloading(), '0') + + def test_off_removes_both_and_leaves_offloading_alone(self): + self.openwrt() + for shell in self.each_shell(): + self.reset('0') # turned off in LuCI by the user: not ours to turn back on + self.assertEqual(self.ttl(shell, 'set', '128').returncode, 0) + (self.tmp / 'tc.log').unlink() + r = self.ttl(shell, 'off') + self.assertEqual(r.returncode, 0, r.stderr) + tc = self.tc_log() + for i in ('sipa_eth0', 'sipa_eth1'): + for pref in ('10', '11'): + self.assertIn(f'filter del dev {i} egress pref {pref}', tc) + self.assertFalse([c for c in tc if 'filter add' in c], tc) + self.assertIn('delete table inet mu300_ttl', self.log('nft.args')) + self.assertEqual(self.offloading(), '0') + self.assertEqual(self.log('fw4.log'), '') + + def test_offloading_turned_off_by_nft_comes_back_with_tc(self): + # set on the 5.4 kernel (offloading off), then a mainline boot: tc does not need it off + self.openwrt() + for shell in self.each_shell(): + self.reset() + self.stub('modprobe', 'exit 1') + self.assertEqual(self.ttl(shell, 'set', '64').returncode, 0) + self.assertEqual(self.offloading(), '0') + self.stub('modprobe', 'exit 0') + r = self.ttl(shell, 'apply') + self.assertEqual(r.returncode, 0, r.stderr) + self.assertEqual(self.offloading(), '1') + self.assertFalse((self.conf.parent / 'ttl.offload-off').exists()) + + def test_off_after_an_nft_rule_without_the_marker(self): + # set by an older mu300-ttl (no ttl.offload-off): its nft table still says offloading was turned off + self.openwrt('0') + self.stub('nft', 'echo "$*" >> "$STUBLOG/nft.args"; [ "$1" = list ] && exit 0; exit 0') + for shell in self.each_shell(): + self.reset('0') + r = self.ttl(shell, 'off') + self.assertEqual(r.returncode, 0, r.stderr) + self.assertEqual(self.offloading(), '1') + self.assertFalse((self.conf.parent / 'ttl.offload-off').exists()) + + def test_no_sipa_yet_sets_nothing_and_fails_nothing(self): + # at boot before the modem: the rule comes with mobile data (mobile-data up calls apply) + for shell in self.each_shell(): + self.reset() + for i in ('sipa_eth0', 'sipa_eth1'): + (self.tmp / 'net' / i).rmdir() + r = self.ttl(shell, 'set', '64') + self.assertEqual(r.returncode, 0, r.stderr) + self.assertEqual(self.log('nft.in'), '') + for i in ('sipa_eth0', 'sipa_eth1'): + (self.tmp / 'net' / i).mkdir() + + SHOW = """filter protocol ip pref 10 matchall chain 0 +filter protocol ip pref 10 matchall chain 0 handle 0x1 + not_in_hw (rule hit 42) +\taction order 1: pedit action pipe keys 1 +\tAction statistics: +\tSent 4200 bytes 42 pkt (dropped 0, overlimits 0 requeues 0) +\taction order 2: csum (iph) action pass +\tSent 4200 bytes 42 pkt (dropped 0, overlimits 0 requeues 0) +filter protocol ipv6 pref 11 matchall chain 0 +filter protocol ipv6 pref 11 matchall chain 0 handle 0x1 + not_in_hw (rule hit 7) +\tSent 700 bytes 7 pkt (dropped 0, overlimits 0 requeues 0) +""" + + def test_status_names_the_backend(self): + self.openwrt() + for shell in self.each_shell(): + self.reset() + self.conf.parent.mkdir(parents=True, exist_ok=True) + self.conf.write_text('TTL=64\n') + (self.tmp / 'tc.show').write_text(self.SHOW) + r = self.ttl(shell) + self.assertEqual(r.returncode, 0, r.stderr) + self.assertIn('tc on sipa_eth0', r.stdout) + self.assertIn('flow offload untouched', r.stdout) + self.assertIn('IPv4 TTL 64 (84 packets so far)', r.stdout) # both interfaces summed + self.assertIn('IPv6 hop limit 64 (14 packets so far)', r.stdout) + r = self.ttl(shell, 'state') + self.assertEqual(r.stdout, 'TTL=64\nBACKEND=tc\nIFACES=sipa_eth0 sipa_eth1\nOFFLOAD=1\n') + (self.tmp / 'tc.show').unlink() + # the nft table in force + self.store.write_text('0\n') + self.stub('nft', 'echo \'table inet mu300_ttl { chain postrouting {\n' + 'oifname "sipa_eth*" ip ttl set 64 counter packets 5 bytes 9\n} }\'') + r = self.ttl(shell) + self.assertIn('nft, flow offload off', r.stdout) + self.assertIn('IPv4 TTL 64 (5 packets so far)', r.stdout) + r = self.ttl(shell, 'state') + self.assertEqual(r.stdout, 'TTL=64\nBACKEND=nft\nIFACES=\nOFFLOAD=0\n') + self.stub('nft', 'exit 1') + self.conf.unlink() + r = self.ttl(shell, 'state') + self.assertEqual(r.stdout, 'TTL=\nBACKEND=none\nIFACES=\nOFFLOAD=0\n') + + def test_ubuntu_with_tc_touches_no_firewall(self): + self.stub('uci', 'echo "$*" >> "$STUBLOG/uci.log"') + for shell in self.each_shell(): + self.reset() + self.assertEqual(self.ttl(shell, 'set', '64').returncode, 0) + self.assertIn('filter add dev sipa_eth0 ' + self.V4.format(64), self.tc_log()) + r = self.ttl(shell, 'off') + self.assertEqual(r.returncode, 0) + self.assertEqual(r.stderr, '') + self.assertEqual(self.log('uci.log'), '') + r = self.ttl(shell, 'state') + self.assertIn('OFFLOAD=\n', r.stdout) + + if __name__ == '__main__': unittest.main() diff --git a/upstream/modules/sprd_wlan_combo/common/iface.c b/upstream/modules/sprd_wlan_combo/common/iface.c index 6eca8a08..845c8097 100644 --- a/upstream/modules/sprd_wlan_combo/common/iface.c +++ b/upstream/modules/sprd_wlan_combo/common/iface.c @@ -1724,6 +1724,25 @@ static int iface_core_init(struct device *dev, struct sprd_priv *priv) wiphy_err(wiphy, "failed to regitster wiphy(%d)!\n", ret); goto out; } +#ifdef CONFIG_PM + /* + * MU300: WoWLAN "any" on by default. Without a WoWLAN configuration cfg80211's wiphy_suspend() closes every + * interface (cfg80211_leave_all), and the WCN PCI function, which suspends asynchronously, has usually taken + * the bus down by then: CMD_CLOSE and CMD_DISCONNECT were dropped ("fail because bus done"), the firmware kept + * them open, and the next close and open of Wi-Fi after the resume hit a firmware assert (mchn.c line 137) + * that only a reboot cleared (FINDINGS 37). With a configuration the interfaces stay as they are; the + * firmware is told about the sleep through the PCIe channel's power_notify, as before. "iw phy phy0 wowlan + * disable" brings the old behaviour back. wiphy_unregister() frees it. + */ + if (!wiphy->wowlan_config) { + struct cfg80211_wowlan *wowlan = kzalloc(sizeof(*wowlan), GFP_KERNEL); + + if (wowlan) { + wowlan->any = true; + wiphy->wowlan_config = wowlan; + } + } +#endif rtnl_lock(); wdev = sprd_add_iface(priv, "wlan%d", NL80211_IFTYPE_STATION, NULL); diff --git a/upstream/modules/wcn_bsp/pcie/pcie.c b/upstream/modules/wcn_bsp/pcie/pcie.c index a71e7f60..be8c68e1 100644 --- a/upstream/modules/wcn_bsp/pcie/pcie.c +++ b/upstream/modules/wcn_bsp/pcie/pcie.c @@ -1268,7 +1268,11 @@ static int sprd_ep_resume(struct device *dev) wcn_bus_change_state(priv, WCN_BUS_UP); atomic_set(&priv->is_suspending, 0); - wcn_set_armlog(true); + /* + * MU300: the vendor turned the firmware's ARM log on here after every resume. The firmware keeps the setting + * through D3hot, and with the log on it pulls PCIe WAKE# within 0-2 s of every L2 entry to push log packets: + * a system sleep with Wi-Fi up ended at once (FINDINGS 37). It is off by default (sysfs.c); leave it as it was. + */ mdbg_device_lock_notify(); for (chn = 0; chn < 16; chn++) { ops = mchn_ops(chn); diff --git a/upstream/modules/wcn_bsp/platform/sysfs.c b/upstream/modules/wcn_bsp/platform/sysfs.c index 9a99c39a..42cfac4a 100755 --- a/upstream/modules/wcn_bsp/platform/sysfs.c +++ b/upstream/modules/wcn_bsp/platform/sysfs.c @@ -1064,6 +1064,14 @@ int init_wcn_sysfs(void) atomic_set(&sysfs_info.is_reset, 0x0); sysfs_info.armlog_status = 1; #endif + /* + * MU300: the firmware's ARM log off, as in Android's user builds (it is turned on at every chip power-on + * from this value, and wifi-start's "at+armlog=0" did not outlive the next power-on). With it on, the + * firmware pulls PCIe WAKE# within 0-2 s of every L2 entry to push log packets, and a system sleep with + * PCIe wakeup enabled ended at once (FINDINGS 37). echo 1 > /sys/devices/virtual/misc/wcn/devices/armlog_status + * turns it on for debugging. + */ + sysfs_info.armlog_status = 0; return 0; } diff --git a/upstream/mu300-mainline.config b/upstream/mu300-mainline.config index 55cceb74..f1ffe5df 100644 --- a/upstream/mu300-mainline.config +++ b/upstream/mu300-mainline.config @@ -101,10 +101,13 @@ CONFIG_EXFAT_FS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -# the charger's OTG boost is switched over I2C (mu300-usb; no charger driver, charging stays on its defaults) +# the U30 Air's charger (SGM41511, a bq25601) on I2C: bq256xx with the vendor node (port/install.py, patch 0009); +# mu300-usb still switches its OTG boost through i2c-dev CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_SPRD=y +CONFIG_REGMAP_I2C=y +CONFIG_CHARGER_BQ256XX=y CONFIG_USB_DWC3_OF_SIMPLE=y CONFIG_USB_GADGET=y CONFIG_USB_CONFIGFS=y @@ -319,6 +322,21 @@ CONFIG_CPU_IDLE=y CONFIG_ARM_PSCI_CPUIDLE=y CONFIG_CPU_IDLE_GOV_MENU=y +# --- system suspend (experimental, FINDINGS 37): PSCI SYSTEM_SUSPEND like the vendor 5.4 kernel, which has no +# platform suspend driver either. Brings CPU hotplug along (PM_SLEEP_SMP). Autosleep is built but off until written. +CONFIG_SUSPEND=y +CONFIG_PM_SLEEP=y +CONFIG_PM_DEBUG=y +CONFIG_PM_ADVANCED_DEBUG=y +CONFIG_PM_SLEEP_DEBUG=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_AUTOSLEEP=y +# a tickless idle with one-shot broadcast: allnoconfig's periodic tick reached every CPU through the sprd_timer +# broadcast (cpuidle's power-down states stop the local timer), and a CPU brought back online (suspend takes the +# others down and up again) was left out of that broadcast: its timers never fired, a hard lockup (FINDINGS 37) +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y + # --- PMIC LEDs (status LEDs) CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y @@ -404,8 +422,8 @@ CONFIG_VHOST_VSOCK=m CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_BINFMT_MISC=m -# pressure stall information (systemd-oomd, container runtimes). No kexec: arm64 has it only with suspend and CPU -# hotplug (PM_SLEEP_SMP), which this port does not build +# pressure stall information (systemd-oomd, container runtimes). No kexec (arm64 needs PM_SLEEP_SMP for it; the +# suspend options bring that in; kexec itself is not enabled) CONFIG_PSI=y CONFIG_SOFT_WATCHDOG=m # containers (podman/docker): the rest of what their check-config asks for diff --git a/upstream/patches/0009-power-bq256xx-drive-the-U30-Air-charger.patch b/upstream/patches/0009-power-bq256xx-drive-the-U30-Air-charger.patch new file mode 100644 index 00000000..2ab9c72b --- /dev/null +++ b/upstream/patches/0009-power-bq256xx-drive-the-U30-Air-charger.patch @@ -0,0 +1,401 @@ +power: supply: bq256xx: the vendor "ti,bq2560x_chg" node (ZTE U30 Air) + +The U30 Air's charger is an SGM41511 (part 0010 in REG0B, a bq25601) at I2C 6-006b. Its stock DT node has no IRQ +line, no input current and an extcon instead; without a driver the chip keeps what Android left in it, and Android +leaves charging off (CHG_CONFIG 0) with a 500 mA input limit, so under mainline the battery drained while plugged +in. port/install.py adds the compatible to the OF and I2C tables (bq25601 data); for that node only: + +- no register cache: the chip arrives configured, and the reg_defaults cache would write the power-on defaults + back in every read-modify-write (also over mu300-usb's OTG bit in REG01); +- ICHG at most 1.98 A (Android's; the battery node says 3 A for the 4050 mAh cell), VREG at most 4.208 V (Android's; + the node says 4.3 V), EN_TERM on, the watchdog off as before; VINDPM from the vendor "vindpm-value" (mV); +- the input current, 500 mA until then, at probe and on every VBUS change from the extcon (the extcon-usb-gpio + device the USB PHY uses when the node names the PMIC's Type-C block, which has no driver), from the UMP9620's + charger detection (sprd_pmic_detect_charger_type(), as sc2731_charger: SDP 500 mA, CDP 1.5 A, DCP 2 A; also + usb_type). The charger's own detection (IINDET_EN, then VBUS_STAT: SDP and unknown 500 mA, CDP 1.5 A, DCP 2 A, + non-standard 1 A) drives D+/D-, the USB gadget's lines to the computer, so it runs only when the PMIC has no + answer. Charging is switched on each time unless userspace wrote "N/A" to charge_type ("Fast" starts it again); +- the fuel gauge (sc27xx-fgu) is told when the charger changes, and no second "bq256xx-battery" supply; +- no usb_phy lookup (it would find the SoC's PHY), and a board whose DT has the node without the chip (the F50) + probes no further than the first read. + +--- a/drivers/power/supply/bq256xx_charger.c ++++ b/drivers/power/supply/bq256xx_charger.c +@@ -17,6 +17,11 @@ + #include + #include + #include ++#include ++#include ++#include ++#include ++#include + + #define BQ256XX_MANUFACTURER "Texas Instruments" + +@@ -149,6 +154,14 @@ + + #define BQ256XX_REG_RST BIT(7) + ++/* bq2560x/SGM41511 bits the generic code does not use (the vendor "ti,bq2560x_chg" node, see bq2560x_chg_*) */ ++#define BQ256XX_OTG_CONFIG BIT(5) /* CHARGER_CONTROL_0 */ ++#define BQ256XX_EN_TERM BIT(7) /* CHARGER_CONTROL_1 */ ++#define BQ256XX_IINDET_EN BIT(7) /* CHARGER_CONTROL_3: force input detection, clears when done */ ++#define BQ256XX_VBUS_STAT_NONSTD (BIT(7) | BIT(6)) ++#define BQ2560X_CHG_ICHG_MAX_uA 1980000 /* what Android charges the U30 Air's 4050 mAh cell with */ ++#define BQ2560X_CHG_VBATREG_MAX_uV 4208000 /* Android's VREG; the battery node says 4.3 V */ ++ + /** + * struct bq256xx_init_data - + * @ichg: fast charge current +@@ -247,6 +260,19 @@ + const struct bq256xx_chip_info *chip_info; + struct bq256xx_state state; + int watchdog_timer; ++ ++ /* ++ * The vendor device tree's "ti,bq2560x_chg" (ZTE U30 Air: an SGM41511, part 0010 = bq25601): no IRQ line, no ++ * input current in the DT, and the chip as Android left it. VBUS events come from the extcon instead. ++ */ ++ bool bq2560x_chg; ++ bool chg_off; ++ bool iindet_noted; ++ int usb_type; ++ struct device *pmic; ++ struct extcon_dev *vbus_edev; ++ struct notifier_block vbus_nb; ++ struct delayed_work vbus_work; + }; + + /** +@@ -952,6 +978,8 @@ + ret = bq->chip_info->bq256xx_set_charge_type(bq, val->intval); + if (ret) + return ret; ++ /* "N/A" stops charging until "Fast" (or "Trickle"), also across plugs (bq2560x_chg_detect) */ ++ WRITE_ONCE(bq->chg_off, val->intval == POWER_SUPPLY_CHARGE_TYPE_NONE); + break; + + default: +@@ -1056,7 +1084,12 @@ + break; + + case POWER_SUPPLY_PROP_USB_TYPE: +- if (bq->chip_info->has_usb_detect) { ++ /* "ti,bq2560x_chg": the PMIC's charger detection, when it said something (bq2560x_chg_detect) */ ++ if (bq->bq2560x_chg && READ_ONCE(bq->usb_type) != POWER_SUPPLY_USB_TYPE_UNKNOWN && ++ state.vbus_stat != BQ256XX_VBUS_STAT_NO_INPUT && ++ state.vbus_stat != BQ256XX_VBUS_STAT_USB_OTG) { ++ val->intval = READ_ONCE(bq->usb_type); ++ } else if (bq->chip_info->has_usb_detect) { + switch (state.vbus_stat) { + case BQ256XX_VBUS_STAT_USB_SDP: + val->intval = POWER_SUPPLY_USB_TYPE_SDP; +@@ -1312,6 +1345,19 @@ + .volatile_reg = bq256xx_is_volatile_reg, + }; + ++/* ++ * "ti,bq2560x_chg": the chip arrives configured by Android, so a cache that starts from the power-on defaults would ++ * write those back in every read-modify-write; and mu300-usb switches the OTG boost (CHARGER_CONTROL_0) itself. ++ * No cache: every update reads the register first. ++ */ ++static const struct regmap_config bq2560x_chg_regmap_config = { ++ .reg_bits = 8, ++ .val_bits = 8, ++ ++ .max_register = BQ256XX_PART_INFORMATION, ++ .cache_type = REGCACHE_NONE, ++}; ++ + static const struct bq256xx_chip_info bq256xx_chip_info_tbl[] = { + [BQ25600] = { + .model_id = BQ25600, +@@ -1538,6 +1584,167 @@ + }, + }; + ++/* the input current for what the chip's input detection found (VBUS_STAT, CHARGER_STATUS_0 bits 7:5) */ ++static int bq2560x_chg_iindpm(unsigned int vbus_stat) ++{ ++ switch (vbus_stat) { ++ case BQ256XX_VBUS_STAT_USB_CDP: ++ return 1500000; ++ case BQ256XX_VBUS_STAT_USB_DCP: ++ return 2000000; ++ case BQ256XX_VBUS_STAT_NONSTD: ++ return 1000000; ++ default: /* SDP, unknown adapter: what any USB port gives */ ++ return 500000; ++ } ++} ++ ++/* ++ * The charger type from the UMP9620 PMIC's own charger detection, as the Unisoc kernel and sc2731_charger take it: ++ * reading its result starts nothing on D+/D-, which on this board are the USB gadget's lines to the computer. ++ * UNKNOWN when there is no PMIC device (yet) or no result. ++ */ ++static int bq2560x_chg_pmic_type(struct bq256xx_device *bq) ++{ ++#if IS_REACHABLE(CONFIG_MFD_SC27XX_PMIC) ++ if (!bq->pmic) { ++ struct device_node *np = of_find_compatible_node(NULL, NULL, "sprd,ump9620"); ++ ++ if (np) ++ bq->pmic = bus_find_device_by_of_node(&spi_bus_type, np); ++ of_node_put(np); ++ } ++ /* the PMIC driver bound: its drvdata is what sprd_pmic_detect_charger_type() reads */ ++ if (bq->pmic && spi_get_drvdata(to_spi_device(bq->pmic))) { ++ switch (sprd_pmic_detect_charger_type(bq->pmic)) { ++ case SDP_TYPE: ++ return POWER_SUPPLY_USB_TYPE_SDP; ++ case CDP_TYPE: ++ return POWER_SUPPLY_USB_TYPE_CDP; ++ case DCP_TYPE: ++ return POWER_SUPPLY_USB_TYPE_DCP; ++ default: ++ break; ++ } ++ } ++#endif ++ return POWER_SUPPLY_USB_TYPE_UNKNOWN; ++} ++ ++static void bq2560x_chg_put_pmic(void *data) ++{ ++ struct bq256xx_device *bq = data; ++ ++ if (bq->pmic) ++ put_device(bq->pmic); ++} ++ ++/* ++ * At probe and whenever VBUS comes or goes: charging on (Android leaves CHG_CONFIG off; unless userspace stopped it) ++ * and, with an outside supply, the input current from the PMIC's charger detection; only when that has no answer, ++ * from the charger's own input detection (IINDET_EN, which drives D+/D-). ++ */ ++static void bq2560x_chg_detect(struct bq256xx_device *bq) ++{ ++ unsigned int ctrl0 = 0, stat = 0, ctrl3; ++ bool off = READ_ONCE(bq->chg_off); ++ int ret, iindpm, type = POWER_SUPPLY_USB_TYPE_UNKNOWN; ++ const char *src = "PMIC"; ++ ++ mutex_lock(&bq->lock); ++ ret = regmap_update_bits(bq->regmap, BQ256XX_CHARGER_CONTROL_0, BQ256XX_CHG_CONFIG_MASK, ++ off ? 0 : BQ256XX_CHG_CONFIG_MASK); ++ if (!ret) ++ ret = regmap_read(bq->regmap, BQ256XX_CHARGER_CONTROL_0, &ctrl0); ++ if (!ret) ++ ret = regmap_read(bq->regmap, BQ256XX_CHARGER_STATUS_0, &stat); ++ /* nothing on VBUS, or the chip's own boost drives it (mu300-usb host) */ ++ if (ret || (ctrl0 & BQ256XX_OTG_CONFIG) || !(stat & BQ256XX_PG_STAT_MASK) || ++ (stat & BQ256XX_VBUS_STAT_MASK) == BQ256XX_VBUS_STAT_USB_OTG) ++ goto out; ++ ++ type = bq2560x_chg_pmic_type(bq); ++ switch (type) { ++ case POWER_SUPPLY_USB_TYPE_SDP: ++ iindpm = 500000; ++ break; ++ case POWER_SUPPLY_USB_TYPE_CDP: ++ iindpm = 1500000; ++ break; ++ case POWER_SUPPLY_USB_TYPE_DCP: ++ iindpm = 2000000; ++ break; ++ default: ++ if (!bq->iindet_noted) { ++ dev_info(bq->dev, "no charger type from the PMIC: the charger's own input detection instead\n"); ++ bq->iindet_noted = true; ++ } ++ src = "VBUS_STAT"; ++ ret = regmap_update_bits(bq->regmap, BQ256XX_CHARGER_CONTROL_3, BQ256XX_IINDET_EN, ++ BQ256XX_IINDET_EN); ++ if (!ret) ++ ret = regmap_read_poll_timeout(bq->regmap, BQ256XX_CHARGER_CONTROL_3, ctrl3, ++ !(ctrl3 & BQ256XX_IINDET_EN), 20000, 1000000); ++ if (!ret) ++ ret = regmap_read(bq->regmap, BQ256XX_CHARGER_STATUS_0, &stat); ++ /* a detection that did not finish counts as a USB port */ ++ if (ret) ++ dev_warn(bq->dev, "input detection did not finish: %d\n", ret); ++ iindpm = ret ? 500000 : bq2560x_chg_iindpm(stat & BQ256XX_VBUS_STAT_MASK); ++ break; ++ } ++ ret = bq->chip_info->bq256xx_set_iindpm(bq, iindpm); ++ if (!ret) ++ dev_info(bq->dev, "%s: usb_type %d, input current %d mA, charging %s\n", src, type, ++ iindpm / 1000, off ? "off (userspace)" : "on"); ++out: ++ WRITE_ONCE(bq->usb_type, type); ++ mutex_unlock(&bq->lock); ++ if (ret) ++ dev_warn(bq->dev, "charger setup after VBUS change failed: %d\n", ret); ++ power_supply_changed(bq->charger); ++} ++ ++static void bq2560x_chg_vbus_work(struct work_struct *work) ++{ ++ bq2560x_chg_detect(container_of(to_delayed_work(work), struct bq256xx_device, vbus_work)); ++} ++ ++static int bq2560x_chg_vbus_notifier(struct notifier_block *nb, unsigned long event, void *ptr) ++{ ++ struct bq256xx_device *bq = container_of(nb, struct bq256xx_device, vbus_nb); ++ ++ /* on a plug, give the chip its own detection first */ ++ mod_delayed_work(system_power_efficient_wq, &bq->vbus_work, msecs_to_jiffies(event ? 500 : 0)); ++ return NOTIFY_OK; ++} ++ ++/* ++ * VBUS events come from the node's extcon. The U30 Air's names the PMIC's Type-C block, which has no driver here; ++ * then from the extcon-usb-gpio device, which the USB PHY uses for VBUS as well (phy-sprd-ums9620-ssphy.c). ++ */ ++static int bq2560x_chg_extcon(struct bq256xx_device *bq) ++{ ++ struct device_node *np = of_parse_phandle(bq->dev->of_node, "extcon", 0); ++ struct extcon_dev *edev; ++ ++ if (!np || !of_device_is_compatible(np, "linux,extcon-usb-gpio")) { ++ of_node_put(np); ++ np = of_find_compatible_node(NULL, NULL, "linux,extcon-usb-gpio"); ++ } ++ if (!np || !of_device_is_available(np)) { ++ of_node_put(np); ++ dev_warn(bq->dev, "no VBUS extcon: input current and charging are set at probe only\n"); ++ return 0; ++ } ++ edev = extcon_find_edev_by_node(np); ++ of_node_put(np); ++ if (IS_ERR(edev)) ++ return dev_err_probe(bq->dev, PTR_ERR(edev), "VBUS extcon\n"); ++ bq->vbus_edev = edev; ++ return 0; ++} ++ + static int bq256xx_power_supply_init(struct bq256xx_device *bq, + struct power_supply_config *psy_cfg, struct device *dev) + { +@@ -1549,6 +1756,10 @@ + return PTR_ERR(bq->charger); + } + ++ /* the fuel gauge is the battery there (sc27xx-fgu): no second one with two properties */ ++ if (bq->bq2560x_chg) ++ return 0; ++ + bq->battery = devm_power_supply_register(bq->dev, + &bq256xx_battery_desc, + psy_cfg); +@@ -1614,6 +1825,16 @@ + bat_info->constant_charge_voltage_max_uv; + } + ++ if (bq->bq2560x_chg) { ++ bq->init_data.ichg_max = min_t(u32, bq->init_data.ichg_max, BQ2560X_CHG_ICHG_MAX_uA); ++ bq->init_data.vbatreg_max = min_t(u32, bq->init_data.vbatreg_max, ++ BQ2560X_CHG_VBATREG_MAX_uV); ++ ret = regmap_update_bits(bq->regmap, BQ256XX_CHARGER_CONTROL_1, BQ256XX_EN_TERM, ++ BQ256XX_EN_TERM); ++ if (ret) ++ return ret; ++ } ++ + ret = bq->chip_info->bq256xx_set_vindpm(bq, bq->init_data.vindpm); + if (ret) + return ret; +@@ -1684,6 +1905,22 @@ + + bq->init_data.ts_ignore = device_property_read_bool(bq->dev, "ti,no-thermistor"); + ++ if (bq->bq2560x_chg) { ++ u32 mv; ++ static char *supplied_to[] = { "sc27xx-fgu" }; ++ ++ /* a USB port's 500 mA until the input detection says more (bq2560x_chg_detect) */ ++ if (!device_property_present(bq->dev, "input-current-limit-microamp")) ++ bq->init_data.iindpm = 500000; ++ /* the vendor property, in mV; the chip has 100 mV steps: rounded up */ ++ if (!device_property_present(bq->dev, "input-voltage-limit-microvolt") && ++ !device_property_read_u32(bq->dev, "vindpm-value", &mv)) ++ bq->init_data.vindpm = DIV_ROUND_UP(mv, 100) * 100000; ++ /* the fuel gauge takes its status from the charger */ ++ psy_cfg->supplied_to = supplied_to; ++ psy_cfg->num_supplicants = ARRAY_SIZE(supplied_to); ++ } ++ + return 0; + } + +@@ -1708,6 +1945,30 @@ + + strscpy(bq->model_name, id->name, sizeof(bq->model_name)); + ++ bq->bq2560x_chg = of_device_is_compatible(dev->of_node, "ti,bq2560x_chg"); ++ if (bq->bq2560x_chg) { ++ struct bq256xx_chip_info *info; ++ int part; ++ ++ /* the bq25601 as it is, without a register cache and with its input detection */ ++ info = devm_kmemdup(dev, bq->chip_info, sizeof(*info), GFP_KERNEL); ++ if (!info) ++ return -ENOMEM; ++ info->bq256xx_regmap_config = &bq2560x_chg_regmap_config; ++ info->has_usb_detect = true; ++ bq->chip_info = info; ++ ++ /* a board that has the node and not the chip (the F50) */ ++ part = i2c_smbus_read_byte_data(client, BQ256XX_PART_INFORMATION); ++ if (part < 0) ++ return dev_err_probe(dev, -ENODEV, "no charger: %d\n", part); ++ dev_info(dev, "part %u, rev %u\n", (part >> 3) & 0xf, part & 0x3); ++ ++ ret = bq2560x_chg_extcon(bq); ++ if (ret) ++ return ret; ++ } ++ + bq->regmap = devm_regmap_init_i2c(client, + bq->chip_info->bq256xx_regmap_config); + +@@ -1727,9 +1988,11 @@ + INIT_WORK(&bq->usb_work, bq256xx_usb_work); + bq->usb_nb.notifier_call = bq256xx_usb_notifier; + +- /* OTG reporting */ +- bq->usb2_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); +- bq->usb3_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB3); ++ /* OTG reporting (not with the extcon: it would pick up the SoC's PHY, whose events it does not know) */ ++ if (!bq->bq2560x_chg) { ++ bq->usb2_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); ++ bq->usb3_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB3); ++ } + + ret = bq256xx_power_supply_init(bq, &psy_cfg, dev); + if (ret) { +@@ -1766,6 +2029,22 @@ + return ret; + } + ++ if (bq->bq2560x_chg) { ++ ret = devm_add_action_or_reset(dev, bq2560x_chg_put_pmic, bq); ++ if (ret) ++ return ret; ++ ret = devm_delayed_work_autocancel(dev, &bq->vbus_work, bq2560x_chg_vbus_work); ++ if (ret) ++ return ret; ++ if (bq->vbus_edev) { ++ bq->vbus_nb.notifier_call = bq2560x_chg_vbus_notifier; ++ ret = devm_extcon_register_notifier(dev, bq->vbus_edev, EXTCON_USB, &bq->vbus_nb); ++ if (ret) ++ return dev_err_probe(dev, ret, "VBUS extcon notifier\n"); ++ } ++ mod_delayed_work(system_power_efficient_wq, &bq->vbus_work, 0); ++ } ++ + return ret; + } + diff --git a/upstream/patches/0010-power-sc27xx-fuel-gauge-status-from-bq256xx.patch b/upstream/patches/0010-power-sc27xx-fuel-gauge-status-from-bq256xx.patch new file mode 100644 index 00000000..eee50a31 --- /dev/null +++ b/upstream/patches/0010-power-sc27xx-fuel-gauge-status-from-bq256xx.patch @@ -0,0 +1,17 @@ +power: supply: sc27xx_fuel_gauge: the status from the U30 Air's charger + +With the U30 Air's charger driven by bq256xx (patch 0009), the fuel gauge takes Charging, Not charging, Full and +Discharging from it, as it does from the SC27xx chargers, instead of guessing from the battery current (0006's +fallback, which said Full at 3.88 V on a charger that Android had left switched off). The charger names the fuel +gauge in its supplied_to, so a plug or unplug is passed on. + +--- a/drivers/power/supply/sc27xx_fuel_gauge.c ++++ b/drivers/power/supply/sc27xx_fuel_gauge.c +@@ -166,6 +166,7 @@ + "sc2720_charger", + "sc2721_charger", + "sc2723_charger", ++ "bq256xx-charger", /* MU300: the U30 Air's SGM41511 (patch 0009) */ + }; + + static int sc27xx_fgu_adc_to_current(struct sc27xx_fgu_data *data, s64 adc) diff --git a/upstream/patches/0011-power-sc27xx-fuel-gauge-UMP9620-capacity-in-tenths.patch b/upstream/patches/0011-power-sc27xx-fuel-gauge-UMP9620-capacity-in-tenths.patch new file mode 100644 index 00000000..1af21a7c --- /dev/null +++ b/upstream/patches/0011-power-sc27xx-fuel-gauge-UMP9620-capacity-in-tenths.patch @@ -0,0 +1,41 @@ +power: supply: sc27xx_fuel_gauge: UMP9620's saved capacity is in 0.1 %, and capacity stays within 0-100 + +The FGU's always-on user area keeps the last capacity across a reboot, and the boot after Android reads it back. +Android keeps it there in 0.1 %: on the U30 Air the first mainline boot with a charger driver (patch 0009) read +575 and reported capacity 575. Until then the status was Full (0006's fallback), and the calibration that runs +outside charging forced anything above 100 back to 100, so nobody saw it. On UMP9620 the value is now read and +saved in 0.1 %, and the reported capacity is clamped to 0-100: while charging nothing calibrates the coulomb count. + +--- a/drivers/power/supply/sc27xx_fuel_gauge.c ++++ b/drivers/power/supply/sc27xx_fuel_gauge.c +@@ -275,6 +275,10 @@ + */ + udelay(200); + ++ /* UMP9620: Android keeps the capacity here in 0.1 % (575 at 57.5 %); so does this driver */ ++ if (data->var == &ump9620_info) ++ cap = clamp(cap, 0, 100) * 10; ++ + ret = regmap_update_bits(data->regmap, + data->base + SC27XX_FGU_USER_AREA_SET, + SC27XX_FGU_CAP_AREA_MASK, cap); +@@ -309,6 +313,9 @@ + return ret; + + *cap = value & SC27XX_FGU_CAP_AREA_MASK; ++ /* UMP9620: in 0.1 % (see sc27xx_fgu_save_last_cap()) */ ++ if (data->var == &ump9620_info) ++ *cap = min(DIV_ROUND_CLOSEST(*cap, 10), 100); + return 0; + } + +@@ -702,7 +709,8 @@ + if (ret) + goto error; + +- val->intval = value; ++ /* the coulomb count can run past either end while charging, when nothing calibrates it */ ++ val->intval = clamp(value, 0, 100); + break; + + case POWER_SUPPLY_PROP_VOLTAGE_AVG: diff --git a/upstream/port/drivers/pci/controller/dwc/pcie-sprd.c b/upstream/port/drivers/pci/controller/dwc/pcie-sprd.c index 66eee172..14ba8e5b 100644 --- a/upstream/port/drivers/pci/controller/dwc/pcie-sprd.c +++ b/upstream/port/drivers/pci/controller/dwc/pcie-sprd.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -151,13 +152,18 @@ static void sprd_pcie_notify_client(struct sprd_pcie *ctrl, * When AP is in deep state, an endpoint can wakeup AP by pulling the wake * signal to low. After AP is activated, the endpoint must pull the wake signal * to high. + * + * MU300: a wakeup only when power/wakeup asks for one. The Marlin3 pulls WAKE# within 0-2 s of every L2 entry, so + * as a wakeup it ended every system sleep with Wi-Fi up at once (FINDINGS 37). Off by default; writing "enabled" + * to the controller's power/wakeup arms it. */ static irqreturn_t sprd_pcie_wakeup_irq(int irq, void *data) { struct sprd_pcie *ctrl = data; struct dw_pcie *pci = ctrl->pci; - pm_wakeup_hard_event(pci->dev); + if (device_may_wakeup(pci->dev)) + pm_wakeup_hard_event(pci->dev); return IRQ_WAKE_THREAD; } @@ -267,16 +273,22 @@ static int sprd_add_pcie_port(struct dw_pcie *pci, struct platform_device *pdev) snprintf(ctrl->wakeup_label, ctrl->label_len, "%s wakeup", dev_name(dev)); + /* + * MU300: not IRQF_NO_SUSPEND and not wake-armed for good. A system sleep disables the line like any other, + * and unlazily, so that it is masked in the EIC: PSCI SYSTEM_SUSPEND returns on any interrupt that reaches + * the GIC, whatever the kernel thinks of it. sprd_pcie_pm_suspend() arms it only when power/wakeup is + * enabled, which it is not by default. + */ + irq_set_status_flags(ctrl->wakeup_irq, IRQ_DISABLE_UNLAZY); ret = devm_request_threaded_irq(dev, ctrl->wakeup_irq, sprd_pcie_wakeup_irq, sprd_pcie_wakeup_thread_irq, - IRQF_TRIGGER_FALLING | IRQF_NO_SUSPEND, + IRQF_TRIGGER_FALLING, ctrl->wakeup_label, ctrl); if (ret < 0) dev_warn(dev, "cannot request wakeup irq\n"); - - enable_irq_wake(ctrl->wakeup_irq); - device_init_wakeup(dev, true); + else + device_set_wakeup_capable(dev, true); no_wakeup: @@ -781,8 +793,31 @@ static int sprd_pcie_resume_noirq(struct device *dev) return 0; } +/* MU300: WAKE# as a system wakeup only when power/wakeup is enabled (see sprd_pcie_wakeup_irq()) */ +static int sprd_pcie_pm_suspend(struct device *dev) +{ + struct sprd_pcie *ctrl = dev_get_drvdata(dev); + + if (!ctrl || IS_ERR_OR_NULL(ctrl->gpiod_wakeup) || ctrl->wakeup_irq <= 0) + return 0; + ctrl->wake_armed = device_may_wakeup(dev) && !enable_irq_wake(ctrl->wakeup_irq); + return 0; +} + +static int sprd_pcie_pm_resume(struct device *dev) +{ + struct sprd_pcie *ctrl = dev_get_drvdata(dev); + + if (ctrl && ctrl->wake_armed) { + disable_irq_wake(ctrl->wakeup_irq); + ctrl->wake_armed = 0; + } + return 0; +} + static const struct dev_pm_ops sprd_pcie_pm_ops = { .prepare = sprd_pcie_pm_prepare, + SET_SYSTEM_SLEEP_PM_OPS(sprd_pcie_pm_suspend, sprd_pcie_pm_resume) SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(sprd_pcie_suspend_noirq, sprd_pcie_resume_noirq) }; diff --git a/upstream/port/drivers/pci/controller/dwc/pcie-sprd.h b/upstream/port/drivers/pci/controller/dwc/pcie-sprd.h index e2ce1891..dea3e42a 100644 --- a/upstream/port/drivers/pci/controller/dwc/pcie-sprd.h +++ b/upstream/port/drivers/pci/controller/dwc/pcie-sprd.h @@ -109,6 +109,8 @@ struct sprd_pcie { unsigned int is_suspended:1; struct regulator *vpower; unsigned int is_wakedown:1; + /* WAKE# armed as a system wakeup for this sleep (power/wakeup enabled) */ + unsigned int wake_armed:1; /* when pci enter suspend cannot reinit the pci */ unsigned int reinit_disable:1; diff --git a/upstream/port/drivers/watchdog/ump9620-pmic-wdt.c b/upstream/port/drivers/watchdog/ump9620-pmic-wdt.c index ce05602a..726efd0c 100644 --- a/upstream/port/drivers/watchdog/ump9620-pmic-wdt.c +++ b/upstream/port/drivers/watchdog/ump9620-pmic-wdt.c @@ -4,6 +4,11 @@ * Android, the PM co-processor firmware takes it over. Mainline has no PM firmware, so this driver takes it over * instead: it shortens the timeout and lets the watchdog core ping it until userspace opens /dev/watchdog. A hard * hang then resets the board, and LK falls back to Android. MU300 bring-up driver. + * + * The watchdog runs on the PMIC's 32 kHz clock and keeps counting while the AP sleeps, where nothing pings it + * (Android has the PM co-processor feed it): a system sleep longer than the timeout reset the board (FINDINGS 37). + * It is stopped as the last thing before the sleep and armed again, with a fresh count, as the first thing after + * it - the vendor's sprd_wdt does the same for the AP watchdog. */ #include #include @@ -30,6 +35,7 @@ struct ump9620_wdt { struct watchdog_device wdd; struct regmap *map; u32 base; + bool suspended; /* stopped for a system sleep, to be armed again on resume */ }; static int ump9620_wdt_load(struct ump9620_wdt *w, unsigned int timeout) @@ -88,6 +94,36 @@ static int ump9620_wdt_set_timeout(struct watchdog_device *wdd, unsigned int t) return ump9620_wdt_ping(wdd); } +static int ump9620_wdt_suspend_noirq(struct device *dev) +{ + struct ump9620_wdt *w = dev_get_drvdata(dev); + u32 ctrl = 0; + + regmap_read(w->map, w->base + WDT_CTRL, &ctrl); + w->suspended = ctrl & WDT_CNT_EN; + if (w->suspended) + ump9620_wdt_ctrl(w, false); + return 0; +} + +static int ump9620_wdt_resume_noirq(struct device *dev) +{ + struct ump9620_wdt *w = dev_get_drvdata(dev); + int ret; + + if (!w->suspended) + return 0; + w->suspended = false; + ret = ump9620_wdt_load(w, w->wdd.timeout); + if (ret) + dev_warn(dev, "reload after the sleep: %d\n", ret); + return ump9620_wdt_ctrl(w, true); +} + +static const struct dev_pm_ops ump9620_wdt_pm_ops = { + NOIRQ_SYSTEM_SLEEP_PM_OPS(ump9620_wdt_suspend_noirq, ump9620_wdt_resume_noirq) +}; + static const struct watchdog_info ump9620_wdt_info = { .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE, .identity = "UMP9620 PMIC watchdog", @@ -133,6 +169,7 @@ static int ump9620_wdt_probe(struct platform_device *pdev) return ret; } + platform_set_drvdata(pdev, w); ret = devm_watchdog_register_device(&pdev->dev, &w->wdd); if (ret) return ret; @@ -148,7 +185,7 @@ static const struct of_device_id ump9620_wdt_match[] = { static struct platform_driver ump9620_wdt_driver = { .probe = ump9620_wdt_probe, - .driver = { .name = "ump9620-wdt", .of_match_table = ump9620_wdt_match }, + .driver = { .name = "ump9620-wdt", .of_match_table = ump9620_wdt_match, .pm = pm_sleep_ptr(&ump9620_wdt_pm_ops) }, }; module_platform_driver(ump9620_wdt_driver); MODULE_DESCRIPTION("UMP9620 PMIC watchdog"); diff --git a/upstream/port/install.py b/upstream/port/install.py index faa0b447..71e50604 100644 --- a/upstream/port/install.py +++ b/upstream/port/install.py @@ -48,8 +48,16 @@ def once(marker, old, new): global m if marker not in m: m = m.replace(old, new, 1) +# The UMP9620's BC1.2 result (CHARGE_STATUS, Unisoc's sprd-bc1p2.h) is at 0x239c, with the SC27xx bits (DONE 11, SDP 7, +# DCP 6, CDP 5). The first version of this edit pointed it at the SC2730's 0x1b9c, where detection never finished on +# the U30 Air: a tree prepared with that is corrected. +UMP9620_DATA = ('/* UMP9620 BC1.2 status (CHARGE_STATUS) */\n#define SPRD_UMP9620_CHG_DET\t\t0x239c\n\n' + 'static const struct sprd_pmic_data ump9620_data = {\n\t.irq_base = 0x80,\n\t.num_irqs = 11,\n' + '\t.charger_det = SPRD_UMP9620_CHG_DET,\n};\n') +m = m.replace('static const struct sprd_pmic_data ump9620_data = {\n\t.irq_base = 0x80,\n\t.num_irqs = 11,\n' + '\t.charger_det = SPRD_SC2730_CHG_DET,\n};\n', UMP9620_DATA) once('ump9620_data = {', 'static const struct sprd_pmic_data sc2731_data = {', - 'static const struct sprd_pmic_data ump9620_data = {\n\t.irq_base = 0x80,\n\t.num_irqs = 11,\n\t.charger_det = SPRD_SC2730_CHG_DET,\n};\n\nstatic const struct sprd_pmic_data sc2731_data = {') + UMP9620_DATA + '\nstatic const struct sprd_pmic_data sc2731_data = {') if 'enum sprd_pmic_type' not in m: # up to 6.x: the match data is the pmic data, and the DT's sub-nodes are populated as they are once('"sprd,ump9620"', '\t{ .compatible = "sprd,sc2731", .data = &sc2731_data },\n', @@ -262,10 +270,28 @@ t = open(rp).read() if 'ump96xx-rtc' not in t: t = t.replace('\t{ .compatible = "sprd,sc2731-rtc", },\n', '\t{ .compatible = "sprd,sc2731-rtc", },\n\t{ .compatible = "sprd,ump96xx-rtc", },\n', 1) open(rp, 'w').write(t) +# The ZTE U30 Air's charger (SGM41511, a bq25601): its vendor DT compatible in bq256xx's OF and I2C tables; the +# driver's handling of that node (no IRQ, no input current in the DT, the chip as Android left it) is patch 0009. The +# I2C table is an edit rather than part of the patch: 6.18 writes its entries positionally, 7.x with .name/.driver_data. +bp = os.path.join(tree, 'drivers/power/supply/bq256xx_charger.c') +t = open(bp).read() +if '"ti,bq2560x_chg"' not in t: + t = t.replace('\t{ .compatible = "ti,bq25601", .data = &bq256xx_chip_info_tbl[BQ25601] },\n', + '\t{ .compatible = "ti,bq25601", .data = &bq256xx_chip_info_tbl[BQ25601] },\n' + '\t{ .compatible = "ti,bq2560x_chg", .data = &bq256xx_chip_info_tbl[BQ25601] },\n', 1) +if '"bq2560x_chg"' not in t: + for line in ('\t{ "bq25601", (kernel_ulong_t)&bq256xx_chip_info_tbl[BQ25601] },\n', + '\t{ .name = "bq25601", .driver_data = (kernel_ulong_t)&bq256xx_chip_info_tbl[BQ25601] },\n'): + # the I2C table comes first; the ACPI table has the same positional line further down + i = t.find(line, t.index('bq256xx_i2c_ids[]')) + if i >= 0 and i < t.index('MODULE_DEVICE_TABLE(i2c'): + t = t[:i + len(line)] + line.replace('"bq25601"', '"bq2560x_chg"') + t[i + len(line):] + break +open(bp, 'w').write(t) # Every edit above is a text substitution, and one whose anchor drifted in a new kernel release changes nothing # without saying so. Check the result rather than trusting the substitutions. expect = [ - ('drivers/mfd/sprd-sc27xx-spi.c', ['ump9620_data = {', '"sprd,ump9620"', '.name = "ump9620"'] + ('drivers/mfd/sprd-sc27xx-spi.c', ['ump9620_data = {', '.charger_det = SPRD_UMP9620_CHG_DET,', '"sprd,ump9620"', '.name = "ump9620"'] + (['case PMIC_TYPE_UMP9620:', 'if (pmic_type == PMIC_TYPE_UMP9620) {', 'linux/of_platform.h'] if 'enum sprd_pmic_type' in open(os.path.join(tree, 'drivers/mfd/sprd-sc27xx-spi.c')).read() else [])), ('drivers/mmc/host/sdhci-sprd.c', ['MU300: only the eMMC and the card slot', 'MU300: CD GPIO deferred', 'of_remove_property(pdev->dev.of_node, cd)', 'DLL_PHASE_INTERNAL\t0x2 /* MU300 r11p3 */', @@ -274,6 +300,8 @@ expect = [ ('drivers/rtc/rtc-sc27xx.c', ['"sprd,ump96xx-rtc"']), ('drivers/usb/dwc3/dwc3-of-simple.c', ['"sprd,qogirn6pro-dwc3"']), ('drivers/usb/dwc3/core.c', ['"snps,sprd-dwc3"']), + ('drivers/power/supply/bq256xx_charger.c', ['"ti,bq2560x_chg", .data = &bq256xx_chip_info_tbl[BQ25601]', + '"bq2560x_chg", ']), # the I2C entry, in either form ] missing = [(p, w) for p, ws in expect for w in ws if w not in open(os.path.join(tree, p)).read()] if missing: