A world leader in providing the semiconductor solutions that make a positive contribution to people’s lives, both today and in the future.

How to make wifi tests

WIFI ST boards

STM32 boards with this ISM43362 built-in module


- DISCO_F413ZH :

WIFI driver code

Add this wifi driver in your mbed-os directory :

cd mbed-os
git clone

There is no git label, use the master branch.

Configuration for both ST boards are provided by this driver.

For information, file is :

mbed-os tests

Wifi tests

Several mbed-os tests are using WiFi connection :

  • tests-netsocket-dns
  • tests-netsocket-tcp
  • tests-netsocket-tls
  • tests-netsocket-udp
  • tests-network-interface
  • tests-network-wifi

Test setup

For netsocket tests, you need to configure 1 access point :

  • Internet access
  • SSID name : "wifi-secure-ssid" (SSID can be private)
  • WPA2 password : "wifi-password"

For network-wifi test, you need to configure 2 access points:

  • no need to Internet access
  • SSID name : "wifi-secure-ssid" (SSID has to be broadcasted)
  • WPA2 password : "wifi-password"
  • guest SSID name : "wifi-unsecure-ssid" (SSID has to be broadcasted)
  • channel and the BSSID of secure AP : "wifi-ch-secure", "ap-mac-secure"
  • channel and the BSSID of unsecure AP : "wifi-ch-unsecure", "ap-mac-unsecure"

Test configuration

Now update your mbed_app.json file with :

    "config": {
        "echo-server-addr" : {
            "help" : "IP address of echo server",
            "value" : "\"\""
        "echo-server-port" : {
            "help" : "Port of echo server",
            "value" : "7"
        "echo-server-discard-port" : {
            "help" : "Discard port of echo server",
            "value" : "9"
        "echo-server-port-tls" : {
            "help" : "Echo port of echo server",
            "value" : "2007"
        "echo-server-discard-port-tls" : {
            "help" : "Discard port of echo server",
            "value" : "2009"
        "wifi-secure-ssid": {
            "help": "WiFi SSID for WPA2 secured network",
            "value": "\"TOREPLACE\""
        "wifi-unsecure-ssid": {
            "help": "WiFi SSID for unsecure network",
            "value": "\"TOREPLACE\""
        "wifi-password": {
            "help": "WiFi Password",
            "value": "\"TOREPLACE\""
        "wifi-secure-protocol": {
            "help": "WiFi security protocol, valid values are WEP, WPA, WPA2, WPA/WPA2",
            "value": "\"WPA2\""
        "wifi-ch-secure": {
            "help": "Channel number of secure SSID",
            "value": 1
        "wifi-ch-unsecure": {
            "help": "Channel number of unsecure SSID",
            "value": 2
        "ap-mac-secure": {
            "help": "BSSID of secure AP in form of AA:BB:CC:DD:EE:FF",
            "value": "\"TOREPLACE\""
        "ap-mac-unsecure": {
            "help": "BSSID of unsecure AP in form of \"AA:BB:CC:DD:EE:FF\"",
            "value": "\"TOREPLACE\""
        "max-scan-size": {
            "help": "How many networks may appear in Wifi scan result",
            "value": 10
    "target_overrides": {
        "DISCO_F413ZH": {
            "": "WIFI",
            "nsapi.default-wifi-ssid": "\"TOREPLACE\"",
            "nsapi.default-wifi-password": "\"TOREPLACE\"",
            "nsapi.default-wifi-security": "WPA2",
            "ism43362.provide-default": true
        "DISCO_L475VG_IOT01A": {
            "": "WIFI",
            "nsapi.default-wifi-ssid": "\"TOREPLACE\"",
            "nsapi.default-wifi-password": "\"TOREPLACE\"",
            "nsapi.default-wifi-security": "WPA2",
            "ism43362.provide-default": true

You need to update it to indicate your local settings (network SSID, password, ...)

Test execution

mbed test -m DISCO_F413ZH -t ARM -v -n tests-net*
mbed test -m DISCO_F413ZH -t ARM -v -n tests-network*
mbed test -m DISCO_F413ZH -t ARM -v -n tests-network-wifi
mbed test -m DISCO_L475VG_IOT01A -t GCC_ARM -v -n tests-netsocket*
mbed test -m DISCO_L475VG_IOT01A -t GCC_ARM -v -n tests-netsocket-tcp

WIFI example applications


mbed import mbed-os-example-wifi
cd mbed-os-example-wifi
mbed add wifi-ism43362

<edit mbed_app.json file>
            "value": "\"SSID\""
            "value": "\"PASSWORD\""

mbed compile -t GCC_ARM -m DISCO_L475VG_IOT01A --flash

Pelion Device Ready example

WIFI firmware update

Only Wifi module from DISCO_L475VG_IOT01A can be updated (HW limitation for DISCO_F413ZH).

Blue LED should be ON now.

  • Start STMFlashLoader Demo.exe

- select the correct COM port (keep Baud Rate 115200 / Parity Even / Echo Disabled / Timeout 30s) => Next

- "Target is readable" => Next

- Select "STM32F2_1024K" => Next

- Download to device: select ISM43362_M3G_L44_SPI_C3.5.2.5.STM.bin / Global Erase / Verify after download => Next

All wikipages