Skip to content

Commit

Permalink
[mw320] Sve2 pr (#22915) (#23009)
Browse files Browse the repository at this point in the history
* Add the Software Version Info for TC-BINFO-2.1

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to save the information of the last connected AP

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to support "Manual controlled feature" for TC-OO-2.2

Signed-off-by: Chin-Ran Lo <[email protected]>

* Move mw320_sdk initialization to a function

* Add Identify_Timer_Handler() for TC-I-2.2

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add modules: - ConnectivityUtils.* - DeviceInfoProviderImpl.*

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add the implementation of read/write configuration key to flash

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to report information for TC_DGGEN-3.1

    - entwork interface:
		./chip-tool generaldiagnostics read network-interfaces 1 0
    - reboot count:
		./chip-tool generaldiagnostics read reboot-count 1 0

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add the missing functions for handling tc-wifidiag-3.1 Some of them are incompleted yet that hard-coded value are used

Signed-off-by: Chin-Ran Lo <[email protected]>

* Restyled by clang-format

* Restyled by gn

* Implement the functions for WiFiDiagnostics / Generic Diagnostics * wifi diagnostics commands: ./chip-tool wifinetworkdiagnostics read bssid 1 0 ./chip-tool wifinetworkdiagnostics read security-type 1 0 ./chip-tool wifinetworkdiagnostics read wi-fi-version 1 0 ./chip-tool wifinetworkdiagnostics read channel-number 1 0 ./chip-tool wifinetworkdiagnostics read rssi 1 0 ./chip-tool wifinetworkdiagnostics read beacon-lost-count 1 0 ./chip-tool wifinetworkdiagnostics read beacon-rx-count 1 0 ./chip-tool wifinetworkdiagnostics read packet-multicast-rx-count 1 0 ./chip-tool wifinetworkdiagnostics read packet-multicast-tx-count 1 0 ./chip-tool wifinetworkdiagnostics read packet-unicast-rx-count 1 0 ./chip-tool wifinetworkdiagnostics read packet-unicast-tx-count 1 0 ./chip-tool wifinetworkdiagnostics read current-max-rate 1 0 ./chip-tool wifinetworkdiagnostics read overrun-count 1 0

* Generic Diagnostics:
	./chip-tool generaldiagnostics read network-interfaces 1 0
	./chip-tool generaldiagnostics read reboot-count 1 0

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to support Identify_Time on multiple endpoints Verify: pass TC_I_2.2 for ep#0, ep#1

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add "reset watermark" handler

Verify: pass TC-DGSW-2.3

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to support Ethernet / WiFi network commissioning Test: pass TC-CNET-x.xx, Ethernet and WiFi cases

Signed-off-by: Chin-Ran Lo <[email protected]>

* * Remove unused module: DeviceInfoProviderImpl.cpp/DeviceInfoProviderImpl.h * Change the setting to support the new tiny_crypt implementation

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to print the version string

Signed-off-by: Chin-Ran Lo <[email protected]>

* * Add the Shutdown handler in PlatformMgr() * Add to register the shutdown command - Sent shutdown event - Shutdown the chip stack

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add back DeviceInfoProviderImpl.cpp / DeviceInfoProviderImpl.h to pass TC-LCFG-2.1 Update the version to: mw320-2.9.10-002

Signed-off-by: Chin-Ran Lo <[email protected]>

* Change to comparing SSID with characters, instead of ASCII code (previous implementation of Matter stack) ref test: TC-CNET-4.4, Scan with SSID: ./chip-tool networkcommissioning scan-networks 1 0 --Ssid hex:6E78705F6D6174746572 --Breadcrumb 2

Signed-off-by: Chin-Ran Lo <[email protected]>

* Update version number to: mw320-2.9.10-003

Signed-off-by: Chin-Ran Lo <[email protected]>

* Update README.md

* Correct the printed Rendzvous Information (QR-code, Manual code) from BLE (unsupported) => OnNetwork

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add the function to change the pincode of mw320: Usage: > pincode [pin_code] example: > pincode 20192022 [i] mflash_save_file success Done > config VendorId: 65521 (0xFFF1) ProductId: 32769 (0x8001) HardwareVersion: 0 (0x0) PinCode: 20192022 Discriminator: f01 Done

Signed-off-by: Chin-Ran Lo <[email protected]>

* Update version number to: mw320-2.9.10-004

Signed-off-by: Chin-Ran Lo <[email protected]>

* Limit the maximum supported fabric number == 5

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add a shell command to save the ssid / password of the default ap

Signed-off-by: Chin-Ran Lo <[email protected]>

* Put manual_control implementation into a compile option controlled

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to dump progressing message on mw320

Signed-off-by: Chin-Ran Lo <[email protected]>

* Update version number to: mw320-2.9.10-005

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to support reading the manufacture data from a partition.

    - Creat the project from gn: chip_with_factory_data=1
    example:
        gn gen out/debug --args='treat_warnings_as_errors=false mbedtls_repo="//third_party/connectedhomeip/third_party/nxp/libs/mbedtls" chip_crypto="" chip_with_factory_data=1'
        gn gen out/debug --args='treat_warnings_as_errors=false mbedtls_repo="//third_party/connectedhomeip/third_party/nxp/libs/mbedtls" chip_crypto="tinycrypt" chip_with_factory_data=1'

    pairing command:
        ./chip-tool pairing ethernet 1 14014 1000 [ip_of_dut] 5540 --paa-trust-store-path /home/ubuntu/certs/paa/

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add to support save/get BootReason Verify: step#5 of TC-DGGEN-2.2

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add 2 console commands: * wlan-stat: Show the current dut status > wlan-state * wlan-abort: Abort the current connecting and accept the new request > wlan-abort

Signed-off-by: Chin-Ran Lo <[email protected]>

* Restyled by whitespace

* Restyled by clang-format

* Restyled by gn

* Disable the chip_detail_logging

Signed-off-by: Chin-Ran Lo <[email protected]>

* Add a building option, wifi_conn_abort_support, to make it configurable

Signed-off-by: Chin-Ran Lo <[email protected]>

* Restyled by gn

* update submodule

Signed-off-by: Chin-Ran Lo <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: nxptest <[email protected]>

Signed-off-by: Chin-Ran Lo <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: nxptest <[email protected]>
  • Loading branch information
3 people authored Oct 4, 2022
1 parent a84479c commit fc8337e
Show file tree
Hide file tree
Showing 32 changed files with 3,024 additions and 75 deletions.
5 changes: 4 additions & 1 deletion examples/all-clusters-app/nxp/mw320/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ mw320_sdk("sdk") {
"include/FreeRTOSConfig.h",
]

defines = []
defines = [ "CHIP_CONFIG_MAX_FABRICS=5" ]

if (is_debug) {
defines += [ "BUILD_RELEASE=0" ]
} else {
defines += [ "BUILD_RELEASE=1" ]
}
if (wifi_conn_abort_support == true) {
defines += [ "WIFI_CONN_ABORT_SUPPORT" ]
}
}

mw320_executable("shell_mw320") {
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/nxp/mw320/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Building the example application is quite straightforward. It can be done via
following commands:

```
$ cd examples/all-clusters-app/nxp/mw320/
$ git submodule update --init
$ source third_party/connectedhomeip/scripts/activate.sh
$ gn gen out/debug
Expand All @@ -56,7 +57,7 @@ Note: This solution is temporary.
In order to use the tinycrypt ecc operations, use the following build arguments:

```
$ gn gen out/debug --args='treat_warnings_as_errors=false mbedtls_repo="//third_party/connectedhomeip/third_party/nxp/libs/mbedtls" mbedtls_use_tinycrypt=true'
$ gn gen out/debug --args='treat_warnings_as_errors=false mbedtls_repo="//third_party/connectedhomeip/third_party/nxp/libs/mbedtls" chip_crypto="tinycrypt"'
```

<a name="flashdebug"></a>
Expand Down
47 changes: 47 additions & 0 deletions examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,49 @@

#endif // BUILD_RELEASE

#if (defined(CONFIG_CHIP_MW320_REAL_FACTORY_DATA) && (CONFIG_CHIP_MW320_REAL_FACTORY_DATA == 1))

// VID/PID for product => will be used by Basic Information Cluster
#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA220

// set it to 0 for the moment
#define CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER 0

#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION
//-> format_version = 1
//-> vendor_id = 0x1037
//-> product_id_array = [ 0xA220 ]
//-> device_type_id = 0x0015
//-> certificate_id = "ZIG20142ZB330003-24"
//-> security_level = 0
//-> security_information = 0
//-> version_number = 0x2694
//-> certification_type = 1
//-> dac_origin_vendor_id is not present
//-> dac_origin_product_id is not present
#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \
{ \
0x30, 0x81, 0xe7, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xd9, 0x30, 0x81, 0xd6, \
0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \
0x43, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x36, 0x04, 0x34, 0x15, 0x24, 0x00, \
0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x20, 0xa2, 0x18, 0x24, 0x03, 0x15, 0x2c, 0x04, 0x13, 0x5a, 0x49, \
0x47, 0x32, 0x30, 0x31, 0x34, 0x31, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x32, 0x34, 0x24, 0x05, \
0x00, 0x24, 0x06, 0x00, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, 0x01, 0x03, 0x80, \
0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, 0xf3, \
0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, 0x08, \
0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x20, 0x11, 0x8c, 0x13, 0x63, 0x9a, \
0xe7, 0x77, 0xaa, 0xc1, 0x52, 0x8c, 0x46, 0x40, 0x82, 0xcc, 0xdb, 0x6c, 0x43, 0x4d, 0xfc, 0xff, 0xe2, 0x5e, 0x1f, \
0xda, 0xef, 0xdf, 0x0d, 0xf1, 0x7c, 0x2c, 0xcd, 0x02, 0x21, 0x00, 0xbf, 0xad, 0x91, 0xc3, 0x3b, 0xf5, 0xb9, 0x89, \
0x2e, 0x5e, 0x15, 0x3c, 0x52, 0x61, 0xad, 0xb8, 0x53, 0x42, 0x46, 0xc6, 0x7d, 0xec, 0xc0, 0x93, 0x10, 0x1f, 0xc4, \
0xd2, 0xc3, 0x8a, 0xd5, 0x16, \
}

// All remaining data will be pulled from the provisioning region of flash.
#endif

#else // CONFIG_CHIP_MW320_REAL_FACTORY_DATA

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand All @@ -85,6 +128,8 @@
*/
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8001

#endif // CONFIG_CHIP_MW320_REAL_FACTORY_DATA

/**
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION
*
Expand Down Expand Up @@ -163,3 +208,5 @@
#else
#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug
#endif // BUILD_RELEASE

#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1
Loading

0 comments on commit fc8337e

Please sign in to comment.