A quick example of a simple WiFi application using the WiFi and network-socket APIs that is provided as a part of mbed-os.
The program brings up the WiFi and the underlying network interface, and uses it to scans available networks, connects to a network, prints interface and connection details and performs simple HTTP operation.
Supported hardware:
- UBLOX Odin board built-in WiFi module
- REALTEK_RTL8195AM built-in WiFi module
- NUCLEO_F401RE with X-NUCLEO-IDW01M1 WiFi expansion board using pins D8 D2
- NUCLEO_F429ZI with ESP8266-01 module using pins D1 D0
- NUCLEO_L476RG with ESP8266-01 module using pins D8 D2
- Other mbed targets with ESP8266 module or X-NUCLEO-IDW01M1 expansion board
Not that the mbed target board the WiFi shield gets connected to shouldn't have any other network interface e.g. Ethernet.
ESP8266 is a fallback option and will be used if the build is for unsupported platform.
Diff: mbed_app.json
- Revision:
- 63:99e063d738ee
- Parent:
- 44:63be19b7a3db
- Child:
- 65:c6833441fd15
--- a/mbed_app.json Tue May 22 12:30:03 2018 +0100 +++ b/mbed_app.json Tue Jun 05 10:15:03 2018 +0100 @@ -1,9 +1,9 @@ { "config": { - "wifi-shield": { - "help": "Options are internal, WIFI_ESP8266, WIFI_IDW0XX1", + "wifi-shield": { + "help": "Options are internal, WIFI_ESP8266, WIFI_ISM43362, WIFI_IDW0XX1", "value": "internal" - }, + }, "wifi-ssid": { "help": "WiFi SSID", "value": "\"SSID\"" @@ -28,6 +28,26 @@ "UBLOX_EVK_ODIN_W2": { "target.device_has": ["EMAC"] }, + "DISCO_F413ZH": { + "wifi-shield": "WIFI_ISM43362", + "ism43362.wifi-miso": "PB_4", + "ism43362.wifi-mosi": "PB_5", + "ism43362.wifi-sclk": "PB_12", + "ism43362.wifi-nss": "PG_11", + "ism43362.wifi-reset": "PH_1", + "ism43362.wifi-dataready": "PG_12", + "ism43362.wifi-wakeup": "PB_15" + }, + "DISCO_L475VG_IOT01A": { + "wifi-shield": "WIFI_ISM43362", + "ism43362.wifi-miso": "PC_11", + "ism43362.wifi-mosi": "PC_12", + "ism43362.wifi-sclk": "PC_10", + "ism43362.wifi-nss": "PE_0", + "ism43362.wifi-reset": "PE_8", + "ism43362.wifi-dataready": "PE_1", + "ism43362.wifi-wakeup": "PB_13" + }, "NUCLEO_L476RG": { "wifi-tx": "D8", "wifi-rx": "D2"