snippets: Add Wi-Fi IPv4 snippet
Introduce a snippet for configuring IPv4 over Wi-Fi support in networking samples. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
b2e61ef355
commit
0fdfad84de
3 changed files with 62 additions and 0 deletions
28
snippets/wifi-ipv4/README.rst
Normal file
28
snippets/wifi-ipv4/README.rst
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
.. _snippet-wifi-ipv4:
|
||||||
|
|
||||||
|
Wi-Fi IPv4 Snippet (wifi-ipv4)
|
||||||
|
##############################
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
west build -S wifi-ipv4 [...]
|
||||||
|
|
||||||
|
Overview
|
||||||
|
********
|
||||||
|
|
||||||
|
This snippet enables IPv4 Wi-Fi support in supported networking samples.
|
||||||
|
The sample execution is postponed until Wi-Fi connectivity is established.
|
||||||
|
|
||||||
|
Use Wi-Fi shell to connect to the Wi-Fi network:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
wifi connect -s <SSID> -k <key_management> -p <passphrase>
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
************
|
||||||
|
|
||||||
|
Hardware support for:
|
||||||
|
|
||||||
|
- :kconfig:option:`CONFIG_WIFI`
|
||||||
|
- :kconfig:option:`CONFIG_WIFI_USE_NATIVE_NETWORKING`
|
3
snippets/wifi-ipv4/snippet.yml
Normal file
3
snippets/wifi-ipv4/snippet.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
name: wifi-ipv4
|
||||||
|
append:
|
||||||
|
EXTRA_CONF_FILE: wifi-ipv4.conf
|
31
snippets/wifi-ipv4/wifi-ipv4.conf
Normal file
31
snippets/wifi-ipv4/wifi-ipv4.conf
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Wi-Fi
|
||||||
|
CONFIG_WIFI=y
|
||||||
|
CONFIG_NET_L2_ETHERNET=y
|
||||||
|
CONFIG_WIFI_NM_WPA_SUPPLICANT=y
|
||||||
|
|
||||||
|
# Make sure there is enough resources for supplicant and most of the samples
|
||||||
|
CONFIG_MAIN_STACK_SIZE=2048
|
||||||
|
CONFIG_ZVFS_OPEN_MAX=24
|
||||||
|
CONFIG_NET_MAX_CONN=10
|
||||||
|
CONFIG_NET_SOCKETS_POLL_MAX=9
|
||||||
|
|
||||||
|
# IPv4 only for now
|
||||||
|
CONFIG_NET_IPV6=n
|
||||||
|
CONFIG_NET_CONFIG_NEED_IPV6=n
|
||||||
|
CONFIG_NET_IPV4=y
|
||||||
|
|
||||||
|
# DHCPv4
|
||||||
|
CONFIG_NET_DHCPV4=y
|
||||||
|
CONFIG_NET_CONFIG_MY_IPV4_ADDR=""
|
||||||
|
CONFIG_NET_CONFIG_INIT_TIMEOUT=0
|
||||||
|
|
||||||
|
# DNS
|
||||||
|
CONFIG_DNS_RESOLVER=y
|
||||||
|
|
||||||
|
# Connection manager
|
||||||
|
CONFIG_NET_CONNECTION_MANAGER=y
|
||||||
|
|
||||||
|
# Wi-Fi shell
|
||||||
|
CONFIG_NET_SHELL=y
|
||||||
|
CONFIG_NET_L2_WIFI_SHELL=y
|
||||||
|
CONFIG_SHELL_STACK_SIZE=5200
|
Loading…
Add table
Add a link
Reference in a new issue