mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 02:37:31 +02:00
Merge pull request #367 from david-cermak/test/sim800_cmux
fix(modem): Release v1.0.3: Fixes CMUX on SIM800
This commit is contained in:
4
.github/workflows/modem__target-test.yml
vendored
4
.github/workflows/modem__target-test.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["latest"]
|
idf_ver: ["latest"]
|
||||||
idf_target: ["esp32c3"]
|
idf_target: ["esp32c3"]
|
||||||
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client } ]
|
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
env:
|
env:
|
||||||
@ -54,7 +54,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["latest"]
|
idf_ver: ["latest"]
|
||||||
idf_target: ["esp32c3"]
|
idf_target: ["esp32c3"]
|
||||||
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client } ]
|
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ]
|
||||||
needs: build_esp_modem_tests
|
needs: build_esp_modem_tests
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- self-hosted
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
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).
|
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).
|
||||||
Additionally, each component is available in [IDF Component Registry](https://components.espressif.com).
|
Additionally, each component is available in [IDF Component Registry](https://components.espressif.com).
|
||||||
Please refer to instructions in [ESP-IDF](https://github.com/espressif/esp-idf)
|
Please refer to instructions in [ESP-IDF](https://github.com/espressif/esp-idf)
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
|
@ -3,6 +3,6 @@ commitizen:
|
|||||||
bump_message: 'bump(modem): $current_version -> $new_version'
|
bump_message: 'bump(modem): $current_version -> $new_version'
|
||||||
pre_bump_hooks: python ../../ci/changelog.py esp_modem
|
pre_bump_hooks: python ../../ci/changelog.py esp_modem
|
||||||
tag_format: modem-v$version
|
tag_format: modem-v$version
|
||||||
version: 1.0.2
|
version: 1.0.3
|
||||||
version_files:
|
version_files:
|
||||||
- idf_component.yml
|
- idf_component.yml
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.0.3](https://github.com/espressif/esp-protocols/commits/modem-v1.0.3)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- 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))
|
||||||
|
- Add CMUX example to target tests ([4f2ebaa](https://github.com/espressif/esp-protocols/commit/4f2ebaa))
|
||||||
|
|
||||||
## [1.0.2](https://github.com/espressif/esp-protocols/commits/modem-v1.0.2)
|
## [1.0.2](https://github.com/espressif/esp-protocols/commits/modem-v1.0.2)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||||
|
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
|
from __future__ import print_function, unicode_literals
|
||||||
|
|
||||||
|
|
||||||
|
def test_cmux_connection(dut):
|
||||||
|
"""
|
||||||
|
steps:
|
||||||
|
1. initializes connection with SIM800
|
||||||
|
2. checks we get an IP
|
||||||
|
3. checks for the MQTT events
|
||||||
|
"""
|
||||||
|
# Check the sequence of connecting, publishing, disconnecting
|
||||||
|
dut.expect('Modem has correctly entered multiplexed')
|
||||||
|
# Check for MQTT connection and the data event
|
||||||
|
dut.expect('TOPIC: /topic/esp-modem')
|
||||||
|
dut.expect('DATA: Hello modem')
|
@ -0,0 +1,17 @@
|
|||||||
|
CONFIG_IDF_TARGET="esp32c3"
|
||||||
|
# Override some defaults to enable PPP
|
||||||
|
CONFIG_LWIP_PPP_SUPPORT=y
|
||||||
|
CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y
|
||||||
|
CONFIG_LWIP_PPP_PAP_SUPPORT=y
|
||||||
|
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096
|
||||||
|
CONFIG_LWIP_PPP_ENABLE_IPV6=n
|
||||||
|
CONFIG_EXAMPLE_MODEM_UART_TX_PIN=4
|
||||||
|
CONFIG_EXAMPLE_MODEM_UART_RX_PIN=5
|
||||||
|
CONFIG_EXAMPLE_MODEM_DEVICE_SIM800=y
|
||||||
|
CONFIG_EXAMPLE_MODEM_DEVICE_BG96=n
|
||||||
|
CONFIG_EXAMPLE_MODEM_PPP_APN="lpwa.vodafone.com"
|
||||||
|
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
|
||||||
|
CONFIG_ESP32_PANIC_PRINT_HALT=y
|
||||||
|
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||||
|
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
||||||
|
CONFIG_EXAMPLE_CLOSE_CMUX_AT_END=y
|
@ -1,4 +1,4 @@
|
|||||||
version: "1.0.2"
|
version: "1.0.3"
|
||||||
description: esp modem
|
description: esp modem
|
||||||
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem
|
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -144,7 +144,7 @@ bool CMux::data_available(uint8_t *data, size_t len)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if ((type & FT_UIH) == FT_UIH && dlci == 0) { // notify the internal DISC command
|
} else if ((type & FT_UIH) == FT_UIH && dlci == 0) { // notify the internal DISC command
|
||||||
if (len > 0 && (data[0] & 0xE1) == 0xE1) {
|
if ((len > 0 && (data[0] & 0xE1) == 0xE1) || (data == nullptr)) {
|
||||||
// Not a DISC, ignore (MSC frame)
|
// Not a DISC, ignore (MSC frame)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user