Repository navigation
Conversation
On T-Mobile US the FM350 answers +CGCONTRDP with an empty bearer id and one line per IP family. The generic parser the forward-port switched to requires a number there, so every first connection failed after +CGACT had activated the attach bearer, and every retry was refused with CME error 5847 because that context was still active. The bearer now parses the answer itself (by cid and address family, dotted-decimal IPv6, quoted fields with commas, MTU), takes IPv4 and IPv6 DNS from their own lines, and only warns when the answer is missing or unparsable, since +CGPADDR already gave the address. A +CGACT=1 refused with 5847 reuses the context when +CGACT? reports it active. 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.
Author
|
Superseded by the upstream PR CERALIVE#36, which carries the lenient +CGCONTRDP parser from this branch after review. The reuse of an already active context on CME error 5847 was dropped there because it could not reliably tell which APN the active context belonged to. |
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.
This fixes FM350-GL data connections on T-Mobile US. The module answers
+CGCONTRDPwith an empty bearer id, which the generic ModemManager parser rejects, so the first connection fails right after+CGACTsucceeds. The attach bearer stays active, and every retry is then refused with+CME ERROR: 5847until the module is reset. BELABOX's original plugin tolerated this answer; the 1.24 forward-port in patch 0001 lost that when it switched to the generic parser.+CGCONTRDPitself: lines matched by cid and address family, empty bearer id, IPv6 in dotted decimal, quoted fields that contain commas, and the MTU field.+CGCONTRDPonly logs a warning, since+CGPADDRalready gave the address (IPv4 falls back to a /32 with the address as gateway and no DNS).+CGACT=1,<cid>fails with 5847 and+CGACT?reports that cid active, the bearer reuses the context.+CGPADDRstill has to return an address of the requested family.The change is folded into patch 0001, the same way the earlier
ATZ0fix was, so the series stays at three patches. Its DEP-3 header describes the new parts, and the ADR has a new section on the regression. The patch contract now also fails if the bearer goes back to the generic parser or loses the regression test.Testing and limits
modemmanager_1.24.2.orig.tar.xz(sha256 checked) and gives exactly the tree I built and tested.-Wall -Wextra, no new warnings.test-plugin-fm350gl: 16/16, including the T-Mobile and Verizon answers (addresses replaced with documentation ranges), all-contexts output with IMS lines, the oldaddr.masklayout, malformed input and the 5847 classification. Also clean under ASan, UBSan and LeakSanitizer.meson test: 31 of 32 pass.test-plugin-genericfails in that container both before and after this change, because it needs a running daemon.packaging/ci/contract.shpasses in a trixie container. The new contract checks fail against the old patch.+CGPADDR) to carry data. IPv6 over RNDIS needed SLAAC on the host in earlier manual tests, so it needs a separate check.