You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This blog post explores the esp-wifi-remote ecosystem, its components, architecture, and how it integrates with esp-hosted to provide seamless WiFi connectivity to previously WiFi-less devices.
11
+
This blog post explores the esp-wifi-remote ecosystem, its components, architecture, and integration with esp-hosted to provide WiFi connectivity to previously WiFi-less devices.
12
12
13
13
## Introduction
14
14
15
-
The ESP-IDF's `esp_wifi` API is a mature and stable interface that has powered WiFi connectivity across generations of ESP32 chipsets. However, with the introduction of new ESP32 series chips that do not include native WiFi hardware—such as ESP32-P4 and ESP32-H2—developers may wonder: what WiFi API should they use on these devices? The answer is simple: by adding **esp-wifi-remote**, you can use exactly the same `esp_wifi` APIs on non-WiFi ESP chipsets as you would on traditional WiFi-enabled ones. This seamless compatibility allows developers to leverage their existing knowledge and codebase, extending WiFi functionality to a broader range of ESP devices with minimal changes.
15
+
The ESP-IDF's `esp_wifi` API powers WiFi connectivity across ESP32 chipsets. However, new ESP32 series chips like ESP32-P4 and ESP32-H2 lack native WiFi hardware. With **esp-wifi-remote**, you can use the same `esp_wifi` APIs on non-WiFi ESP chipsets as on WiFi-enabled ones. This compatibility lets developers leverage existing knowledge and codebase with minimal changes.
16
+
17
+
### Terminology
18
+
19
+
Before diving into the details, let's establish the key terminology used throughout this post:
20
+
21
+
**Backend Solution**: The communication layer that handles the transport of WiFi commands, events, and data between host and slave devices. Examples include esp-hosted, eppp, and AT-based implementations.
22
+
23
+
**Host-side**: The device running your application code (e.g., ESP32-P4, ESP32-H2, or ESP32 with WiFi).
24
+
25
+
**Slave-side**: The WiFi-capable device that provides the actual WiFi hardware and functionality.
B --> C[Backend Solution Host<br/>esp-hosted/eppp/at]
34
+
end
35
+
36
+
subgraph "Slave-side"
37
+
D[Backend Solution Slave<br/>esp-hosted/eppp/at] --> E[WiFi Hardware<br/>ESP32 with WiFi]
38
+
end
39
+
40
+
C <--> D
41
+
42
+
style A fill:#e8f5e8
43
+
style B fill:#fff3e0
44
+
style C fill:#e3f2fd
45
+
style D fill:#e3f2fd
46
+
style E fill:#f3e5f5
47
+
```
16
48
17
49
## Understanding the WiFi Experience
18
50
19
-
Let's first look at the traditional WiFi experience to see how esp-wifi-remote enables the same seamless experience with external WiFi hardware.
51
+
Let's examine the traditional WiFi experience and how esp-wifi-remote enables the same experience with external WiFi hardware.
20
52
21
53
### 1. Traditional WiFi Experience
22
54
@@ -39,11 +71,11 @@ graph LR
39
71
style WIFI fill:#e8f5e8
40
72
```
41
73
42
-
This is the conventional setup where applications directly interface with the WiFi hardware through the standard ESP-IDF WiFi APIs. The user experience is seamless—you call `esp_wifi_init()`, `esp_wifi_connect()`, and other familiar functions, and WiFi just works.
74
+
Applications directly interface with WiFi hardware through ESP-IDF WiFi APIs. You call `esp_wifi_init()`, `esp_wifi_connect()`, and other functions, and WiFi works.
43
75
44
76
### 2. esp-wifi-remote: Same Experience, External Hardware
45
77
46
-
**esp-wifi-remote**is designed to provide exactly the same user experience as the traditional WiFi setup, but with external WiFi hardware. This works in two scenarios:
78
+
**esp-wifi-remote**provides the same user experience as traditional WiFi setup, but with external WiFi hardware. This works in two scenarios:
47
79
* Non-WiFi Chipsets: The traditional use case of providing WiFi functionality on ESP32-P4
48
80
* WiFi enabled Chipsets: It is possible to use esp-wifi-remote on ESP32 chips which already have WiFi
49
81
- narrow use case where multiple WiFi interfaces are needed (e.g. for bridging networks, filtering packets, ...)
@@ -76,11 +108,11 @@ graph LR
76
108
style SLAVE_RPC fill:#fff3e0
77
109
```
78
110
79
-
The magic here is that your application code remains identical to the traditional WiFi case. You still call `esp_wifi_init()`, `esp_wifi_connect()`, and all the familiar functions—esp-wifi-remote transparently redirects these calls through the RPC layer to a WiFi-capable slave device.
111
+
Your application code remains identical to the traditional WiFi case. You call `esp_wifi_init()`, `esp_wifi_connect()`, and other functions—esp-wifi-remote transparently redirects these calls through the RPC layer to a WiFi-capable slave device.
80
112
81
113
#### Scenario B: WiFi-Enabled Chipsets with Additional Interfaces
82
114
83
-
For chipsets that already have WiFi, esp-wifi-remote can add additional wireless interfaces, giving you both native and remote WiFi capabilities:
115
+
For chipsets with WiFi, esp-wifi-remote can add additional wireless interfaces, providing both native and remote WiFi capabilities:
84
116
85
117
```mermaid
86
118
graph LR
@@ -110,11 +142,11 @@ graph LR
110
142
style SLAVE_RPC fill:#fff3e0
111
143
```
112
144
113
-
This scenario enables dual WiFi interfaces—one native and one remote—providing enhanced connectivity options for complex applications that need multiple wireless connections.
145
+
This scenario enables dual WiFi interfaces—one native and one remote—for applications that need multiple wireless connections.
114
146
115
147
## Component breakdown
116
148
117
-
esp_wifi_remote is just a thin layer that translates esp_wifi API calls into the appropriate implementation, but it's important to understand these basic aspects:
149
+
esp_wifi_remote is a thin layer that translates esp_wifi API calls into the appropriate implementation. Key aspects:
118
150
* API
119
151
- Remote WiFi calls: Set of esp_wifi API namespaced with `esp_wifi_remote` prefix
120
152
- Standard WiFi calls: esp_wifi API directly translates to esp_wifi_remote API for targets with no WiFi.
@@ -143,11 +175,11 @@ graph TD
143
175
144
176
### WiFi configuration
145
177
146
-
You can configure the remote WiFi exactly the same way as the local WiFi, the Kconfig options are structured the same way and called exactly the same, but located under ESP WiFi Remote component instead.
178
+
You can configure remote WiFi the same way as local WiFi. Kconfig options are structured identically but located under ESP WiFi Remote component.
147
179
148
180
#### Local vs. Remote WiFi configuration
149
181
150
-
The names of Kconfig options are the same, but the identifiers are prefixed differently in order to differentiate between local and remote WiFi.
182
+
Kconfig option names are the same, but identifiers are prefixed differently to differentiate between local and remote WiFi.
151
183
152
184
> [!TIP] Adapt options from sdkconfig
153
185
> If you're migrating your project from a WiFi enabled device and used specific configuration options, please make sure the remote config options are prefixed with `WIFI_RMT_` instead of `ESP_WIFI_`, for example:
@@ -166,7 +198,7 @@ The RPC libraries could perform a consistency check but cannot reconfigure the s
166
198
167
199
### Choice of esp-wifi-remote implementation component
168
200
169
-
The default and recommended option is to use `esp_hosted` as your RPC library for most use-cases, is it provide the best performance, integration, maturity and support.
201
+
The default and recommended option is `esp_hosted` as your RPC library for most use-cases, providing the best performance, integration, maturity and support.
170
202
171
203
You can also switch to `eppp` or `at` based implementation or implement your own RPC mechanism.
172
204
Here are the reasons you might prefer some other implementation than `esp_hosted`:
@@ -177,15 +209,14 @@ Here are the reasons you might prefer some other implementation than `esp_hosted
177
209
178
210
### Internal implementation
179
211
180
-
The `esp-wifi` component interface and functionality is dependent on the actual WiFi hardware, i.e. the actual target capabilites. The `esp-wifi-remote` needs to follow these dependencies, which are in turn based on the remote target, i.e. slave WiFi hardware.
181
-
That's why some wireless and system capability flags and options are replaced internally with `SOC_SLAVE` prefix. Similarly the host side config options are prefixed with `WIFI_RMT` to be used in `esp-wifi-remote` headers. You can read more about the adaptation in [WiFi remote](https://github.com/espressif/esp-wifi-remote/blob/main/components/esp_wifi_remote/README.md#dependencies-on-esp_wifi) documentation.
212
+
The `esp-wifi` component interface depends on WiFi hardware capabilities. `esp-wifi-remote` follows these dependencies based on the slave WiFi hardware. Some wireless and system capability flags are replaced internally with `SOC_SLAVE` prefix. Host-side config options are prefixed with `WIFI_RMT` for use in `esp-wifi-remote` headers. See [WiFi remote](https://github.com/espressif/esp-wifi-remote/blob/main/components/esp_wifi_remote/README.md#dependencies-on-esp_wifi) documentation for details.
182
213
183
214
> [!Note]
184
215
> These options and flags are only related to the host side, as `esp-wifi-remote` is a host side layer. For slave side options, please refer to the actual RPC implementation library.
185
216
186
217
#### Comparison of RPC implementor components
187
218
188
-
This section focuses on comparing the RPC libraries in more details, mainly how these different methods marshall WiFi commands,events and data to the slave device.
219
+
This section compares RPC libraries, focusing on how different methods marshall WiFi commands,events and data to the slave device.
189
220
190
221
**Principle of operation**
191
222
@@ -215,7 +246,7 @@ esp-hosted uses a plain text channel to send and receive WiFi API calls and even
215
246
216
247
**Performance**
217
248
218
-
As mentioned above, the best throughput experience is achieved with `esp_hosted` implementation.
249
+
The best throughput is achieved with `esp_hosted` implementation.
219
250
220
251
| RPC component | Maximum TCP throughput | More details |
@@ -225,15 +256,15 @@ As mentioned above, the best throughput experience is achieved with `esp_hosted`
225
256
226
257
## Other connectivity options
227
258
228
-
This blog post focuses on *esp-wifi-remote* solutions only, it doesn't discuss related topics, such as Bluetooth and BLE connectivity, `esp-extconn` component or some other means of using Wi-Fi library on remote targets.
259
+
This blog post focuses on *esp-wifi-remote* solutions only. It doesn't discuss Bluetooth, BLE connectivity, `esp-extconn` component or other means of using Wi-Fi library on remote targets.
229
260
230
261
### esp-extconn
231
262
232
-
This solution doesn't fall into *esp-wifi-remote* category and needs a special target for the slave side (ESP8693), but provides the best throughput (up to 80Mbps). Read more about it[esp-extconn repository](https://github.com/espressif/esp-extconn/)
263
+
This solution doesn't fall into *esp-wifi-remote* category and needs a special target for the slave side (ESP8693), but provides the best throughput (up to 80Mbps). See[esp-extconn repository](https://github.com/espressif/esp-extconn/)
233
264
234
265
### Custom connectivity other options
235
266
236
-
It is also possible to use your own implementation of Wi-Fi connectivity by means of the below components:
267
+
You can also implement your own Wi-Fi connectivity using these components:
237
268
238
269
| component | Repository | Brief description |
239
270
|-----------|------------|-------------------|
@@ -248,11 +279,11 @@ It is also possible to use your own implementation of Wi-Fi connectivity by mean
248
279
249
280
Two critical considerations emerge from this exploration:
250
281
251
-
**1. Use esp-hosted as your RPC library** -- For most use cases, esp-hosted provides the optimal solution with up to 50Mbps throughput, mature integration, and comprehensive support. While alternatives like `wifi_remote_over_eppp` (20Mbps) and `wifi_remote_over_at` (2Mbps) exist for specific scenarios, esp-hosted delivers the best performance and reliability for general applications.
282
+
**1. Use esp-hosted as your RPC library** - Provides optimal performance (50Mbps), mature integration, and comprehensive support. Alternatives like `wifi_remote_over_eppp` (20Mbps) and `wifi_remote_over_at` (2Mbps) exist for specific scenarios.
252
283
253
-
**2. Mind the WiFi slave configuration** - Since esp-wifi-remote operates as a compile-time configuration system, it cannot automatically reconfigure the slave device at runtime. Developers must manually configure the slave-side WiFi options and rebuild the slave application to ensure consistency between host and slave configurations. This is particularly important when migrating from WiFi-enabled devices, where configuration options must be prefixed with `WIFI_RMT_` instead of `ESP_WIFI_`.
284
+
**2. Mind the WiFi slave configuration** - esp-wifi-remote operates as a compile-time configuration system. Developers must manually configure slave-side WiFi options and rebuild the slave application. When migrating from WiFi-enabled devices, configuration options must be prefixed with `WIFI_RMT_` instead of `ESP_WIFI_`.
254
285
255
-
By following these guidelines, developers can successfully implement esp-wifi-remote solutions that provide the same familiar WiFi experience across diverse ESP32 hardware platforms, from traditional WiFi-enabled chipsets to the latest non-WiFi variants like ESP32-P4 and ESP32-H2.
286
+
Following these guidelines enables successful esp-wifi-remote implementation across diverse ESP32 hardware platforms.
0 commit comments