Skip to content

Commit

Permalink
Merge pull request #21 from david-cermak/fix/modem_known_issues1
Browse files Browse the repository at this point in the history
Fix/modem known issues1
  • Loading branch information
david-cermak authored Jun 22, 2023
2 parents 84035d8 + 3facaff commit b516a33
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/modem__target-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
needs: build_esp_modem_tests
runs-on:
- self-hosted
- BrnoRPI-GH006
- modem
env:
TEST_DIR: components/esp_modem/${{ matrix.test.path }}
steps:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish-docs-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
name: Publish Tag, Release, Docs, Component
runs-on: ubuntu-latest
# Skip running on forks since it won't have access to secrets
if: github.repository == 'espressif/esp-protocols'
steps:
- name: Checkout esp-protocols
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion components/esp_modem/.cz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ commitizen:
bump_message: 'bump(modem): $current_version -> $new_version'
pre_bump_hooks: python ../../ci/changelog.py esp_modem
tag_format: modem-v$version
version: 1.0.0
version: 1.0.1
version_files:
- idf_component.yml
15 changes: 15 additions & 0 deletions components/esp_modem/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [1.0.1](https://github.com/espressif/esp-protocols/commits/modem-v1.0.1)

### Bug Fixes

- Support UART clean build with IDF v5.2 ([e620eb5](https://github.com/espressif/esp-protocols/commit/e620eb5))
- enable code coverage publishing to github pages ([4910e89](https://github.com/espressif/esp-protocols/commit/4910e89))
- fix esp_modem build issue ([ab94566](https://github.com/espressif/esp-protocols/commit/ab94566))
- Example to use 1.0.0 ([afb6930](https://github.com/espressif/esp-protocols/commit/afb6930))
- Changelog to correctly pick references ([423e965](https://github.com/espressif/esp-protocols/commit/423e965))

### Updated

- docs(esp_modem): updated documents to show missed topics ([0534853](https://github.com/espressif/esp-protocols/commit/0534853))
- docs(common): improving documentation ([ca3fce0](https://github.com/espressif/esp-protocols/commit/ca3fce0))

## [1.0.0](https://github.com/espressif/esp-protocols/commits/modem-v1.0.0)

### Major changes
Expand Down
2 changes: 1 addition & 1 deletion components/esp_modem/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.0.0"
version: "1.0.1"
description: esp modem
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem
dependencies:
Expand Down
40 changes: 40 additions & 0 deletions docs/esp_modem/en/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,43 @@ Is defined using standard configuration structures for ``DTE`` and

- :cpp:class:``esp_modem_dte_config_t``
- :cpp:class:``esp_modem_dce_config_t``

Known issues
------------

There are certain issues, especially in using CMUX mode which you can
experience with some devices:

1) Some modems (e.g. A76xx serries) use 2 bytes CMUX payload, which
might cause buffer overflow when trying to defragment the payload.
It's recommended to disable ``ESP_MODEM_CMUX_DEFRAGMENT_PAYLOAD``,
which will fix the issue, but may occasional cause reception of AT command
replies in fragments.

2) Some devices (such as SIM7000) do not support CMUX mode at all.

3) Device A7670 does no not correctly exit CMUX mode. You can apply
this patch to adapt the exit sequence https://github.com/espressif/esp-protocols/commit/28de34571012d36f2e87708955dcd435ee5eab70

::

diff --git a/components/esp_modem/src/esp_modem_cmux.cpp b/components/esp_modem/src/esp_modem_cmux.cpp
index 0c480f8..4418c3d 100644
--- a/components/esp_modem/src/esp_modem_cmux.cpp
+++ b/components/esp_modem/src/esp_modem_cmux.cpp
@@ -206,6 +206,15 @@ bool CMux::on_header(CMuxFrame &frame)
}
size_t payload_offset = std::min(frame.len, 4 - frame_header_offset);
memcpy(frame_header + frame_header_offset, frame.ptr, payload_offset);
+ if (frame_header[1] == 0xEF) {
+ dlci = 0;
+ type = frame_header[1];
+ payload_len = 0;
+ data_available(&frame.ptr[0], payload_len); // Notify DISC
+ frame.advance(payload_offset);
+ state = cmux_state::FOOTER;
+ return true;
+ }
if ((frame_header[3] & 1) == 0) {
if (frame_header_offset + frame.len <= 4) {
frame_header_offset += frame.len;

0 comments on commit b516a33

Please sign in to comment.