-
Notifications
You must be signed in to change notification settings - Fork 29
/
mos.yml
200 lines (184 loc) · 9.95 KB
/
mos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
author: mongoose-os
description: WiFi support
type: lib
version: 1.0
sources:
- src
- src/${mos.platform}
includes:
- include
- include/${mos.platform}
config_schema:
- ["wifi", "o", {hide: true}]
- ["wifi.ap", "o", {title: "WiFi Access Point Config"}]
- ["wifi.ap.enable", "b", true, {title: "Enable"}]
- ["wifi.ap.ssid", "s", "Mongoose_??????", {title: "SSID"}]
- ["wifi.ap.pass", "s", "Mongoose", {title: "Password", type: "password"}]
- ["wifi.ap.hidden", "b", false, {title: "Hide SSID"}]
- ["wifi.ap.channel", "i", 6, {title: "Channel"}]
- ["wifi.ap.max_connections", "i", 10, {title: "Max connections"}]
- ["wifi.ap.ip", "s", "192.168.4.1", {title: "IP address"}]
- ["wifi.ap.netmask", "s", "255.255.255.0", {title: "Network Mask"}]
- ["wifi.ap.gw", "s", "192.168.4.1", {title: "Default Gateway"}]
- ["wifi.ap.dhcp_start", "s", "192.168.4.2", {title: "DHCP Start Address"}]
- ["wifi.ap.dhcp_end", "s", "192.168.4.100", {title: "DHCP End Address"}]
- ["wifi.ap.trigger_on_gpio", "i", -1, {title: "Trigger AP on low GPIO"}]
- ["wifi.ap.disable_after", "i", 0, {title: "If > 0, will disable itself after the specified number of seconds"}]
- ["wifi.ap.hostname", "s", "", {title: "If not empty, DNS server will resolve given host name to the IP address of AP"}]
- ["wifi.sta", "o", {title: "WiFi Station Config"}]
- ["wifi.sta.enable", "b", {title: "Connect to existing WiFi"}]
- ["wifi.sta.ssid", "s", {title: "SSID"}]
- ["wifi.sta.pass", "s", {title: "Password", type: "password"}]
- ["wifi.sta.bssid", "s", {title: "Specific AP to connect to"}]
- ["wifi.sta.channel", "i", {title: "Specific channel to use when connecting"}]
- ["wifi.sta.last_bssid", "s", {title: "Used to store AP's BSSID for quick connect"}]
- ["wifi.sta.last_channel", "i", {title: "Used to store AP's channel for quick connect"}]
- ["wifi.sta.user", "s", {title: "Username for WPA-PEAP mode"}]
- ["wifi.sta.anon_identity", "s", {title: "Anonymous identity for WPA mode"}]
- ["wifi.sta.cert", "s", {title: "Client certificate for WPA-TTLS mode"}]
- ["wifi.sta.key", "s", {title: "Client key for WPA-TTLS mode"}]
- ["wifi.sta.ca_cert", "s", {title: "CA certificate for WPA-enterprise mode"}]
- ["wifi.sta.ip", "s", {title: "Static IP Address"}]
- ["wifi.sta.netmask", "s", {title: "Static Netmask"}]
- ["wifi.sta.gw", "s", {title: "Static Default Gateway"}]
- ["wifi.sta.nameserver", "s", {title: "DNS Server"}]
- ["wifi.sta.dhcp_hostname", "s", {title: "Host name to include in DHCP requests"}]
# sta1 and sta2 are exact copies of the above section and are used to support multiple station configurations.
- ["wifi.sta1", "wifi.sta", {title: "WiFi Station Config 1"}]
- ["wifi.sta1.enable", false]
- ["wifi.sta2", "wifi.sta", {title: "WiFi Station Config 2"}]
- ["wifi.sta2.enable", false]
- ["wifi.sta_rssi_thr", "i", -95, {title: "Do not consider APs with weaker signal"}]
- ["wifi.sta_connect_timeout", "i", 15, {title: "Timeout for connection, seconds"}]
- ["wifi.sta_roam_rssi_thr", "i", -80, {title: "If connected to AP with weaker signal, try to find a better one."}]
- ["wifi.sta_roam_interval", "i", 0, {title: "Scan for better APs at this interval. Set to positive number ot enable."}]
build_vars:
MGOS_WIFI_ENABLE_AP_STA: 0
cdefs:
# WPA enterprise does not work properly on ESP8266 anyway due to lack of resources.
# But if you insist, you can override this to 1.
MGOS_ESP8266_WIFI_ENABLE_WPAENT: 0
conds:
- when: mos.platform == "cc3200"
apply:
sources:
- src/cc32xx
- when: mos.platform == "cc3220"
apply:
sources:
- src/cc32xx
config_schema:
- ["wifi.sta.eap_method", "s", "", {title: "Valid values: TLS, TTLS_TLS, TTLS_MSCHAPv2, TTLS_PSK, PEAP0_TLS, PEAP0_MSCHAPv2, PEAP0_PSK, PEAP1_TLS, PEAP1_PSK, FAST_AUTH_PROVISIONING, FAST_UNAUTH_PROVISIONING, FAST_NO_PROVISIONING. If not specified, will try to guess based on parameters provided."}]
- ["wifi.sta.eap_cert_validation_disable", "b", false, {title: "Disable server cert validation"}]
- when: mos.platform == "esp8266"
apply:
libs:
- location: https://github.com/mongoose-os-libs/lwip
config_schema:
- ["wifi.sta_ps_mode", "i", 0, {title: "WiFi sleep mode: 0 - none, 1 - light, 2 - modem"}]
# min/max values are from enum RATE_11{B,G,N}_ID in the SDK, see user_interface.h for declarations.
- ["wifi.tx_rate_limit_11b", "i", -1, {title: "TX rate limit for 11B mode, ((max << 8) | min)"}]
- ["wifi.tx_rate_limit_11g", "i", -1, {title: "TX rate limit for 11G mode, ((max << 8) | min)"}]
- ["wifi.tx_rate_limit_11n", "i", -1, {title: "TX rate limit for 11N mode, ((max << 8) | min)"}]
cdefs:
MGOS_WIFI_ENABLE_AP_STA: 1
- when: mos.platform == "esp32"
apply:
sources:
- src/esp32xx
libs:
- location: https://github.com/mongoose-os-libs/lwip
config_schema:
- ["wifi.ap.bandwidth_20mhz", "b", false, {title: "enable 20MHz bandwidth AP operation"}]
- ["wifi.ap.protocol", "s", "BGN", {title: "802.11 Wi-Fi Protocol for AP Mode, defaults to BGN, can be any combination of BGNLR. Note LR only works between 2 ESP32 devices."}]
- ["wifi.sta_ps_mode", "i", 0, {title: "Power save mode for station: 0 - none, 1 - min, 2 - max."}]
- ["wifi.sta.protocol", "s", "BGN", {title: "802.11 Wi-Fi Protocol for STA Mode, defaults to BGN, can be any combination of BGNLR. Note LR only works between 2 ESP32 devices."}]
- ["wifi.sta.listen_interval_ms", "i", 0, {title: "DTIM Listen Interval (ms)"}]
cdefs:
MGOS_WIFI_ENABLE_AP_STA: 1
build_vars:
ESP_IDF_EXTRA_COMPONENTS: >
${build_vars.ESP_IDF_EXTRA_COMPONENTS}
esp_wifi wpa_supplicant
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_ESP32_WIFI_ENABLED=y
CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=n
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=n
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_NVS_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=4
CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y
CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION=n
conds:
- when: build_vars.MGOS_LWIP_ENABLE_IPV4_NAT == "1"
apply:
config_schema:
- ["wifi.ap.ipv4_nat_enable", "b", false, {title: "Enable IPv4 NAT"}]
- when: mos.platform == "esp32c3"
apply:
sources:
- src/esp32xx
libs:
- location: https://github.com/mongoose-os-libs/lwip
config_schema:
- ["wifi.ap.bandwidth_20mhz", "b", false, {title: "enable 20MHz bandwidth AP operation"}]
- ["wifi.ap.protocol", "s", "BGN", {title: "802.11 Wi-Fi Protocol for AP Mode, defaults to BGN, can be any combination of BGNLR. Note LR only works between 2 ESP32 devices."}]
- ["wifi.sta_ps_mode", "i", 0, {title: "Power save mode for station: 0 - none, 1 - min, 2 - max."}]
- ["wifi.sta.protocol", "s", "BGN", {title: "802.11 Wi-Fi Protocol for STA Mode, defaults to BGN, can be any combination of BGNLR. Note LR only works between 2 ESP32 devices."}]
- ["wifi.sta.listen_interval_ms", "i", 0, {title: "DTIM Listen Interval (ms)"}]
cdefs:
MGOS_WIFI_ENABLE_AP_STA: 1
build_vars:
ESP_IDF_EXTRA_COMPONENTS: >
${build_vars.ESP_IDF_EXTRA_COMPONENTS}
esp_wifi wpa_supplicant
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_ESP32_WIFI_ENABLED=y
CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=n
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=n
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_NVS_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=4
CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y
CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION=n
conds:
- when: build_vars.MGOS_LWIP_ENABLE_IPV4_NAT == "1"
apply:
config_schema:
- ["wifi.ap.ipv4_nat_enable", "b", false, {title: "Enable IPv4 NAT"}]
- when: mos.platform == "rs14100"
apply:
libs:
- location: https://github.com/mongoose-os-libs/lwip
config_schema:
- ["wifi.sta.band", "i", 2, {title: "Frequency band for station: 0 - 2.4 GHz, 1 - 5 GHz, 2 - both"}]
- ["wifi.sta_params", "o", {title: "Common station params"}]
- ["wifi.sta_params.bg_scan", "o", {title: "BG scan params"}]
- ["wifi.sta_params.bg_scan.enable", "b", true, {title: "Enable BG scan when connected"}]
- ["wifi.sta_params.bg_scan.period", "i", 10, {title: "Perform BG periodically"}]
- ["wifi.sta_params.bg_scan.rssi_threshold", "i", -70, {title: "Perform BG scan if RSSI falls below this value"}]
- ["wifi.sta_params.bg_scan.rssi_tolerance", "i", 4, {title: "Perform BG scan if RSSI changes by this amount between probes"}]
- ["wifi.sta_params.bg_scan.active_duration_ms", "i", 15, {title: "Active scan duration, ms per channel"}]
- ["wifi.sta_params.bg_scan.passive_duration_ms", "i", 20, {title: "Passive scan duration, ms per channel (for DFS channels)"}]
- ["wifi.sta_params.roaming", "o", {title: "Roaming params"}]
- ["wifi.sta_params.roaming.enable", "b", true, {title: "Enable roaming"}]
- ["wifi.sta_params.roaming.rssi_threshold", "i", -70, {title: "Find better AP if RSSI falls below this value"}]
- ["wifi.sta_params.roaming.rssi_hysteresis", "i", 5, {title: "Move to new AP if its RSSI is better than current by this number"}]
cdefs:
MG_ENABLE_DNS_SERVER: 1
tags:
- c
- net
- wifi
- docs:net:WiFi
manifest_version: 2017-09-29