cpu/esp: implement ESP WiFi SoftAP mode#14117
Conversation
|
|
dbb8853 to
60778f5
Compare
|
Btw, what about using the mac as the SSID? e.g: |
|
Is there any reason why the SoftAP is limited to ESP32? It should work in same way with ESP8266. |
The limitation is not having the hardware, I'll modify the code to see if a colleague can test it. |
I will test it for you. Tomorrow at the latest, I'll review your changes and make suggestions on how to change them so that it also works with ESP8266. The background is that I already had a local implementation of the SoftAP a few months ago. However, I had not completed it and therefore I had not yet provided it as PR. |
|
@gschorcht I've dropped the Works fine if the ESP32 sets the channel alone. |
gschorcht
left a comment
There was a problem hiding this comment.
Some remarks. I will test it later today.
Indeed, in my local implementation, I didn't define the used channel. |
We could do it in that way to be able to divide multiple APs in same area, but only as default value. But it must be overridable in case a user wants to set up an ESS where all APs must have the same SSID. |
|
Tested with one ESP32 and one ESP8266:
|
|
On a803312 I've added support for the auto-generated SSID using a common prefix. The default is: An static SSID can be specified by setting |
gschorcht
left a comment
There was a problem hiding this comment.
The new WiFi mode including its configuration parameters have to be documented in cpu/esp32/doc.txt as well as cpu/esp8266/doc.txt.
gschorcht
left a comment
There was a problem hiding this comment.
Sorry for nitpicking. Some small changes, which Travis CI pointed out, we could also clean up to improve the quality.
|
Documentation for ESP32/ESP8266 added on edf7df7 |
|
I'd say an AP with limitations is better than no AP at all. |
8c4b11f to
9643c8e
Compare
benpicco
left a comment
There was a problem hiding this comment.
looks good, will test soon.
| #ifdef MODULE_ESP_WIFI_AP | ||
| .ssid_hidden = ESP_WIFI_SSID_HIDDEN, /* don't make the AP visible */ | ||
| .max_connection = ESP_WIFI_MAX_CONN, /* maximum number of connections */ | ||
| .beacon_interval = 100, /* send beacon every 100 ms */ |
There was a problem hiding this comment.
Does it need to be that often?
There was a problem hiding this comment.
Default is 100 ms for Espressif. Will add a configuration define for it though.
|
|
|
Added the configuration value for the beacon interval, and it's documentation. Also added the Kconfig feature for |
|
Nice, works like a charm! esp8266esp32Please squash! |
afb81c7 to
bde5c64
Compare
|
@benpicco commits squashed 😉 I'm still worried only about the need to look on the packet header to filter it, as Gunar said:
This can be replicated by sending a ping to a node that is connected to the AP from another node, it should give "Destination Unreachable" errors on the SoftAP node as I remember |
I have to disagree, it doesn't work even if you can ping from an STA node to AP. Since multicast frames for sleeping STA nodes aren't cached by the AP, Neighbor Solicitation for other STA nodes does't work. Therefore STA nodes can't connect to each other. This means that only the communication from an STA node via the AP as router to the outer network, but not the communication between STA nodes inside the WiFi network which is a limitation I wouldn't expect if I have an AP.
At the very least, this limitation would have to be very clearly documented. |
|
We could also call it Client Isolation and mention that the feature can't be turned off 😉 But yea this limitation should be mentioned in |
bde5c64 to
98c0899
Compare
This is an implementation of the ESP32 SoftAP mode using the `esp_wifi_ap` pseudomodule. Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com> Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
98c0899 to
295a366
Compare
|
Fixed the tables, and added a big warning for the AP Sleep bug (feature which can not be disabled 😉 ) of the SoftAP. |
|
@gschorcht are you fine with the warning? |
I'd say the comments have been addressed.
|
Thanks for the review :-) |
Contribution description
This is an implementation of the ESP32 SoftAP mode using the
esp_wifi_appseudomodule.The clients connected to the AP work normally (they are reachable with
ping6). As DHCP isn't implemented most OSes will struggle trying to get an IP from the ESP32 SoftAP.Testing procedure
gnrc_networkingexample and addUSEMODULE += esp_wifi_ap. Upon ESP32 initialization a WiFi AP is started with the default SSIDRIOT_AP.gnrc_networking, for exampleSTA connectedon the ESP32 AP. After that, it should be possible to ping in both directions.Issues/PRs references
#14114