Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Platform][Silabs][WIFI] The possible SecurityTypes returned from GetWiFiSecurityType doesn't match the spec. #25118

Closed
jmartinez-silabs opened this issue Feb 16, 2023 · 0 comments · Fixed by #25458
Labels
efr32 spec Mismatch between spec and implementation

Comments

@jmartinez-silabs
Copy link
Member

Reproduction steps

The Security type from the structure wfx_wifi_scan_result_t obtained by the function wfx_get_ap_info doesn't match the Matter spec but is assigned as is to the WiFiNetworkDiagnostics::SecurityTypeEnum.

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType)
{
    using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum;

    wfx_wifi_scan_result_t ap;
    int32_t err = wfx_get_ap_info(&ap);
    if (err == 0)
    {
        securityType = static_cast<SecurityTypeEnum>(ap.security);

The possible values from ap.security are describe by the following enum wfx_sec_t.

/* Note that these are same as RSI_security */
typedef enum
{
    WFX_SEC_NONE           = 0,
    WFX_SEC_WPA            = 1,
    WFX_SEC_WPA2           = 2,
    WFX_SEC_WEP            = 3,
    WFX_SEC_WPA_EAP        = 4,
    WFX_SEC_WPA2_EAP       = 5,
    WFX_SEC_WPA_WPA2_MIXED = 6,
    WFX_SEC_WPA_PMK        = 7,
    WFX_SEC_WPA2_PMK       = 8,
    WFX_SEC_WPS_PIN        = 9,
    WFX_SEC_GEN_WPS_PIN    = 10,
    WFX_SEC_PUSH_BTN       = 11,
    WFX_SEC_WPA3           = 11,
} wfx_sec_t;

A conversion must be made to respect the possible values of SecurityTypeEnum as described by the spec

image

See "11.14.5.1. SecurityTypeEnum" in the Matter spec for more details.

Platform

efr32

Platform Version(s)

No response

Type

Platform validated

(Optional) If manually tested please explain why this is only manually tested

No response

Anything else?

No response

@jmartinez-silabs jmartinez-silabs added efr32 spec Mismatch between spec and implementation labels Feb 16, 2023
rosahay-silabs added a commit to rosahay-silabs/connectedhomeip that referenced this issue Mar 3, 2023
rosahay-silabs added a commit to rosahay-silabs/connectedhomeip that referenced this issue Mar 3, 2023
rosahay-silabs added a commit to rosahay-silabs/connectedhomeip that referenced this issue Mar 6, 2023
jmartinez-silabs pushed a commit that referenced this issue Mar 6, 2023
…25458)

* Adds fix for #25118

* Adds fix for unused-variable-warning

* Adds fix for rsi_wlan_connect_async invoke

* Adding break statements for default case.

* Update examples/platform/silabs/efr32/rs911x/rsi_if.c

Co-authored-by: Jonathan Mégevand <77852424+jmeg-sfy@users.noreply.github.com>

---------

Co-authored-by: Jonathan Mégevand <77852424+jmeg-sfy@users.noreply.github.com>
lecndav pushed a commit to lecndav/connectedhomeip that referenced this issue Mar 22, 2023
…roject-chip#25458)

* Adds fix for project-chip#25118

* Adds fix for unused-variable-warning

* Adds fix for rsi_wlan_connect_async invoke

* Adding break statements for default case.

* Update examples/platform/silabs/efr32/rs911x/rsi_if.c

Co-authored-by: Jonathan Mégevand <77852424+jmeg-sfy@users.noreply.github.com>

---------

Co-authored-by: Jonathan Mégevand <77852424+jmeg-sfy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efr32 spec Mismatch between spec and implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant