Skip to content

Commit b8f3423

Browse files
authored
Merge pull request #367 from david-cermak/test/sim800_cmux
fix(modem): Release v1.0.3: Fixes CMUX on SIM800
2 parents 0db29f2 + 4e17873 commit b8f3423

File tree

8 files changed

+47
-6
lines changed

8 files changed

+47
-6
lines changed

.github/workflows/modem__target-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
idf_ver: ["latest"]
1717
idf_target: ["esp32c3"]
18-
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client } ]
18+
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ]
1919
runs-on: ubuntu-20.04
2020
container: espressif/idf:${{ matrix.idf_ver }}
2121
env:
@@ -54,7 +54,7 @@ jobs:
5454
matrix:
5555
idf_ver: ["latest"]
5656
idf_target: ["esp32c3"]
57-
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client } ]
57+
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ]
5858
needs: build_esp_modem_tests
5959
runs-on:
6060
- self-hosted

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## How to use
44

55
The [ESP-Protocols](https://github.com/espressif/esp-protocols) repository contains a collection of protocol components for [ESP-IDF](https://github.com/espressif/esp-idf).
6-
Additionally, each component is available in [IDF Component Registry](https://components.espressif.com).
6+
Additionally, each component is available in [IDF Component Registry](https://components.espressif.com).
77
Please refer to instructions in [ESP-IDF](https://github.com/espressif/esp-idf)
88

99
## Components

components/esp_modem/.cz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commitizen:
33
bump_message: 'bump(modem): $current_version -> $new_version'
44
pre_bump_hooks: python ../../ci/changelog.py esp_modem
55
tag_format: modem-v$version
6-
version: 1.0.2
6+
version: 1.0.3
77
version_files:
88
- idf_component.yml

components/esp_modem/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [1.0.3](https://github.com/espressif/esp-protocols/commits/modem-v1.0.3)
4+
5+
### Bug Fixes
6+
7+
- Fix to allow MSC frame (SIM800 CMUX) after v1.0.2 ([8d5947e](https://github.com/espressif/esp-protocols/commit/8d5947e), [#366](https://github.com/espressif/esp-protocols/issues/366))
8+
- Add CMUX example to target tests ([4f2ebaa](https://github.com/espressif/esp-protocols/commit/4f2ebaa))
9+
310
## [1.0.2](https://github.com/espressif/esp-protocols/commits/modem-v1.0.2)
411

512
### Features
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
2+
# SPDX-License-Identifier: Unlicense OR CC0-1.0
3+
from __future__ import print_function, unicode_literals
4+
5+
6+
def test_cmux_connection(dut):
7+
"""
8+
steps:
9+
1. initializes connection with SIM800
10+
2. checks we get an IP
11+
3. checks for the MQTT events
12+
"""
13+
# Check the sequence of connecting, publishing, disconnecting
14+
dut.expect('Modem has correctly entered multiplexed')
15+
# Check for MQTT connection and the data event
16+
dut.expect('TOPIC: /topic/esp-modem')
17+
dut.expect('DATA: Hello modem')
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CONFIG_IDF_TARGET="esp32c3"
2+
# Override some defaults to enable PPP
3+
CONFIG_LWIP_PPP_SUPPORT=y
4+
CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y
5+
CONFIG_LWIP_PPP_PAP_SUPPORT=y
6+
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096
7+
CONFIG_LWIP_PPP_ENABLE_IPV6=n
8+
CONFIG_EXAMPLE_MODEM_UART_TX_PIN=4
9+
CONFIG_EXAMPLE_MODEM_UART_RX_PIN=5
10+
CONFIG_EXAMPLE_MODEM_DEVICE_SIM800=y
11+
CONFIG_EXAMPLE_MODEM_DEVICE_BG96=n
12+
CONFIG_EXAMPLE_MODEM_PPP_APN="lpwa.vodafone.com"
13+
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
14+
CONFIG_ESP32_PANIC_PRINT_HALT=y
15+
CONFIG_COMPILER_CXX_EXCEPTIONS=y
16+
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
17+
CONFIG_EXAMPLE_CLOSE_CMUX_AT_END=y

components/esp_modem/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.2"
1+
version: "1.0.3"
22
description: esp modem
33
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem
44
dependencies:

components/esp_modem/src/esp_modem_cmux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ bool CMux::data_available(uint8_t *data, size_t len)
144144
return false;
145145
}
146146
} else if ((type & FT_UIH) == FT_UIH && dlci == 0) { // notify the internal DISC command
147-
if (len > 0 && (data[0] & 0xE1) == 0xE1) {
147+
if ((len > 0 && (data[0] & 0xE1) == 0xE1) || (data == nullptr)) {
148148
// Not a DISC, ignore (MSC frame)
149149
return true;
150150
}

0 commit comments

Comments
 (0)