mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-12 18:02:08 +08:00
96d55a3283
modem.py: retry identity read until valid; stay in INIT on partial reads Under rapid SIM hot-swap stress, AT identity reads (CGSN/QCCID/CIMI/GMR) can return empty values or echo the command itself. Validate each field before accepting it, retry the whole sequence in a loop, and stay in INITIALIZING (rather than progressing to SEARCHING) until imei and iccid are populated. Prevents stale/empty identity from being published to /dev/shm/modem after a glitchy reinit.