Closed doragasu closed 3 months ago
Hi @doragasu
The issue is most probably caused by receiving the response into two separate CMUX frames. The modem library reuses UART buffer for CMUX processing, and cannot (easily) handle this case (again related to MC60, as the fix you applied -- https://github.com/espressif/esp-protocols/pull/540).
This configuration should resolve the problem: CONFIG_ESP_MODEM_USE_INFLATABLE_BUFFER_IF_NEEDED=y
-- the downside is an extra allocation if the response comes in two pieces.
Awesome, I'll test ASAP and see if it works
It works great, thanks!
Answers checklist.
What component are you using? If you choose Other, provide details in More Information.
esp_modem
component version
master
IDF version.
v5.1.1
More Information.
I am using an MC60 modem with latest master, but with this PR applied (otherwise I cannot receive the GNSS data, as shown in the issue linked in the PR).
The program starts the modem and connects to a MQTT broker. While the connection is alive, it periodically requests GGA position data and link quality information. Most of the time it works, but sometimes the received GGA data is truncated.
When it works, the logs look as follows (position data has been replaced with
X
characters):And when it fails, it looks as follows:
In this specific case, looks like the response is split, and between the two parts, there are these bytes:
50 f9 f9 09 ef 51
.Another failed example:
I am not familiar with CMUX protocol but this one still looks a bit more "normal" than the previous one, still it fails and only the ending
*65
is obtained.What could be causing this issue?