Skip to content

Commit faaf10b

Browse files
sabollim-silabsarun-silabsmiduggan24
authored
Add dual stack lock app example (#662)
* Adding Dual Stack lock dual stack example with BLE enable on efr32 (#492) * Updated lock app dual stack build with new dual stack components (#604) * PR comments * Updating matter sdk pointer * remove dupicate files addd duirng rebase --------- Co-authored-by: arun-silabs <141724790+arun-silabs@users.noreply.github.com> Co-authored-by: Michael Duggan <miduggan@silabs.com>
1 parent 982e8e5 commit faaf10b

7 files changed

Lines changed: 295 additions & 3 deletions

File tree

matter_templates.xml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,22 @@
204204
<properties key="filters" value="Type|NCP Project\ Difficulty|Advanced Wireless\ Technology|Matter"/>
205205
<properties key="core.hidden" value="true"/>
206206
</descriptors>
207+
<descriptors name="MatterLockOverWiFi" label="Matter WiFi - 917 NCP Lock Dual Stack FreeRTOS"
208+
description="Demonstrates a sample implementation of a 917 NCP Matter over Wi-Fi door lock app with BLE on host (Dual stack - IPV6 on EFR32, IPV4 on SiWx917)">
209+
<properties key="namespace" value="template.uc"/>
210+
<properties key="keywords" value="Matter"/>
211+
<properties key="solutionReferenceId" value="slc.apps.lock_app.wifi.matter_wifi_917_ncp_lock_app_dual_stack_freertos.slcp"/>
212+
<properties key="projectFilePaths" value="slc/apps/lock_app/wifi/matter_wifi_917_ncp_lock_app_dual_stack_freertos.slcp"/>
213+
<properties key="boardCompatibility" value="brd4186c brd4187c com.silabs.board.none"/>
214+
<properties key="partCompatibility" value=".*efr32mg24.*"/>
215+
<properties key="ideCompatibility" value="generic-template makefile-ide simplicity-ide visual-studio-code visual-studio-code-cmake"/>
216+
<properties key="toolchainCompatibility" value="gcc"/>
217+
<properties key="category" value="Matter Application"/>
218+
<properties key="quality" value="PRODUCTION"/>
219+
<properties key="stockConfigCompatibility" value="com.silabs.ss.framework.project.toolchain.core.default"/>
220+
<properties key="filters" value="Type|NCP Project\ Difficulty|Advanced Wireless\ Technology|Matter"/>
221+
<properties key="core.hidden" value="true"/>
222+
</descriptors>
207223
<descriptors name="MatterRefrigeratorOverWiFi" label="Matter WiFi - SoC Refrigerator FreeRTOS"
208224
description="Demonstrates a sample implementation of a Matter over Wi-Fi refrigerator app">
209225
<properties key="namespace" value="template.uc"/>
@@ -632,6 +648,23 @@
632648
<properties key="filters" value="Type|NCP Project\ Difficulty|Advanced Wireless\ Technology|Matter"/>
633649
<properties key="solutionProjects" value="slc.apps.bootloaders.bootloader_storage_internal_single_series_2.matter_bootloader_internal_series_2.slcp slc.apps.lock_app.wifi.matter_wifi_917_ncp_lock_app_freertos.slcp"/>
634650
</descriptors>
651+
<descriptors name="MatterLockOverWifiSolution" label="Matter WiFi - 917 NCP Lock Dual Stack FreeRTOS"
652+
description="Demonstrates a sample implementation of a 917 NCP Matter over Wi-Fi door lock app with BLE on host (Dual stack - IPV6 on EFR32, IPV4 on SiWx917) with internal bootloader">
653+
<properties key="namespace" value="template.solution.uc"/>
654+
<properties key="keywords" value="Matter"/>
655+
<properties key="solutionReferenceId" value="slc.apps.lock_app.wifi.matter_wifi_917_ncp_lock_app_dual_stack_freertos.slcw"/>
656+
<properties key="projectFilePaths" value="slc/apps/lock_app/wifi/matter_wifi_917_ncp_lock_app_dual_stack_freertos.slcw"/>
657+
<properties key="readmeFiles" value="slc/apps/lock_app/wifi/README_WiFi.md"/>
658+
<properties key="boardCompatibility" value=" brd4186c brd4187c com.silabs.board.none"/>
659+
<properties key="partCompatibility" value=".*efr32mg24.*"/>
660+
<properties key="ideCompatibility" value="generic-template makefile-ide simplicity-ide visual-studio-code visual-studio-code-cmake"/>
661+
<properties key="toolchainCompatibility" value="gcc"/>
662+
<properties key="category" value="Matter Application"/>
663+
<properties key="quality" value="PRODUCTION"/>
664+
<properties key="stockConfigCompatibility" value="com.silabs.ss.framework.project.toolchain.core.default"/>
665+
<properties key="filters" value="Type|NCP Project\ Difficulty|Advanced Wireless\ Technology|Matter"/>
666+
<properties key="solutionProjects" value="slc.apps.bootloaders.bootloader_storage_internal_single_series_2.matter_bootloader_internal_series_2.slcp slc.apps.lock_app.wifi.matter_wifi_917_ncp_lock_app_dual_stack_freertos.slcp"/>
667+
</descriptors>
635668
<descriptors name="MatterOnOffPlugOverThreadSolution" label="Matter Thread - SoC Onoff Plug with external Bootloader FreeRTOS"
636669
description="Demonstrates a sample implementation of a Matter over Thread on/off plug app with external bootloader">
637670
<properties key="namespace" value="template.solution.uc"/>
@@ -1736,4 +1769,4 @@
17361769
<properties key="filters" value="Type|SoC Project\ Difficulty|Advanced Wireless\ Technology|Matter"/>
17371770
<properties key="solutionProjects" value="slc.apps.platform_template.wifi.matter_wifi_soc_platform_template_freertos.slcp"/>
17381771
</descriptors>
1739-
</model:MDescriptors>
1772+
</model:MDescriptors>

slc/apps/lighting_app/wifi/matter_wifi_soc_lighting_app_freertos.slcp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ component:
6363
- id: matter_shell
6464
- id: matter_default_lcd_config
6565
- id: matter_log_uart
66+
- id: matter_lwip
6667

6768
- id: matter_lighting
6869

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
2+
project_name: matter_wifi_917_ncp_lock_app_dual_stack_freertos
3+
label: Matter WiFi - 917 NCP Lock Dual Stack FreeRTOS
4+
description: Demonstrates a sample implementation of a 917 NCP Matter over Wi-Fi door lock app with BLE on host (Dual stack - IPV6 on EFR32, IPV4 on SiWx917)
5+
quality: production
6+
package: matter
7+
8+
sdk_extension:
9+
- id: matter
10+
version: "2.9.0"
11+
vendor: silabs
12+
- id: wiseconnect3_sdk
13+
version: "4.1.0"
14+
vendor: silabs
15+
16+
component:
17+
- id: device_init
18+
- id: sl_main
19+
- id: matter_buttons
20+
- id: matter_leds
21+
22+
- id: matter
23+
- id: matter_platform_mg
24+
- id: matter_ble
25+
- id: matter_ota_support
26+
- id: matter_crypto
27+
- id: matter_efr32_ncp
28+
- id: matter_wifi
29+
- id: siwx917_ncp
30+
- id: matter_dual_stack
31+
- id: matter_lock
32+
- id: app_common
33+
- id: matter_provision_default
34+
35+
- id: matter_codegen_dm
36+
- id: mbedtls_pki_aws
37+
condition: [matter_aws]
38+
- id: mbedtls_entropy_default_aws
39+
condition: [matter_aws]
40+
- id: psa_crypto_tls12_prf
41+
condition: [matter_aws]
42+
43+
- id: matter_access_control
44+
- id: matter_administrator_commissioning
45+
- id: matter_basic_information
46+
- id: matter_descriptor
47+
- id: matter_diagnostic_logs
48+
- id: matter_door_lock
49+
- id: matter_ethernet_network_diagnostics
50+
- id: matter_fixed_label
51+
- id: matter_general_commissioning
52+
- id: matter_general_diagnostics
53+
- id: matter_group_key_mgmt
54+
- id: matter_groups
55+
- id: matter_identify
56+
- id: matter_localization_configuration
57+
- id: matter_network_commissioning
58+
- id: matter_operational_credentials
59+
- id: matter_ota_requestor
60+
- id: matter_power_source_configuration
61+
- id: matter_power_source
62+
- id: matter_software_diagnostics
63+
- id: matter_thread_network_diagnostics
64+
65+
- id: matter_time_format_localization
66+
- id: matter_user_label
67+
- id: matter_unit_localization
68+
- id: matter_wifi_network_diagnostics
69+
# Override configuration for JTAG use
70+
- id: matter_configuration_over_swo
71+
- id: matter_segger_rtt
72+
73+
- id: matter_shell
74+
- id: matter_icd_core
75+
- id: matter_test_event_trigger
76+
- id: matter_icd_management
77+
- id: matter_log_uart
78+
79+
- id: wifi_resources
80+
- id: wifi
81+
- id: basic_network_config_manager
82+
- id: sl_si91x_basic_buffers
83+
- id: sl_si91x_wireless
84+
85+
# Require LCD and QR Code components only on the boards that support LCD
86+
#requires:
87+
# - name: matter_default_lcd_config
88+
89+
config_file:
90+
- path: ../../../../third_party/matter_sdk/examples/lock-app/silabs/data_model/lock-app.zap
91+
directory: common
92+
file_id: zap_config
93+
- path: ../../../../provision.mattpconf
94+
directory: provision
95+
file_id: provision_config
96+
97+
include:
98+
- path: ../../../../third_party/matter_sdk/examples/lock-app/silabs/include
99+
file_list:
100+
- path: AppConfig.h
101+
- path: AppEvent.h
102+
- path: AppTask.h
103+
- path: LockManager.h
104+
- path: CHIPProjectConfig.h
105+
directory: include
106+
107+
source:
108+
- path: ../../../../third_party/matter_sdk/examples/lock-app/silabs/src/AppTask.cpp
109+
directory: src
110+
- path: ../../../../third_party/matter_sdk/examples/lock-app/silabs/src/LockManager.cpp
111+
directory: src
112+
- path: ../../../../third_party/matter_sdk/examples/platform/silabs/main.cpp
113+
directory: src
114+
- path: ../../../../third_party/matter_sdk/examples/lock-app/silabs/src/DataModelCallbacks.cpp
115+
directory: src
116+
117+
define:
118+
- name: CHIP_CRYPTO_PLATFORM
119+
value: "1"
120+
- name: _WANT_REENT_SMALL
121+
value: "1"
122+
- name: IS_DEMO_LOCK
123+
value: "1"
124+
- name: NVM3_DEFAULT_NVM_SIZE
125+
value: "40960"
126+
- name: NVM3_DEFAULT_MAX_OBJECT_SIZE
127+
value: "4092"
128+
- name: SLI_SI91X_ENABLE_IPV6
129+
value: "1"
130+
configuration:
131+
- name: SL_SPIDRV_EXP_BITRATE
132+
value: "10000000"
133+
- name: SL_SPIDRV_EUSART_EXP_BITRATE
134+
value: "10000000"
135+
- name: SL_POWER_MANAGER_LOWEST_EM_ALLOWED
136+
value: "1"
137+
- name: SL_PSA_KEY_USER_SLOT_COUNT
138+
value: "21"
139+
- name: SL_POWER_MANAGER_CONFIG_VOLTAGE_SCALING_FAST_WAKEUP
140+
value: "1"
141+
- name: SL_STACK_SIZE
142+
value: "4608"
143+
- name: SL_BT_RTOS_EVENT_HANDLER_STACK_SIZE
144+
value: "1536"
145+
unless: [device_series_3]
146+
- name: SL_BT_RTOS_EVENT_HANDLER_STACK_SIZE
147+
value: "1856"
148+
condition: [device_series_3]
149+
# Default ICD configurations
150+
- name: SL_IDLE_MODE_DURATION_S
151+
value: "600"
152+
- name: SL_ACTIVE_MODE_DURATION_MS
153+
value: "0"
154+
- name: SL_ACTIVE_MODE_THRESHOLD
155+
value: "0"
156+
- name: SL_TRANSPORT_IDLE_INTERVAL
157+
value: "3000"
158+
159+
- name: CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED
160+
value: "1"
161+
- name: CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION
162+
value: "0"
163+
- name: SL_MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS
164+
value: 1
165+
166+
toolchain_settings:
167+
- option: cxx_standard
168+
value: gnu++17
169+
170+
readme:
171+
- path: ./README_WiFi.md
172+
ui_hints:
173+
highlight:
174+
- path: README_WiFi.md
175+
focus: false
176+
177+
tag:
178+
- hardware:component:led:2+
179+
post_build:
180+
profile: application
181+
182+
other_file:
183+
- path: ../../../image/qr_code_img.png
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
workspace_name: matter_wifi_917_ncp_lock_app_dual_stack_freertos
2+
label: Matter WiFi - 917 NCP Lock Dual Stack FreeRTOS
3+
quality: production
4+
package: matter
5+
description: Demonstrates a sample implementation of a 917 NCP Matter over Wi-Fi door lock app with BLE on host (Dual stack - IPV6 on EFR32, IPV4 on SiWx917) with internal bootloader
6+
project:
7+
- path: ./matter_wifi_917_ncp_lock_app_dual_stack_freertos.slcp
8+
id: application
9+
output: lock-app-917-ncp-dual-stack
10+
- path: ../../bootloaders/bootloader_storage_internal_single_series_2/matter_bootloader_internal_series_2.slcp
11+
id: bootloader
12+
output: matter_bootloader
13+
post_build:
14+
path: ../../../postbuild/ws_default_application_bootloader.slpb

slc/component/matter-wifi/917-ncp/siwx917_ncp.slcc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ id: siwx917_ncp
22
package: matter
33
label: SiWx917 NCP Extension
44
description: >
5-
Adds support for the HAL and WiFi Driver layer for SiWx917 NCP devices
5+
Adds support for the HAL, BLE and WiFi Driver layer for SiWx917 NCP devices
66
category: Matter-WiFi|Platform|Drivers
77
quality: production
88
metadata:
@@ -37,6 +37,7 @@ include:
3737
file_list:
3838
- path: spi_multiplex.h
3939
- path: third_party/matter_sdk/src/platform/silabs/SiWx/ble
40+
unless: [matter_ble]
4041
file_list:
4142
- path: ble_config.h
4243
- path: sl_si91x_ble_init.h
@@ -50,11 +51,16 @@ include:
5051
- path: WifiInterfaceImpl.h
5152

5253
source:
54+
5355
- path: third_party/matter_sdk/src/platform/silabs/wifi/WifiInterface.cpp
5456
- path: third_party/matter_sdk/src/platform/silabs/wifi/SiWx/WifiInterfaceImpl.cpp
5557
- path: third_party/matter_sdk/src/platform/silabs/wifi/SiWx/ncp/sl_si91x_ncp_utility.c
5658
- path: third_party/matter_sdk/src/platform/silabs/SiWx/ble/BLEManagerImpl.cpp
59+
unless: [matter_ble]
5760
- path: third_party/matter_sdk/src/platform/silabs/SiWx/ble/sl_si91x_ble_init.cpp
61+
unless: [matter_ble]
62+
- path: third_party/matter_sdk/src/platform/silabs/efr32/BLEManagerImpl.cpp
63+
condition: [matter_ble]
5864

5965
define:
6066
- name: SL_MATTER_SIWX_WIFI_ENABLE
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
id: matter_dual_stack
2+
package: matter
3+
description: >
4+
Matter Wi-Fi network stack provider for dual-stack configurations on
5+
SiWx917-based platforms (IPv4 over NWP offload + IPv6 over host LwIP).
6+
Drop-in alternative to matter_lwip; selected in place of it for dual-stack
7+
Matter applications. Defines SL_MATTER_ENABLE_DUAL_STACK=1, mirroring the
8+
enable_matter_dual_stack flag in the GN build system.
9+
label: Matter Dual Stack
10+
category: Matter-WiFi|lwip
11+
quality: production
12+
metadata:
13+
sbom:
14+
license: Zlib
15+
16+
provides:
17+
- name: matter_dual_stack
18+
- name: matter_lwip
19+
- name: lwip
20+
- name: lwip_port_freertos
21+
- name: netstack_silabs_lwip_port_freertos
22+
- name: sl_si91x_errno
23+
24+
requires:
25+
- name: sl_si91x_network_dual_stack
26+
- name: sl_si91x_asynchronous_socket
27+
28+
include:
29+
- path: third_party/matter_sdk/src/lwip/silabs
30+
file_list:
31+
- path: lwipopts.h
32+
- path: lwipopts-siwx.h
33+
- path: arch/cc.h
34+
- path: arch/perf.h
35+
- path: lwippools.h
36+
- path: slc/inc/lwip
37+
file_list:
38+
- path: lwip_buildconfig.h
39+
- path: slc/inc/wifi
40+
file_list:
41+
- path: brd4186c.h
42+
- path: brd4187c.h
43+
- path: sl_custom_board.h
44+
- path: third_party/matter_sdk/src/lwip/freertos
45+
file_list:
46+
- path: arch/sys_arch.h
47+
48+
source:
49+
- path: third_party/matter_sdk/src/lwip/freertos/sys_arch.c
50+
51+
define:
52+
- name: LWIP_NETIF_API
53+
value: 1
54+
- name: SL_MATTER_ENABLE_DUAL_STACK
55+
value: "1"

0 commit comments

Comments
 (0)