Skip to content

mmsd-tng 2.6.4, omamobile-modem-sit, omamobile-mmd: picture messages over the internet bearer, on main by itself - #697

Draft
W4HO-ham wants to merge 10 commits into
derekross:mainfrom
W4HO-ham:tegu-mms
Draft

W4HO-ham wants to merge 10 commits into
derekross:mainfrom
W4HO-ham:tegu-mms

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

The picture-message work from #380, on main by itself, as you asked there: the five commits that were #380's own, picked onto today's main without the call-tuning stack (#374, #376, #378) under them. They applied without a conflict. #380 can close once this is the one you read.

  • sitd: an MMS notification is a WAP push, often in several parts, and only the first part carries the WAP port. Stored parts keep their port (old partial records are migrated), and a joined binary message is delivered as data only when its port is the WAP push one. sitd's status for authorised clients also carries the internet bearer's device (the one omamobile-sit-data found), address and DNS. state.json doesn't.
  • mmd: the internet bearer gets that device as Interface, plus its address and the carrier's DNS in Ip4Config, readable on the system bus as with ModemManager. The interface stays empty until sitd reports its device, and the IP configs always carry a method. mmsd-tng binds to that device and resolves the MMSC through those servers, so MMS goes over cellular with Wi-Fi up, without touching the system's routes or DNS.
  • mmsd-tng 2.6.4 for aarch64, with four small patches and meson test in check(). Nothing is enabled and no carrier settings ship.

On the palmtop's carrier the MMS APN is the internet APN; a carrier with a separate MMS APN isn't supported yet.

Run on the palmtop. TELEPHONY-APPS-PLAN 1.7 has the receive of 2026-11-03: a picture fetched over rmnet0 with Wi-Fi up, from a hand build of mmsd-tng. On 2026-11-11 the package itself was built on the palmtop (native aarch64, the pinned source, all four patches, 33 of 33 targets, 4 of 4 meson test cases; the log is on #380) and installed. Still owed, and I'll add it here: the line you asked for, mmsd-tng installed from the built package with its user unit reaching the session bus on that install. The palmtop is in a sleep series today with the modem off; it comes this evening.

Your two notes from #380. omamobile-mmd changes here without a version change: please set it at merge with the others. And the patches: none of the four has gone upstream yet. The two behaviour ones (closing the socket when the interface bind fails, and using the configured number when the modem reports no own numbers) are fixes I think they'd take, and I'll send them.

It reaches the 7 Pro too (the bearer's Interface starts empty, the IP configs are new), so it waits for your attended run there, as you said.

Tests on this branch: tests/packages omamobile-modem-sit omamobile-mmd mmsd-tng (all three suites pass) and tools/pr-check origin/main.

…r's address for the bridge

An MMS notification is a WAP push, often in several parts, and only the first part carries the WAP port. Stored parts now keep their port (old partial records are migrated), and a joined binary message is delivered as data only when its port is the WAP push one; any other is replaced by a short notice. The codec keeps a binary part without a port when it's one of a concatenated set.

sitd's status for authorised clients now carries the internet bearer's device (the one omamobile-sit-data found), address and DNS, so the bridge can give mmsd-tng the bearer it fetches MMS over where the MMS APN is the internet APN. state.json doesn't carry them; the bridge's Ip4Config, like ModemManager's, is readable on the system bus.

(cherry picked from commit 35d7a1e)
…-tng

mmsd-tng fetches MMS over a ModemManager bearer whose APN is the MMS APN, binds to its Interface and resolves the MMSC through the DNS in its Ip4Config. Where the MMS APN is the internet APN, that's the internet bearer, so the bridge now gives it the device omamobile-sit-data found (rmnet0 until sitd knows) and, while data is up, its address and the carrier's DNS from sitd's status.

(cherry picked from commit 7b2622d)
…t bearer

mmsd-tng 2.6.4 for aarch64 from upstream's tag, with four small patches (the own number when ModemManager exports none, a socket closed on a failed interface bind, modern libphonenumber linkage) and meson test in check(). Nothing is enabled and no carrier settings ship; the example config is the owner's to fill in.

TELEPHONY-APPS-PLAN 1.7 now says what's ready for MMS on the 9a, where the MMS APN is the internet APN and MMS goes over the internet bearer, and gives an attended runbook, receive first.

(cherry picked from commit 876e407)
… MMS received

mmsd-tng logged "Couldn't create IP config from dictionary: 'method not given'" for the bearer's empty Ip6Config. An empty config is now method 0 (unknown), as libmm-glib expects. TELEPHONY-APPS-PLAN records the first picture received on the palmtop over the internet bearer.

(cherry picked from commit 388eed8)
… reports its device

Before sitd had reported a device, the bridge named rmnet0. On the 7 Pro, with a different attach APN, rmnet0 can briefly be another bearer's device, so mmsd-tng could bind to the wrong one. MM itself leaves a bearer's interface empty until it has one.

(cherry picked from commit c1fc4a9)
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

A correction to the description, on the patches going upstream: I wrote that I'd send the two behaviour ones. Not for now. The owner has no account on GitLab, where mmsd-tng lives, so none of the four has been sent and none is on its way. They stay as patches in the package; if that changes I'll say so here.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

An update on the patches going upstream: the owner made a GitLab account after all, and the two behaviour fixes are offered to mmsd-tng now, each rebuilt on its current master (33 of 33 targets, meson test 4 of 4): mmsd!133, the configured number when the modem reports none, and mmsd!134, closing the socket when the interface bind fails. The other two patches (the libphonenumber link line and the redacted-IMSI number parsing) are ours to carry.

@derekross

Copy link
Copy Markdown
Owner

Thank you for bringing the picture-message work onto main by itself. It reads much more easily as five commits than it did on top of the call-tuning stack, and I like how it is built: nothing is enabled, no carrier settings ship, the address stays out of state.json, MMS is bound to the bearer's own device with the bearer's DNS so the system's routes and resolver are left alone, and a failed bind now closes the socket. Thank you also for offering the two behaviour fixes to mmsd-tng.

This is my first full read of it. I checked the package by hand, since CI can't build it: upstream's 2.6.4 archive has the checksum in the PKGBUILD, the four patches apply with no fuzz in prepare()'s order, and the licence field matches the sources. I also checked the choice from my earlier note, an empty Interface until the device is known: libmm-glib hands an empty interface to mmsd-tng as none, and mmsd-tng treats that as "interface down", so it fails closed.

What I'd like before it leaves draft:

  1. Interface can still be a device that is only being tried. sitd takes it from /run/omamobile-sit/data-interface, and omamobile-sit-data writes that file before it probes each candidate (so a killed run can be cleaned up) and removes it if the candidate doesn't answer. I ran find_device() with rmnet0 and rmnet1 and a probe only rmnet1 passes: during the first probe the status reported rmnet0. That is the Pixel 7 Pro's case from 11-02, and a probe can take several seconds. Could the status report only a device the data service has kept (a second record written after "carried by", for example), with a test that reads the status while a probe is in flight?
  2. Tests for the new message rules. I changed three conditions one at a time and all 257 tests still passed: ports != {2948} in service.py replaced by "never", and in sms_codec.py the alphabet==1 term and the compressed-message term removed. "Delivered as data only when its port is the WAP push one" is what keeps other binary messages away from mmsd-tng, on every phone, so I'd like it pinned: a concatenated 8-bit message with no port in any part, one whose first part names another port, and a case for each of the two codec terms.
  3. mmd's dependency. I'll set both version numbers at merge, as you ask. Please make omamobile-mmd depend on the modem-sit version that reports the bearer (I'll fill in the number): a new bridge on an older sitd would leave Interface empty for good.
  4. The run on the palmtop from this head, the one you say is still owed: uname -r, pacman -Q omamobile-modem-sit omamobile-mmd mmsd-tng, the bearer's Interface next to /run/omamobile-sit/data-interface (address and DNS redacted), the user unit owning org.ofono.mms, one picture received with Wi-Fi up, and a tools/phone-smoke report from that boot.
  5. A container build of mmsd-tng. Once this merges, the nightly builds every directory under packages/, under emulation, and a failed build stops the publish for every phone. It also skips check(), so meson test wouldn't run there. The palmtop's native build is the only one on record. Could you run tools/build-packages --local tegu --check-in-container packages/mmsd-tng and post the end of the log? It writes to its own out/tegu/ (run tools/local-key-init tegu first if you have no local key yet).

Some smaller things, as you see fit:

  • On main a multi-part MMS notification shows in Messages as "Received a multimedia or binary message that this phone cannot display yet." With this change it becomes a message with data and no text. On a phone without mmsd-tng, what does Messages show then? If the answer is nothing, I'd keep the placeholder until something consumes the data.
  • Does anything in the apps (omatel-agent, omaphone, omamessages) read the bearer's Interface? Nothing in this repository does, but it changes from a constant rmnet0 to empty and then the device on every phone.
  • The README points at section 1.7b of the plan, which has only 1.7, and its paragraph on the AUR recipe could shrink to one sentence. The plan says "(mmsd-tng 2.6.4, omamobile-modem-sit, omamobile-mmd: picture messages on the Pixel 9a over the internet bearer #380)" in three places where it now means this pull request.
  • The patches are numbered 0001, 0002, 0004, 0005.
  • The README could name mmsd!133 and mmsd!134, so the next bump knows which patches to drop.

After that it's my turn: this changes the phone service and the bridge on the Pixel 7 Pro too (the database gains a column, the binary-message path, the bearer's properties), so I'll run it there before I merge: a text and a long text each way, a call, the bearer's device against the recorded one, cellular data with Wi-Fi off, and a picture sent to it to see what Messages shows.

One thing I still have to decide on my side is whether our repository should publish mmsd-tng before Messages can use it. I'll tell you here.

…tests for the binary-message rules

omamobile-sit-data writes data-interface before it probes a candidate, so
that a killed run can be cleaned up, and sitd's status read that file: for
the seconds of a probe it reported a device that might not carry the
bearer (rmnet0 on the Pixel 7 Pro, where rmnet1 does). The data service
now writes a second record, data-interface-kept, only once a candidate has
answered, removes it before it takes the configuration down, and the
status reads that one. A test reads the status during each probe.

Tests pin what goes on as data: a concatenated 8-bit message with no port
in any part, or with another port in its first part, is not data; nor is a
WAP push in the reserved alphabet or with compressed content. Each fails
when its condition is removed.
…s installed

omatel-agent leaves a message with data and no text for the MMS service,
so on a phone without mmsd-tng a picture message's notification showed
nothing in Messages. On main only a multi-part one showed the "cannot
display yet" placeholder, because its later parts decoded as text; with
whole pushes delivered as data that went too. The bridge now exports the
placeholder as the text, with no data, unless /usr/bin/mmsdtng exists.
--mms-daemon sets that path for the tests.
…ream merge requests, the bridge's dependency

The patches are numbered 0001 to 0004, and the README says which two are
offered upstream (mmsd!133, mmsd!134), so the next version bump knows what
to drop; its paragraph on the AUR recipe is one sentence, and it points at
section 1.7. The plan says derekross#697 where it said derekross#380. omamobile-mmd depends
on the modem-sit that reports the bearer; the number is a placeholder for
the one set at merge.
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Thank you for the full read. Three commits on top, 869caa0, e5f1764 and 50e1a31.

  1. Interface only for a kept device. omamobile-sit-data now writes a second record, data-interface-kept, after "carried by", and removes it before it takes the configuration down; clear_stale removes it too. The status reads that record, so a candidate being probed is never reported. The test is your case: rmnet0 tried first and not answering, rmnet1 answering, with the status read inside each probe (empty both times) and right after the record is written (rmnet1). It fails with the status back on data-interface, and with the write removed.

  2. Tests for the message rules. A concatenated 8-bit message with no port in any part, and one whose first part names port 0x1584, both end as "Received an unsupported binary message." with no data. In the codec, the WAP push header under the reserved alphabet (0x0c) and under compressed content (0x24 and 0x20) is not data, and an 8-bit part without a port is data only when it is a concatenated part. I made your three changes one at a time: ports != {2948} as "never" fails two tests, and each codec term removed fails one.

  3. mmd's dependency. omamobile-modem-sit>=0.3.36, a placeholder for the number you set.

  4. The run on the palmtop is still owed. The palmtop is in a sleep series for linux-omarchy-mobile#247 until this afternoon; the run from this head comes after it, with the modem up.

  5. The container build. It passes, with one difference from what you asked: this laptop has no container engine running, so it ran in my aarch64 build VM, natively in the Arch Linux ARM container and not under emulation. In a scratch copy of this head I let alarm_require_binfmt pass on an aarch64 host; nothing else was changed. So it shows the recipe and check() in the container, not that the tests keep inside their timeouts under qemu. The end of tools/build-packages --local tegu --check-in-container packages/mmsd-tng:

    ==> mmsd-tng 2.6.4-1
    Ok:                4
    Fail:              0
    ok - pinned source, patches, aarch64 recipe and opt-in configuration
    ==> Finished making: mmsd-tng 2.6.4-1 (Fri Nov 13 16:49:16 2026)
        mmsd-tng-2.6.4-1-aarch64.pkg.tar.zst
    ==> Signing and indexing out/tegu/repo/aarch64
    

The smaller ones:

  • What Messages shows without mmsd-tng: nothing. omatel-agent leaves a message with data and no text for the MMS service (apps/omatel-agent/src/sms.rs, "left for the MMS service"), which is also what happens on main to a single-part notification; only the multi-part one showed the placeholder, because its later parts decoded as text. So I kept the placeholder in the bridge: where /usr/bin/mmsdtng doesn't exist, a data-only message is exported with the "cannot display yet" text and no data. That is wider than what main does, since a single-part notification now shows the placeholder too on a phone without mmsd-tng. If you'd rather keep it to the multi-part case, say so and I'll move it into sitd's join.
  • Nothing in the apps reads the bearer's Interface. I searched omatel (the agent and its crates), omaphone and omamessages at their current heads for the property and for rmnet: no reader.
  • The README points at 1.7, names mmsd!133 (patch 0001) and mmsd!134 (0002) and says 0003 and 0004 aren't offered upstream yet, and its AUR paragraph is one sentence. The plan says mmsd-tng 2.6.4, omamobile-modem-sit, omamobile-mmd: picture messages over the internet bearer, on main by itself #697. The patches are 0001 to 0004.

Both packages' test/all pass on this head (modem-sit 263 tests, mmd with the new bridge test), and tools/pr-check is clean.

….3.36

Main took 0.3.36 for nr_after_radio_on, so the status that names the internet bearer's device, address and DNS is 0.3.37, and the bridge depends on that one.
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

The palmtop run from this head (item 4), 2026-11-13.

First, what moved on the branch since your review: main took omamobile-modem-sit 0.3.36 for nr_after_radio_on, so I merged main and set this branch's sitd to 0.3.37, with omamobile-mmd depending on >=0.3.37 (24bbeb5). Change the numbers at merge as you see fit; I only didn't want the bridge to accept main's 0.3.36, which doesn't report the bearer.

The run: the three packages built on the palmtop from 24bbeb5 and installed with the modem off, then a clean reboot, so the modem, sitd and the bridge started at boot from them.

$ uname -r
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty
$ pacman -Q omamobile-modem-sit omamobile-mmd mmsd-tng
omamobile-modem-sit 0.3.37-1
omamobile-mmd 0.1.4-1
mmsd-tng 2.6.4-1

The bearer next to the data service's records (LTE, IMS registered, Wi-Fi connected):

/run/omamobile-sit/data-interface:       rmnet0
/run/omamobile-sit/data-interface-kept:  rmnet0
Bearer/0 Interface   s "rmnet0"
Bearer/0 Connected   b true
Bearer/0 Ip4Config   a{sv} 5 "method" u 2 "address" s "<ip>" "prefix" u 32 "dns1" s "<ip>" "dns2" s "<ip>"

mmsd-tng.service started by hand as the session user (systemctl --user start, with the settings file from the 11-03 run), and the owner of org.ofono.mms:

Comm=mmsdtng
Unit=user@1000.service
UserUnit=mmsd-tng.service

Pictures received with Wi-Fi up: two. The owner sent two pictures from an iPhone a few minutes earlier, while the palmtop was between reboots. On this boot the bridge listed the two WAP pushes at 15:11:13, a second after sitd reported IMS SMS registered (it had listed them on the boot before too, where mmsd-tng wasn't started and omatel-agent logged "binary SMS (WAP push): left for the MMS service"). mmsd-tng started at 15:12:40 and had both fetched by 15:12:48:

  • 407,363 and 561,626 bytes on disk, state=received, each with an image/jpeg attachment in GetMessages;
  • the default route was Wi-Fi the whole time (wlan0 metric 600, connected), and rmnet0 counted 1,037,089 bytes received in the boot, which is the two messages: they came over the bearer's device, not over Wi-Fi.

I haven't looked at what Messages shows for them; that is the apps' side.

tools/phone-smoke from that boot (its "new dmesg errors" row is three Wi-Fi and PCIe lines of the daily kernel, nothing from this change):

phone-smoke: tegu

Kernel 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, tools at 6649b766, 2026-11-13T22:13Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, slot b, up 154s
storage guard (required) ok 62 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 88G free
kernel health (required) ok no oops or BUG; 1 WARN, 191 error lines in dmesg (185 known, of them cpif message for a channel nobody opened x9, 6 new)
new dmesg errors not ok pcieport N:N:N: of_irq_parse_pci: failed with rc=N x1; brcmfmac: brcmf_c_process_txcap_blob: TxCap blob found, loading x1; brcmfmac N:N:N: of_irq_parse_pci: failed with rc=N x1
systemd units ok none failed
USB gadget (required) ok bound to 11210000.usb
display ok card1-DSI-1 connected, 1080x2424
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked true)
touch ok Synaptics TouchComm Touchscreen
buttons ok gpio-keys
Wi-Fi ok wlan0 on brcmfmac, link up
Bluetooth ok hci0, powered true
battery ok 88% Unknown, 33 °C
sound cards ok googleteguaocsn
sensors ok Accelerometer AmbientLight Proximity
cameras ok 3 listed by libcamera
thermal ok hottest zone 44 °C

Packages: hyprland 0.57.0-3.3, libcamera 0.7.2-4.23, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.18-1, omamobile-device-tegu 0.2.16-1, omamobile-fingerprint 0.1.17-1, omamobile-firstboot 0.1.4-1, omamobile-gnss 0.2.9-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-mmd 0.1.4-1, omamobile-modem 0.1.20-1, omamobile-modem-sit 0.3.37-1, omamobile-omarchy 0.1.43-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.127-1, omamobile-telephony-tegu 0.1.0-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1.1

@derekross

Copy link
Copy Markdown
Owner

Thank you. All five points are answered, and the run from this head is what I asked for: built from 24bbeb5, started at boot, the bearer's Interface next to both records, the daemon on the session bus, and two pictures fetched over rmnet0 while Wi-Fi was the default route. The kept-device record is the right fix for the probing window.

What's left is mostly mine:

  1. Whether our repository publishes mmsd-tng now. I said I'd tell you and haven't. It's a daemon we'd build from an archive on a host our builds don't use today, so I want to look at that on the build machine myself first. I checked the pin today: the archive hashes to the PKGBUILD's value and so do the four patches. One thing I can't see from your log is the build under emulation, which is how the nightly would build it; I'll run that on the build machine before I decide. If I'd rather hold the package for now, the phone service and bridge halves can still land first.
  2. The placeholder. Please keep it to the multi-part case, as on main, by moving it into sitd's join; I'd rather not change what a single-part notification shows on phones without the daemon in the same step.
  3. Versions. They're mine to set, but note what has happened since: main is at 0.3.43 and three open pull requests take the next numbers, so omamobile-modem-sit>=0.3.37 in mmd's depends is now met by a published package that doesn't report the bearer. At merge the dependency gets the number this lands as, and omamobile-mmd gets 0.1.5.
  4. A rebase. It conflicts with main in lib/data_network.py (the route's sleep hold changed there), and omamobile-modem-sit 0.3.44: an IMS bearer the network ended no longer blocks the internet bearer's reconnect #881 and omamobile-modem-sit 0.3.45: mobile data back at once after a wake with no Wi-Fi, and a reconnect that comes back IPv6 only tried again #837 will land in the same two files first. Please wait for those two and rebase once; both packages' test/all on the result.
  5. My Pixel 7 Pro run, as I listed it, after the rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants