WiFi AP example for Odin-W2

mbed-os-example-odinw2-wifi-ap

Wi-Fi access point example for Mbed OS

Getting started with the Wi-Fi API

This is an example of a Wi-Fi access point application using the odinWiFiInterface and network socket APIs that [Mbed OS](https://github.com/ARMmbed/mbed-os) provides.

The program brings up the Wi-Fi access point and the underlying network interface and brings up a TCP echo server on access point.

Supported hardware

Getting started

1. Import the example.

mbed import mbed-os-example-odinw2-wifi-ap cd mbed-os-example-odinw2-wifi-ap

2. Configure the Wi-Fi to enable and use access point.

Edit mbed_app.json to include the correct Wi-Fi configurations, SSID and password:

   "macros": ["DEVICE_WIFI_AP=1"],
      "config": {
           "wifi-ssid": {
            "help": "AP SSID",
            "value": "\"odin-w2\""
				},
			"ap-ip": {
            "help": "AP IP",
            "value": "\"ip value\""
				},
			"ap-netmask": {
            "help": "Netmask",
            "value": "\"netmask value\""
				},
			"ap-gateway": {
            "help": "Network gateway",
            "value": "\"gateway value\""
				},
			"ap-channel": {
            "help": "AP channel",
            "value": "\"some channel\""
				},
			"wifi-password": {
            "help": "WiFi Password",
            "value": "\"some pass\""
				}

3. Compile and generate binary.

For example, for 'GCC':

mbed compile -t GCC_ARM -m UBLOX_EVK_ODIN_W2 ```

4. Open a serial console session with the target platform using the following parameters:

  • Baud rate: 9600
  • Data bits: 8
  • Stop bits: 1
  • Parity: None

5. Copy or drag the application 'mbed-os-example-odinw2-wifi-ap' in the folder 'mbed-os-example-odinw2-wifi-ap/BUILD/<TARGET NAME>/<PLATFORM NAME>' onto the target board.

6. The serial console should display a similar output to below, indicating a successful Wi-Fi connection:

Starting AP

AP started successfully

TCP: connected with 10.0.0.1 server

7. After the server message is displayed, connect a TCP client, upton sending a message to server, message will be echoed to client.

Limitations

1. DHCP mode is not supported.

no such method: requests