Skip to content

Commit 5b05ee1

Browse files
committed
feat(at): Add initial version of WiFi RMT over AT
1 parent 9c29c68 commit 5b05ee1

File tree

12 files changed

+641
-0
lines changed

12 files changed

+641
-0
lines changed

.github/workflows/build_at.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Build"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened, labeled]
9+
10+
jobs:
11+
build_remote_over_at:
12+
if: contains(github.event.pull_request.labels.*.name, 'at') || github.event_name == 'push'
13+
name: Build WiFi Remote over AT Test
14+
strategy:
15+
matrix:
16+
idf_ver: ["latest", "release-v5.5", "release-v5.4", "release-v5.3"]
17+
test: [ { app: sample_app, path: "tests/sample" }]
18+
runs-on: ubuntu-latest
19+
container: espressif/idf:${{ matrix.idf_ver }}
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
- name: Checkout protocols
24+
uses: actions/checkout@v3
25+
with:
26+
repository: espressif/esp-protocols
27+
ref: wifi_remote-v0.4.0
28+
sparse-checkout: |
29+
ci/build_apps.py
30+
ci/ignore_build_warnings.txt
31+
sparse-checkout-cone-mode: false
32+
path: protocols
33+
- name: ccache
34+
uses: hendrikmuhs/[email protected]
35+
with:
36+
key: ${{ matrix.idf_ver }}
37+
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }}
38+
env:
39+
EXPECTED_WARNING: "DeprecationWarning: 'MultiCommand' is deprecated and will be removed\nCryptographyDeprecationWarning: Parsed a serial number which wasn't positive"
40+
shell: bash
41+
run: |
42+
. ${IDF_PATH}/export.sh
43+
pip install idf-component-manager idf-build-apps --upgrade
44+
python $GITHUB_WORKSPACE/protocols/ci/build_apps.py ./components/wifi_remote_over_at/${{matrix.test.path}} -vv --preserve-all
45+
cd ./components/wifi_remote_over_at/${{matrix.test.path}}
46+
for dir in `ls -d build*/`; do
47+
echo -e "\nChecking build directory: $dir"
48+
grep esp_wifi_remote_init ${dir}sample.map | grep libwifi_remote_over_at.a || exit 1
49+
echo -e "esp_wifi_remote_init linked from libwifi_remote_over_at"
50+
done
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
set(sources src/wifi_remote_over_at.cpp)
2+
3+
idf_component_register(SRCS ${sources}
4+
PRIV_INCLUDE_DIRS src
5+
PRIV_REQUIRES esp_event esp_modem esp_wifi)
6+
7+
# This will define the wifi_remote dependency to the wifi_remote_over_at
8+
# also issues an error if wifi_remote is not found
9+
idf_build_get_property(build_components BUILD_COMPONENTS)
10+
if(esp_wifi_remote IN_LIST build_components)
11+
idf_component_get_property(wifi_remote esp_wifi_remote COMPONENT_LIB)
12+
elseif(espressif__esp_wifi_remote IN_LIST build_components)
13+
idf_component_get_property(wifi_remote espressif__esp_wifi_remote COMPONENT_LIB)
14+
else()
15+
message(FATAL_ERROR "This component requires esp_wifi_remote")
16+
endif()
17+
target_link_libraries(${wifi_remote} PRIVATE ${COMPONENT_LIB})
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
menu "Wi-Fi Remote over AT"
2+
3+
menu "UART Configuration"
4+
5+
choice WIFI_RMT_AT_FLOW_CONTROL
6+
bool "Set preferred modem control flow"
7+
default WIFI_RMT_AT_FLOW_CONTROL_NONE
8+
help
9+
Set the preferred control flow
10+
11+
config WIFI_RMT_AT_FLOW_CONTROL_NONE
12+
bool "No control flow"
13+
config WIFI_RMT_AT_FLOW_CONTROL_SW
14+
bool "SW control flow"
15+
config WIFI_RMT_AT_FLOW_CONTROL_HW
16+
bool "HW control flow"
17+
endchoice
18+
19+
config WIFI_RMT_AT_UART_TX_PIN
20+
int "TXD Pin Number"
21+
default 25
22+
range 0 56
23+
help
24+
Pin number of UART TX.
25+
26+
config WIFI_RMT_AT_UART_RX_PIN
27+
int "RXD Pin Number"
28+
default 26
29+
range 0 56
30+
help
31+
Pin number of UART RX.
32+
33+
config WIFI_RMT_AT_UART_RTS_PIN
34+
int "RTS Pin Number"
35+
default 27
36+
range 0 56
37+
help
38+
Pin number of UART RTS.
39+
40+
config WIFI_RMT_AT_UART_CTS_PIN
41+
int "CTS Pin Number"
42+
default 23
43+
range 0 56
44+
help
45+
Pin number of UART CTS.
46+
47+
config WIFI_RMT_AT_UART_EVENT_TASK_STACK_SIZE
48+
int "UART Event Task Stack Size"
49+
range 2000 6000
50+
default 4096
51+
help
52+
Stack size of UART event task.
53+
54+
config WIFI_RMT_AT_UART_EVENT_TASK_PRIORITY
55+
int "UART Event Task Priority"
56+
range 3 22
57+
default 5
58+
help
59+
Priority of UART event task.
60+
61+
config WIFI_RMT_AT_UART_EVENT_QUEUE_SIZE
62+
int "UART Event Queue Size"
63+
range 10 40
64+
default 30
65+
help
66+
Length of UART event queue.
67+
68+
config WIFI_RMT_AT_UART_PATTERN_QUEUE_SIZE
69+
int "UART Pattern Queue Size"
70+
range 10 40
71+
default 20
72+
help
73+
Length of UART pattern queue.
74+
75+
config WIFI_RMT_AT_UART_TX_BUFFER_SIZE
76+
int "UART TX Buffer Size"
77+
range 256 2048
78+
default 512
79+
help
80+
Buffer size of UART TX buffer.
81+
82+
config WIFI_RMT_AT_UART_RX_BUFFER_SIZE
83+
int "UART RX Buffer Size"
84+
range 256 2048
85+
default 1024
86+
help
87+
Buffer size of UART RX buffer.
88+
endmenu
89+
90+
91+
endmenu # Wi-Fi Remote over EPPP
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AT based implementation of Wi-Fi remote APIs
2+
3+
:warning: This component should be only used with `esp_wifi_remote`
4+
5+
This component has no public API, it only provides definitions of `esp_wifi_remote` functions.
6+
7+
It uses `esp_modem` as a host implementation, and `esp-at` at the communication coprocessor side.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 0.1.0
2+
url: https://github.com/espressif/esp-wifi-remote/components/wifi_remote_over_at
3+
description: AT based implementation of wifi_remote APIs
4+
dependencies:
5+
espressif/esp_modem:
6+
version: '>=1.0'
7+
idf:
8+
version: '>=5.3'

0 commit comments

Comments
 (0)