feat: replace ModemManager with pure Python AT state machine#37439
Open
juzigu40-ui wants to merge 3 commits intocommaai:masterfrom
Open
feat: replace ModemManager with pure Python AT state machine#37439juzigu40-ui wants to merge 3 commits intocommaai:masterfrom
juzigu40-ui wants to merge 3 commits intocommaai:masterfrom
Conversation
ed27aed to
f415e8b
Compare
f415e8b to
46689ad
Compare
…sd/hardware fallback
46689ad to
402de5b
Compare
Author
|
Updated this PR with a copy/paste validation runbook:
Also pushed a |
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 PR replaces ModemManager AT-command handling with a pure Python AT state machine.
What is implemented
Dual-chip support (EG25 + EG916) with one state machine
ATI.No D-Bus dependency in the pure modem path + shared-memory state export
/dev/shm/modem_state.txt(e.g.CONNECTING,CONNECTED).WiFi-over-LTE route priority
Fast cold-boot path
AT+CGATT=1,AT+CGACT=1,1) to prioritize first connectivity.Files
system/hardware/tici/pure_python_modem.pysystem/hardware/tici/hardware.pysystem/qcomgpsd/at_port_interceptor.pysystem/hardware/tici/tests/test_pure_python_modem.pytests/test_pure_python_modem.pyLocal tests
pytest -q --noconftest -o addopts='' tests/test_pure_python_modem.py4 passedCommunity Validation Runbook (Copy/Paste)
1) No-hardware smoke (simulated state machine)
cd openpilot python3 system/hardware/tici/pure_python_modem_dry_run.py --simulate --simulate-transient-fail --state-path /tmp/modem_state_dry_run.txt --jsonExpected result:
result.attached == trueresult.published_state == "CONNECTED"AT+CFUN=0->AT+CFUN=1) before final attach.2) Real-device run (comma 3X / comma 4)
Expected result:
state=ATTACHED,attached=true/dev/shm/modem_state.txttransitions toCONNECTED3) Route priority check (WiFi > LTE)
ip route | grep defaultExpected result:
4) Test report template