ARMmbed

ODIN-W2 hardfaults trying to connect to enterprise WiFi network (PEAP)

Hello, my EVK-ODIN-W2 (Mbed OS v5.13.2) hardfaults when it tries to connect to an enterprise WiFi network using PEAP. I can confirm that I could connect an iPhone to the network with the provided credentials and PEAP user/password, so I don’t think this is an issue with the network itself. This is the error log that appears after calling wifi->connect() in my code:

++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R0 : 44E13C4B
R1 : 00000020
R2 : 00000000
R3 : 2001240C
R4 : 44E13C4B
R5 : 00000000
R6 : 44E13B7F
R7 : 20014740
R8 : 00000000
R9 : 20015532
R10 : 20014724
R11 : FFFFD800
R12 : 08029E91
SP : 20010AA8
LR : 0802313B
PC : 0802018E
xPSR : 21000000
PSP : 20010A88
MSP : 2002FFC0
CPUID: 410FC241
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000082
UFSR : 00000000
DFSR : 00000008
AFSR : 00000000
BFAR : 44E13C4B
Mode : Thread
Priv : Privileged
Stack: PSP

– MbedOS Fault Handler –

++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x80163A5
Error Value: 0x802018E
Current Thread: application_unnamed_thread Id: 0x20010118 Entry: 0x800D5D1 StackSize: 0x1000 StackMem: 0x20010168 SP: 0x2002FF18
For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=UBLOX_EVK_ODIN_W2
– MbedOS Error Info –

= System will be rebooted due to a fatal error =
= Reboot count(=1) reached maximum, system will halt after rebooting =

I tried searching for details on error 0x80FF013D but found nothing. What could be causing the fatal crash?

Hi Manuel,

Are you using our provided wifi example? It looks like some configuration not set correctly. If you can share you code snippet and mbed_app.json, it would be helpful for addressing the issue.

Also you can refer to the PR 10454, there are some release notes for using PEAP.

Let me know if you have further questions.

Regards,
Desmond

Hi Desmond,

Thanks for reaching out. My code is a slightly modified version of “mbed-os-example-wifi”.

Here is my main.cpp

#include "mbed.h"
#include "OdinWiFiInterface.h"

OdinWiFiInterface *wifi;

static auth_cert_s certificates;

int main()
{
    printf("WiFi example\n");

    wifi = new OdinWiFiInterface();
    if (!wifi) {
        printf("ERROR: No WiFiInterface found.\n");
        return -1;
    }

    printf("\nConnecting to network\n");
    // network has no password
    int ret = wifi->connect(SSID, NULL, NSAPI_SECURITY_PEAP, &certificates, PEAP_USER, PEAP_PASSWORD, 0);
    if (ret != 0) {
        printf("\nConnection error: %d\n", ret);
        return -1;
    }

    printf("Success\n\n");
    printf("MAC: %s\n", wifi->get_mac_address());
    printf("IP: %s\n", wifi->get_ip_address());
    printf("Netmask: %s\n", wifi->get_netmask());
    printf("Gateway: %s\n", wifi->get_gateway());
    printf("RSSI: %d\n\n", wifi->get_rssi());
    printf("\nDone\n");
}

This is my mbed_app.json file:

{
    "config": {
        "wifi-ssid": {
            "help": "WiFi SSID",
            "value": "\"SSID\""
        },
        "wifi-password": {
            "help": "WiFi Password",
            "value": "\"PASSWORD\""
        }
    },
    "target_overrides": {
        "*": {
            "platform.stdio-convert-newlines": true
        }
    }
}

I did take a look at PR 10454 and as far as I can tell I followed all instructions but for some reason the ODIN always crashes. However, the same code will work fine if I try to connect to a WPA2 Personal network, it only fails if I try to connect to an Enterprise network.

Thanks a lot for your help, I really appreciate it.

Regards,
Manuel