Browse Source

snippets: Add Wi-Fi IPv4 and IPv6 snippet

Introduce a snippet for configuring IPv4 and IPv6 over Wi-Fi support
in networking samples.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
pull/87825/head
Jukka Rissanen 4 months ago committed by Henrik Brix Andersen
parent
commit
38caff2886
  1. 28
      snippets/wifi-ip/README.rst
  2. 3
      snippets/wifi-ip/snippet.yml
  3. 32
      snippets/wifi-ip/wifi-ip.conf

28
snippets/wifi-ip/README.rst

@ -0,0 +1,28 @@
.. _snippet-wifi-ip:
Wi-Fi IPv4 and IPv6 Snippet (wifi-ip)
#####################################
.. code-block:: console
west build -S wifi-ip [...]
Overview
********
This snippet enables IPv4 and IPv6 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-ip/snippet.yml

@ -0,0 +1,3 @@
name: wifi-ip
append:
EXTRA_CONF_FILE: wifi-ip.conf

32
snippets/wifi-ip/wifi-ip.conf

@ -0,0 +1,32 @@
# 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_ZVFS_POLL_MAX=10
# Enable both IPv4 and IPv6
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
# DHCPv4 and DHCPv6 are enabled
CONFIG_NET_DHCPV4=y
CONFIG_NET_DHCPV6=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR=""
CONFIG_NET_CONFIG_MY_IPV6_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…
Cancel
Save