Skip to content

Commit aaa3537

Browse files
committed
fix(at): Reusing modem_sim as slave for wrmt-at
1 parent 69f3dfb commit aaa3537

File tree

4 files changed

+131
-0
lines changed

4 files changed

+131
-0
lines changed

.github/workflows/build_at.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,120 @@ jobs:
4949
grep esp_wifi_remote_init ${dir}sample.map | grep libwifi_remote_over_at.a || exit 1
5050
echo -e "esp_wifi_remote_init linked from libwifi_remote_over_at"
5151
done
52+
53+
54+
build_wrmt_over_at_slave:
55+
if: contains(github.event.pull_request.labels.*.name, 'at') || github.event_name == 'push'
56+
name: Build WiFi Remote over AT Slave
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@v3
61+
- name: Checkout esp-protocols
62+
uses: actions/checkout@v3
63+
with:
64+
repository: david-cermak/esp-protocols
65+
ref: feat/modem_sim_params
66+
path: protocols
67+
- name: Checkout idf
68+
uses: actions/checkout@v3
69+
with:
70+
repository: espressif/esp-idf
71+
ref: 8ad0d3d8f2faab752635bee36070313c47c07a13
72+
path: idf
73+
- name: Build ESP-AT
74+
shell: bash
75+
run: |
76+
export IDF_PATH=$GITHUB_WORKSPACE/idf
77+
${IDF_PATH}/install.sh
78+
cd $GITHUB_WORKSPACE/protocols/common_components/modem_sim
79+
./install.sh PLATFORM_ESP32C6 ESP32C6-4MB 22 23
80+
source export.sh
81+
idf.py build
82+
shopt -s extglob # enable extended globs for selective cleanup
83+
rm -rf build/!(*.bin|*.elf|*.map|bootloader|partition_table|customized_partitions|flasher_args.json|download.config|factory)
84+
if [ -d build/bootloader ]; then rm -rf build/bootloader/!(*.bin); fi
85+
if [ -d build/partition_table ]; then rm -rf build/partition_table/!(*.bin); fi
86+
shopt -u extglob
87+
zip -qur artifacts.zip build
88+
ls -la
89+
mv artifacts.zip ${GITHUB_WORKSPACE}/
90+
- uses: actions/upload-artifact@v4
91+
with:
92+
name: wrmt_over_at_slave
93+
path: artifacts.zip
94+
if-no-files-found: error
95+
96+
97+
build_wrmt_over_at_host:
98+
name: Build WiFi Remote Example
99+
strategy:
100+
matrix:
101+
idf_ver: ["latest"]
102+
runs-on: ubuntu-latest
103+
container: espressif/idf:${{ matrix.idf_ver }}
104+
steps:
105+
- name: Checkout code
106+
uses: actions/checkout@v3
107+
- name: Checkout protocols
108+
uses: actions/checkout@v3
109+
with:
110+
repository: espressif/esp-protocols
111+
ref: eppp-v1.1.3
112+
sparse-checkout: |
113+
ci/build_apps.py
114+
ci/ignore_build_warnings.txt
115+
ci/clean_build_artifacts.sh
116+
sparse-checkout-cone-mode: false
117+
path: protocols
118+
- name: Build with IDF-${{ matrix.idf_ver }}
119+
env:
120+
EXPECTED_WARNING: "Warning: The smallest app partition is nearly full\nWarning: Deprecated: Option\n"
121+
shell: bash
122+
run: |
123+
${IDF_PATH}/install.sh --enable-ci
124+
. ${IDF_PATH}/export.sh
125+
cd ./components/esp_wifi_remote/examples/mqtt
126+
idf.py add-dependency wifi_remote_over_at
127+
idf.py build -D SDKCONFIG_DEFAULTS=custom.sdkconfig.at
128+
${GITHUB_WORKSPACE}/protocols/ci/clean_build_artifacts.sh `pwd`/build
129+
zip -qur artifacts.zip build
130+
- uses: actions/upload-artifact@v4
131+
with:
132+
name: wrmt_over_at_host
133+
path: ./components/esp_wifi_remote/examples/mqtt/artifacts.zip
134+
if-no-files-found: error
135+
136+
run_example:
137+
# Skip running on forks since it won't have access to secrets
138+
if: github.repository == 'espressif/esp-wifi-remote'
139+
name: AT target test
140+
needs:
141+
- build_wrmt_over_at_slave
142+
- build_wrmt_over_at_host
143+
strategy:
144+
matrix:
145+
idf_ver: ["latest"]
146+
runs-on: [self-hosted, wifi-remote]
147+
container:
148+
image: python:3.11-bookworm
149+
options: --privileged # Privileged mode has access to serial ports
150+
env:
151+
TEST_DIR: components/esp_wifi_remote/examples
152+
steps:
153+
- uses: actions/checkout@v4
154+
- uses: actions/download-artifact@v4
155+
with:
156+
name: wrmt_over_at_host
157+
path: ${{ env.TEST_DIR }}/mqtt/
158+
- uses: actions/download-artifact@v4
159+
with:
160+
name: wrmt_over_at_slave
161+
path: ${{ env.TEST_DIR }}/server/
162+
- name: Run Test
163+
working-directory: ${{ env.TEST_DIR }}
164+
run: |
165+
python -m pip install pytest-embedded-serial-esp pytest-embedded-idf pytest-rerunfailures pytest-timeout pytest-ignore-test-results
166+
unzip server/artifacts.zip -d server/
167+
unzip mqtt/artifacts.zip -d mqtt/
168+
python -m pytest --log-cli-level DEBUG --target esp32c6,esp32p4
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file was generated using idf.py save-defconfig. It can be edited manually.
2+
# Espressif IoT Development Framework (ESP-IDF) 5.4.1 Project Minimal Configuration
3+
#
4+
CONFIG_IDF_TARGET="esp32p4"
5+
CONFIG_ESP_WIFI_REMOTE_LIBRARY_CUSTOM=y
6+
CONFIG_ESP_WIFI_SSID="local_mosquitto"
7+
CONFIG_ESP_WIFI_PASSWORD="local_mosquitto_password"
8+
CONFIG_WIFI_RMT_AT_UART_TX_PIN=47
9+
CONFIG_WIFI_RMT_AT_UART_RX_PIN=48
10+
CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y
11+
CONFIG_BROKER_URL="mqtt://192.168.4.1"

components/esp_wifi_remote/examples/pytest_eppp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def test_wifi_remote_eppp(dut: Tuple[IdfDut, IdfDut]) -> None:
2121
# Check for wifi station connected event (different for hosted and eppp)
2222
if dut[1].app.sdkconfig.get('ESP_WIFI_REMOTE_LIBRARY_HOSTED') is True:
2323
server.expect('slave_rpc: Sta mode connected', timeout=100)
24+
elif dut[1].app.sdkconfig.get('ESP_WIFI_REMOTE_LIBRARY_CUSTOM') is True:
25+
server.expect('Got IPv4 event: Interface', timeout=100)
2426
else:
2527
server.expect('rpc_server: Received WIFI event 4', timeout=100)
2628
client.expect('MQTT_EVENT_CONNECTED', timeout=100)

components/esp_wifi_remote/scripts/ignore_extensions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define __volatile__(...)
99
#define volatile(...)
1010
typedef void *__builtin_va_list;
11+
typedef void *__FILE;
1112
#define __inline__ inline
1213
#define __inline inline
1314
#define __extension__

0 commit comments

Comments
 (0)