Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/modem__build-host-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ jobs:
matrix:
idf_ver: ["latest", "release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4"]
example: ["pppos_client", "modem_console", "modem_tcp_client", "ap_to_pppos", "simple_cmux_client"]
include:
- idf_ver: "release-v5.0"
example: "simple_cmux_client"
warning: "Warning: The smallest app partition is nearly full"

runs-on: ubuntu-22.04
container: espressif/idf:${{ matrix.idf_ver }}
steps:
Expand All @@ -30,9 +25,9 @@ jobs:
- if: ${{ matrix.skip_config }}
run: rm -f $GITHUB_WORKSPACE/protocols/components/esp_modem/examples/${{ matrix.example }}/sdkconfig.ci.${{ matrix.skip_config }}*
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }}
env:
EXPECTED_WARNING: ${{ matrix.warning }}
shell: bash
env:
EXPECTED_WARNING: "Warning: The smallest app partition is nearly full\nwarning: unknown kconfig symbol 'ESP32_PANIC_PRINT_HALT'"
run: |
. ${IDF_PATH}/export.sh
python -m pip install idf-build-apps
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/pre_commit_check.yml

This file was deleted.

14 changes: 1 addition & 13 deletions .github/workflows/publish-docs-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- release-modem-v1.4

env:
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_DEPLOY_URL_BASE }}
Expand Down Expand Up @@ -55,9 +56,6 @@ jobs:
if [[ "${{ env.BUMP_COMPONENT }}" == "${comp}" ]]; then
echo "Building specific version of ${comp} (${{ env.BUMP_VERSION }})"
./generate_docs ${{ env.BUMP_VERSION }}
else
echo "Building latest version of ${comp}"
./generate_docs
fi
fi
done
Expand All @@ -67,16 +65,6 @@ jobs:
source $GITHUB_WORKSPACE/docs/utils.sh
add_doc_server_ssh_keys $DOCS_DEPLOY_KEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
export GIT_VER=$(git describe --always)
export GITHUB_REF_NAME=latest
for comp in `ls components`; do
if [[ -d $GITHUB_WORKSPACE/docs/${comp} ]]; then
echo "Deploying latest of ${comp}"
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/${comp}
export DOCS_DEPLOY_PATH=$DOCS_DEPLOY_PATH_ORIG/${comp}
cd $GITHUB_WORKSPACE/docs/${comp}
deploy-docs
fi
done;
# Deploy docs with version path
if [[ "${{ env.BUMP_VERSION }}" != "" ]] && [[ -d $GITHUB_WORKSPACE/docs/${{ env.BUMP_COMPONENT }} ]]; then
echo "Deploying specific version of ${{ env.BUMP_COMPONENT }} (${{ env.BUMP_VERSION }})"
Expand Down
3 changes: 2 additions & 1 deletion ci/build_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
build_dir='build_@t_@w',
config_rules_str=args.rules,
build_log_filename='build_log.txt',
size_json_filename='size.json' if not args.linux else None,
size_json_filename=None,
check_warnings=True,
manifest_files=args.manifests,
default_build_targets=SUPPORTED_TARGETS,
Expand All @@ -65,6 +65,7 @@

sys.exit(
build_apps(apps,
verbose=2,
dry_run=False,
keep_going=False,
no_preserve=args.delete,
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.4.0
version: 1.4.1
version_files:
- idf_component.yml
10 changes: 10 additions & 0 deletions components/esp_modem/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

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

### Bug Fixes

- Remove unused kconfig ([97194507](https://github.com/espressif/esp-protocols/commit/97194507))
- Fix modem console dependencies ([0d17f19f](https://github.com/espressif/esp-protocols/commit/0d17f19f))
- Fix CI build issues with IDFv6.0 ([d65f8f69](https://github.com/espressif/esp-protocols/commit/d65f8f69))
- Address build issues ([b4520660](https://github.com/espressif/esp-protocols/commit/b4520660))
- Fix driver dependency issue on v6.0 ([26b3859c](https://github.com/espressif/esp-protocols/commit/26b3859c))

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

### Features
Expand Down
7 changes: 6 additions & 1 deletion components/esp_modem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ else()
src/esp_modem_uart.cpp
src/esp_modem_term_uart.cpp
src/esp_modem_netif.cpp)
set(dependencies driver esp_event esp_netif)
set(dependencies esp_event esp_netif)
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "5.3")
list(APPEND dependencies esp_driver_uart)
else()
list(APPEND dependencies driver)
endif()
endif()


Expand Down
12 changes: 6 additions & 6 deletions components/esp_modem/examples/ap_to_pppos/main/ap_to_pppos.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
Expand Down Expand Up @@ -100,10 +100,10 @@ void wifi_init_softap(void)
ESP_ERROR_CHECK(esp_wifi_init(&cfg));

ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,
ESP_EVENT_ANY_ID,
&wifi_event_handler,
NULL,
NULL));
ESP_EVENT_ANY_ID,
&wifi_event_handler,
NULL,
NULL));

wifi_config_t wifi_config = {
.ap = {
Expand All @@ -120,7 +120,7 @@ void wifi_init_softap(void)
}

ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP));
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config));
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &wifi_config));
ESP_ERROR_CHECK(esp_wifi_start());

ESP_LOGI(TAG, "wifi_init_softap finished. SSID:%s password:%s channel:%d",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ idf_component_register(SRCS "modem_console_main.cpp"
"my_module_dce.cpp"
"httpget_handle.c"
"ping_handle.c"
REQUIRES console esp_http_client nvs_flash
INCLUDE_DIRS ".")
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,12 @@ void ConsoleCommand::RegisterCommand(const char *command, const char *help, cons

arg_type end = { .end = arg_end(1) };
arg_table.emplace_back(end);
const esp_console_cmd_t command_def = {
.command = command,
.help = help,
.hint = nullptr,
.func = command_func_pts[last_command],
.argtable = &arg_table[0]
};
esp_console_cmd_t command_def = { };
command_def.command = command;
command_def.help = help;
command_def.hint = nullptr;
command_def.func = command_func_pts[last_command];
command_def.argtable = &arg_table[0];
ESP_ERROR_CHECK(esp_console_cmd_register(&command_def));
last_command++;
console_commands.emplace_back(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "cxx_include/esp_modem_dte.hpp"
#include "esp_modem_config.h"
#include "cxx_include/esp_modem_api.hpp"
#include "esp_idf_version.h"
#if defined(CONFIG_EXAMPLE_SERIAL_CONFIG_USB)
#include "esp_modem_usb_config.h"
#include "cxx_include/esp_modem_usb_api.hpp"
Expand All @@ -29,6 +30,12 @@
#include "console_helper.hpp"
#include "my_module_dce.hpp"

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
#define GET_WAKEUP_CAUSE() esp_sleep_get_wakeup_causes()
#else
#define GET_WAKEUP_CAUSE() esp_sleep_get_wakeup_cause()
#endif

#if defined(CONFIG_EXAMPLE_FLOW_CONTROL_NONE)
#define EXAMPLE_FLOW_CONTROL ESP_MODEM_FLOW_CONTROL_NONE
#elif defined(CONFIG_EXAMPLE_FLOW_CONTROL_SW)
Expand Down Expand Up @@ -208,7 +215,7 @@ extern "C" void app_main(void)
esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_console_new_repl_uart(&uart_config, &repl_config, &s_repl));

switch (esp_sleep_get_wakeup_cause()) {
switch (GET_WAKEUP_CAUSE()) {
case ESP_SLEEP_WAKEUP_TIMER:
if (esp_modem::modem_mode::CMUX_MODE == mode_rtc) {
ESP_LOGI(TAG, "Deep sleep reset\n");
Expand Down Expand Up @@ -427,7 +434,7 @@ extern "C" void app_main(void)
const ConsoleCommand SetDeepSleep("set_deep_sleep", "Put esp32 to deep sleep", &deep_sleep_args, sizeof(deep_sleep_args), [&](ConsoleCommand * c) {
int tout = c->get_int_of(&DeepSleepArgs::timeout);
ESP_LOGI(TAG, "Entering deep sleep for %d sec", tout);
ESP_LOGI(TAG, "Wakeup Cause: %d ", esp_sleep_get_wakeup_cause());
ESP_LOGI(TAG, "Wakeup Cause: %d ", GET_WAKEUP_CAUSE());
esp_deep_sleep(tout * 1000000);
return 0;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ CONFIG_LWIP_PPP_ENABLE_IPV6=n
CONFIG_EXAMPLE_SERIAL_CONFIG_USB=y
CONFIG_EXAMPLE_MODEM_DEVICE_A7670=y
CONFIG_EXAMPLE_MODEM_PPP_APN="lpwa.vodafone.com"
CONFIG_EXAMPLE_MODEM_PPP_AUTH_NONE=y
CONFIG_EXAMPLE_MQTT_TEST_TOPIC="/ci/esp-modem/pppos-client"
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
CONFIG_ESP32_PANIC_PRINT_HALT=y
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.4.0"
version: "1.4.1"
description: Library for communicating with cellular modems in command and data modes
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem
issues: https://github.com/espressif/esp-protocols/issues
Expand Down
2 changes: 1 addition & 1 deletion components/esp_modem/port/linux/esp_netif_linux/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

#define MPPE_SUPPORT 0

#define PPP_MAXIDLEFLAG 0
#define PPP_MAXIDLEFLAG 100

#define PRINTPKT_SUPPORT 1
#define PPP_PROTOCOLNAME 1
Expand Down
2 changes: 1 addition & 1 deletion components/esp_modem/port/linux/esp_netif_linux/tun_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void ppp_link_status_cb(ppp_pcb *pcb, int err_code, void *ctx)
}
}

static u32_t ppp_output_cb(struct ppp_pcb_s *pcb, const void *data, u32_t len, void *ctx)
static u32_t ppp_output_cb(struct ppp_pcb_s *pcb, u8_t *data, u32_t len, void *ctx)
{
esp_netif_t *netif = (esp_netif_t *)ctx;
if (netif->transmit) {
Expand Down
15 changes: 13 additions & 2 deletions components/esp_modem/test/target_ota/main/ota_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@
#include "cxx_include/esp_modem_dte.hpp"
#include "esp_modem_config.h"
#include "cxx_include/esp_modem_api.hpp"
#include "esp_vfs_dev.h" // For optional VFS support
#include "vfs_resource/vfs_create.hpp"
#include "esp_idf_version.h"
#include "network_dce.hpp"
#include "manual_ota.hpp"
#include "mqtt_client.h"
// For optional VFS support
#include "vfs_resource/vfs_create.hpp"
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
#include "driver/uart_vfs.h"
#else
#include "esp_vfs_dev.h"
#endif

using namespace esp_modem;

Expand Down Expand Up @@ -189,7 +195,12 @@ extern "C" void app_main(void)
assert(vfs_create_uart(&uart_config, &dte_config.vfs_config) == true);

auto dte = create_vfs_dte(&dte_config);
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
uart_vfs_dev_use_driver(uart_config.uart.port_num);
#else
esp_vfs_dev_uart_use_driver(uart_config.uart.port_num);
#endif

#else
auto dte = create_uart_dte(&dte_config);
#endif // CONFIG_TEST_USE_VFS_TERM
Expand Down
Loading