-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from david-cermak/feat/modem_test_ota
feat(modem): Add OTA test to exercise modem layers
- Loading branch information
Showing
22 changed files
with
1,262 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# The following lines of boilerplate have to be in your project's CMakeLists | ||
# in this exact order for cmake to work correctly | ||
cmake_minimum_required(VERSION 3.8) | ||
|
||
set(EXTRA_COMPONENT_DIRS "../.." "../../examples/modem_tcp_client/components") | ||
|
||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
project(ota_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Target test running OTA update | ||
|
||
## Overview | ||
|
||
The aim of this test is to exercise the most commonly failing scenario, running OTA over PPPoS with https. | ||
|
||
This project opens a data session, runs basic mqtt operations and initiates OTA update. | ||
It supports the following test configurations: | ||
* Using a real modem device (default config) | ||
* Using VFS device (only to exercise VFS DTE) | ||
* Using network-only DCE (connecting directly to PPP server) -- needs some configuration | ||
|
||
### Configuring the PPP server | ||
|
||
You need to run these applications on your host machine: | ||
* PPP server | ||
```bash | ||
sudo pppd /dev/ttyUSB1 115200 192.168.11.1:192.168.11.2 ms-dns 8.8.8.8 modem local noauth debug nocrtscts nodetach +ipv6 | ||
``` | ||
* MQTT broker: Running mosquitto in the default config is enough, configuring the broker's URL to the local PPP address: `config.broker.address.uri = "mqtt://192.168.11.1";` | ||
* HTTP server: Need to support HTTP/1.1 (to support ranges). You can use the script `http_server.py` and configure the OTA endpoint as `"https://192.168.11.1:1234/esp32.bin"` | ||
|
||
## Potential issues | ||
|
||
When running this test it is expected to experience some buffer overflows or connection interruption. | ||
The modem library should recover from these failure modes and continue and complete OTA update. | ||
These issues are expected, since UART ISR is deliberately not placed into IRAM in the test configuration to exhibit some minor communication glitches. |
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
components/esp_modem/test/target_ota/components/manual_ota/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
idf_component_register(SRCS manual_ota.cpp transport_batch_tls.cpp | ||
INCLUDE_DIRS "." | ||
PRIV_REQUIRES extra_tcp_transports esp_http_client app_update) |
Oops, something went wrong.