Repository navigation
Conversation
On T-Mobile US the FM350 answers +CGCONTRDP with an empty bearer id. The generic parser the forward-port switched to requires a number there, so every first connection failed after +CGACT had activated the attach bearer. Every retry was then refused with CME error 5847, because that context was still active, until the module was reset. The bearer now parses the answer itself, as BELABOX's plugin did: lines by cid and address family, dotted-decimal IPv6, quoted fields with commas, the MTU, and the older layout with a separate subnet field. IPv4 and IPv6 DNS come from their own lines and a malformed line is skipped. An answer without a usable line only logs a warning, since +CGPADDR already gave the address; an error answer, cancellation or timeout still fails the connection. The change is folded into patch 0001, so the series stays at three patches. The patch contract now also requires the bearer's own parser and its empty-bearer-id test.
The +CGCONTRDP fix connected on T-Mobile US on the first attempt, and two disconnect and reconnect cycles with an unchanged profile were not refused with CME error 5847. The ADR and the MR draft no longer list the hardware check as pending.
Author
|
I tested this on hardware now: an FM350-GL on firmware 81600.0000.00.29.18.01 with a T-Mobile US SIM, running this series built for arm64. The first connection after boot came up on attempt 1, and DNS and HTTPS over IPv4 worked. Two disconnect and reconnect cycles were not refused with 5847. I added a docs commit that records this in the ADR and the MR draft, and updated the description. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Affected repo & language: modem-stack · C (ModemManager patch 0001)
What
This fixes FM350-GL data connections on T-Mobile US networks. The module answers
+CGCONTRDPwith an empty bearer id, and the generic ModemManager parser that patch 0001 uses rejects that answer. So the first connection fails right after+CGACThas activated the attach context, every retry then fails with+CME ERROR: 5847, and the modem never comes up on that carrier.+CGCONTRDPitself: lines matched by cid and address family, an empty bearer id, IPv6 in dotted decimal, quoted fields that contain commas, the MTU, and the older layout with a separate subnet field.+CGPADDRhas already given the address (IPv4 then falls back to a /32 with the address as gateway and no DNS). An error answer, cancellation or timeout still fails the connection, as before.Why
In my tests on an FM350-GL (firmware 81600.0000.00.29.18.01, USB RNDIS) with a SIM on T-Mobile US, ModemManager picks the attach context (cid 0).
+CGACT=1,0and+CGPADDR=0succeed with an IPv4 and an IPv6 address, then+CGCONTRDP=0returns+CGCONTRDP: 0,,"wholesale",...with the bearer id left empty, one line per IP family. The parser requires a number there and fails with "Couldn't match +CGCONTRDP response". On every retry ModemManager rewrites the attach context's PDP type and activates it again, and the module refuses each with 5847. It happened the same way on every boot. On Verizon,+CGCONTRDP=<cid>came back with the bearer id filled in my captures, which is why this showed up on T-Mobile first.BELABOX's original plugin split this answer on commas and never needed the bearer id. The 1.24 forward-port lost that when it switched to the generic parser, so this restores what the carried plugin did. The fix is folded into patch 0001, the same way the earlier
ATZ0fix was, so the series stays at three patches. Its DEP-3 header and the ADR describe the regression.How to verify
Commands and results
modemmanager_1.24.2.orig.tar.xz(sha256 fromupstream-pins.yaml) and build in Debian trixie withmeson setup -Dtests=true, thenmeson test: 32 of 32 pass, with no compiler warnings.test-plugin-fm350glhas 18 cases, including the T-Mobile and Verizon answers as captured (addresses replaced with documentation ranges), the older separate-subnet layout, and a malformed line next to a good one. The same test is clean under ASan and UBSan.test_cgcontrdp_responseinsrc/tests/test-modem-helpers.con the current series fails with "Couldn't match +CGCONTRDP response", the same error the module produces in the field.packaging/ci/contract.shpasses. The new FM350 contract check fails against the current patch.+CGACT=0,0and the next+CGACT=1,0both answered OK. One of those re-activations was granted IPv6 only, which parsed fine; the other got IPv4 and IPv6 again.Risks
The change only affects the FM350-GL USB/RNDIS plugin's IP setup. On networks where
+CGCONTRDPalready parsed, the new parser reads the same fields. If it can't use an answer, the connection still comes up with the+CGPADDRaddress and no DNS rather than failing. The network may grant IPv6 only on a re-activation, as it did once in my test; that is up to the carrier and outside the plugin. Rollback is reverting these commits.Checklist