WifiConfig_NetworkDiagnostics结构

标头: #include <applibs/wificonfig.h>

有关最近连接到网络失败的信息。

注意

这是版本控制结构的别名。 定义WIFICONFIG_STRUCTS_VERSION以使用此别名。

typedef struct WifiConfig_NetworkDiagnostics {

    uint8_t isEnabled;
    uint8_t isConnected;
    int32_t error;
    time_t timestamp;
    int32_t certError;
    int32_t certDepth;
    CertStore_SubjectName certSubject;
} WifiConfig_NetworkDiagnostics;

成员

uint8_t isEnabled

指示是否启用网络。 如果已启用,则值为 1;如果未启用,则值为 0。 此字段指示网络的当前状态,而不是配置的状态。 如果暂时禁用网络,则该值将为 0。

uint8_t isConnected

指示网络是否已连接。 如果已连接,则值为 1;如果未连接,则值为 0。

int32_t错误

最近未能连接到此网络的原因。 可能的值:

类型 价值 意义
ConnectionFailed 1 连接失败时的一般错误消息。 对于 EAP-TLS 网络,此错误可能是由于无法访问 RADIUS 服务器或使用 RADIUS 服务器无法识别的客户端标识而导致的。
NetworkNotFound 2 找不到网络。
NoPskIncluded 3 缺少网络密码。
错误键 4 网络使用的密码不正确。
AuthenticationFailed 5 身份验证失败。 此错误仅适用于 EAP-TLS 网络。
SecurityTypeMismatch 6 存储网络的安全类型与可用网络不匹配。
NetworkFrequencyNotAllowed 7 不允许使用网络频率。
NetworkNotEssPbssMbss 8 网络不受支持,因为未检测到任何扩展服务集 (ESS) 、个人基本服务集 (PBSS) 或最低基线安全标准 (MBSS) 。
NetworkNotSupported 9 不支持网络。
NetworkNonWpa 10 网络不是 WPA2PSK、WPA2EAP 或 Open。

time_t时间戳

记录错误的 OS 时间。

int32_t certError

证书错误,仅当指示 AuthenticationFailed 时才 error 有意义。 注意:可能存在不返回错误的情况 certError

可能的值:

   ERRID                          Potential Problem
   Unspecified = 0:               Generic error message when certificate validation fails.
   Certificate Not Found = 100:   This could be due to an incorrect certificate specified when configuring the EAP-TLS network, or ReloadConfig() was not called after loading   the certificates onto the device.
   Invalid Root CA= 101:          Root CA incorrect due to expiry, invalid chain, or other issues verifying the server certificate.
   Invalid client authentication  Invalid client certificate or using a valid client identity but incorrectly associated with client certificate.
   =102:
类型 价值 意义
ConnectionFailed 0 证书验证失败时的一般错误消息。
找不到证书 100 配置 EAP-TLS 网络时指定的证书不正确,或者在 ReloadConfig() 将证书加载到设备后未调用。
根 CA 无效 101 由于过期、链无效或其他验证服务器证书的问题,根 CA 不正确。
客户端身份验证无效 102 1) 服务器无法识别或包含错误的客户端证书,或 2) 与客户端证书关联的有效客户端标识 (例如,已知用户名与其他用户的密码) 。
未知客户端 ID 103 身份验证服务器无法识别客户端标识。

int32_t certDepth

证书在认证链中的位置。 仅当指示 AuthenticationFailed 且certDepth为非负 (0 或正) 号时才error有意义。

CertStore_SubjectName certSubject

证书的主题。 仅当指示 AuthenticationFailed 时才 error 有意义。