Open wildbiotiger opened 1 year ago
I've struggled with a similar problem and I've solved it by setting ATE0
. The setting ATE1
is nice for debugging but causes the modem to output two "batches" of data.
I've spent a couple of hours digging through the source code of ATtila and it seems it only expects one "batch" of data, so the two batches caused by a long running command is something that breaks important assumptions.
Have you tried setting a longer timeout on the communicator? The default is 10 seconds, but you can make it longer:
atrunenv.configure_communicator(port_name, baud_rate, 180.0)
I wonder if that would help it catch longer running commands.
This is a great project, thank-you Christian.
I am developing on a Seeed E5 LoRaWAN modem, I see that there are various AT command response formats;
1) Simple single-line string. 2) Long single-line strings with comma-separated values 3) Multiple line strings, (some with comma-separated values) 4) Multiple line strings with long time delays between receiving them.
To run the Regex over format-3 responses, In atsession.py, use join method to join combine the strings in each line before the re.search
To allow enough time to capture format-4 responses, adjust;
In atcommunbicator.py, Comment out: lines 213 & 214;
if self._device.in_waiting > 0:
data_still_available = True
#else:
#data_still_available = False
Describe the bug It appears that longer executing commands do not collect all the information from the output, e.g. commands such as
AT+CGDCONT?
andAT+COPS=?
. Most of the time, the parser only catches the echo of the command and not the full response.To Reproduce
Expected behavior CGDCONT should capture all data, there were 3 other PDP contexts displayed normally. COPS should wait for the operator scan to complete and return the data.
Desktop (please complete the following information):
Additional context There may be an additional consistency bug. Some of the normal commands failed with no output, but repeating the command succeeds. The CGDCONT always fails however.