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:

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.

Committer:
mbed_official
Date:
Tue Nov 21 11:30:03 2017 +0000
Revision:
44:63be19b7a3db
Child:
82:122bb3ae6de5
Add STM WiFi expansion boards `X-NUCLEO-IDW0XX1`

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-wifi

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 44:63be19b7a3db 1 {
mbed_official 44:63be19b7a3db 2 "config": {
mbed_official 44:63be19b7a3db 3 "wifi-shield": {
mbed_official 44:63be19b7a3db 4 "help": "Options are internal, WIFI_ESP8266, WIFI_IDW0XX1",
mbed_official 44:63be19b7a3db 5 "value": "WIFI_ESP8266"
mbed_official 44:63be19b7a3db 6 },
mbed_official 44:63be19b7a3db 7 "wifi-ssid": {
mbed_official 44:63be19b7a3db 8 "help": "WiFi SSID",
mbed_official 44:63be19b7a3db 9 "value": "\"SSID\""
mbed_official 44:63be19b7a3db 10 },
mbed_official 44:63be19b7a3db 11 "wifi-password": {
mbed_official 44:63be19b7a3db 12 "help": "WiFi Password",
mbed_official 44:63be19b7a3db 13 "value": "\"PASSWORD\""
mbed_official 44:63be19b7a3db 14 },
mbed_official 44:63be19b7a3db 15 "wifi-tx": {
mbed_official 44:63be19b7a3db 16 "help": "TX pin for serial connection to external device",
mbed_official 44:63be19b7a3db 17 "value": "D1"
mbed_official 44:63be19b7a3db 18 },
mbed_official 44:63be19b7a3db 19 "wifi-rx": {
mbed_official 44:63be19b7a3db 20 "help": "RX pin for serial connection to external device",
mbed_official 44:63be19b7a3db 21 "value": "D0"
mbed_official 44:63be19b7a3db 22 }
mbed_official 44:63be19b7a3db 23 },
mbed_official 44:63be19b7a3db 24 "target_overrides": {
mbed_official 44:63be19b7a3db 25 "*": {
mbed_official 44:63be19b7a3db 26 "platform.stdio-convert-newlines": true
mbed_official 44:63be19b7a3db 27 },
mbed_official 44:63be19b7a3db 28 "UBLOX_EVK_ODIN_W2": {
mbed_official 44:63be19b7a3db 29 "target.device_has": ["EMAC"]
mbed_official 44:63be19b7a3db 30 },
mbed_official 44:63be19b7a3db 31 "NUCLEO_L476RG": {
mbed_official 44:63be19b7a3db 32 "wifi-tx": "D8",
mbed_official 44:63be19b7a3db 33 "wifi-rx": "D2"
mbed_official 44:63be19b7a3db 34 },
mbed_official 44:63be19b7a3db 35 "NUCLEO_F401RE": {
mbed_official 44:63be19b7a3db 36 "wifi-tx": "D8",
mbed_official 44:63be19b7a3db 37 "wifi-rx": "D2"
mbed_official 44:63be19b7a3db 38 }
mbed_official 44:63be19b7a3db 39 }
mbed_official 44:63be19b7a3db 40 }