mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
Previous implementation waits 300ms for response after each command issued. But many commands finish earlier. This patch improves the command execution time by frequently checking for the response to complete (i.e. ends with OK or ERROR), or the occurence of a timeout (default 200ms). Timeout can be adapted per command to support long response times of certain commands like AT+COPS=? (network search) Execution time benchmark (20 AT commands/responses): Previous: 6.010s (100.0%) New code: 0.045s ( 0.7%) Change-Id: I69b1cbc0a20d54791e5800bf27ebafc2c8606d93