WizFi250 Hello World Demo on WIZwiki-W7500 of mbed platform

This posting explains how to use Wi-Fi with using mbed platform.

Materials

WIZwiki-W7500 ( MCU Platform)

wizwiki-w7500_main

  • Key Feature
    • WIZnet W7500 ( For more Infomation about W7500 )
    • 32-bit ARM Cortex-M0
    • 128KB Flash / 16KB(up to 48KB) SRAM
    • Hardwired TCP/IP Core
    • Ethernet PHY
      • IC+ IP101GA
    • CMSIS-DAP support
      • NXP LPC11U35FHI33/501
      • USB Drag & Drop Programming
    • Arduino pin compatible
    • mbed enable
    • ISP, SD Card, RGB LED, SWD Connector

WizFi250-EVB ( Wi-Fi Module )

ShopDtl_1203_20140918154919

  • Key Feature
    • Single band 2.4GHz IEEE802.11b/g/n Wi-Fi module
    • Integrated RF power amplifier : Antenna calibration is not required
    • 1MB flash memory, 128KB SRAM, 1MB serial flash
    • Low power consumption & excellent power management to extend battery life
    • The highest compatibility with the most of APs
    • Compact size, suitable for mobile or hand-held devices
    • Host Interface : UART , SPI
    • Support powerful web configuration
    • Soft AP (Enough memory retention, L2 switching)
    • OTA (Over the Air F/W Upgrading)
    • Wi-Fi Direct

Sensor Shield

TB2wSGHaFXXXXcLXXXXXXXXXXXX_!!33841454

Hardware Connection

Case 1. With using Sensor Shield

20150626_112505

WizFi250-EVB WIZwiki-W7500
RX-TX RXD D1(U_TXD0)
TX-RX TXD D0(U_RXD0)
CTS-RTS CTS D8
RTS-CTS RTS D7
WizFi250-RESET JP10-2 PA12
VCC JP2-3.3V 3.3V
GND JP2-GND GND

Case 2. Without using Sensor Shield

WizFi250-EVB Sensor Shield WIZwiki-W7500
RX-TX RXD TXD
TX-RX TXD RXD
CTS-RTS CTS D8
RTS-CTS RTS D7
WizFi250-RESET JP10-2 PA12

Run WizFi250-HelloWorld Progoram

An example and Library in order to use WizFi250 in mbed have already been made by the author. If you refer to the example and library, you would be able to use WizFi250 without great difficulty.

Please follow the links below.

Import WizFi250_hello_world_demo to your web compiler

After connecting to the link; WizFi250 Hello World Demo and clicking the “Import program” button, you would be able to see the simple example code in order to use WizFi250 at Web Compiler.

20150626_133001

20150626_134237

Source Code

Input SSID and KEY of AP that want to have connection into the value of SSID and PASS from the following source code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
#include "mbed.h"
#include "WizFi250Interface.h"
#define SECURE WizFi250::SEC_AUTO
#define SSID "ssid"
#define PASS "key"
#if defined(TARGET_WIZwiki_W7500)
    WizFi250Interface wizfi250(D1,D0,D7,D8,PA_12,NC,115200);
    Serial pc(USBTX, USBRX);
#endif
/**
 *  \brief Hello World
 *  \param none
 *  \return int
 */
int main()
{
    pc.baud(115200);
    printf("WizFi250 Hello World demo. \r\n");
    wizfi250.init();
    if ( wizfi250.connect(SECURE, SSID, PASS))      return -1;
    printf("IP Address is %s\r\n", wizfi250.getIPAddress());
    wizfi250.disconnect();
}

Result in serial terminal

Be able to download the binary compiling the code by clicking “Compile” button or pressing the Ctrl+D key after revising the source code above.

Upload the downloaded binary on to WIZwiki-W7500, then you would be able to see the following result as below at the Serial Terminal. (Baudrate of Serial Terminal is 115200.)

WizFi250 Hello World demo. 
[WizFi250: INFO]AT+MMAC=?
[WizFi250: INFO][OK]

[WizFi250: INFO]AT+WSET=0,wizohp
[WizFi250: INFO][OK]

[WizFi250: INFO]AT+WSEC=0,,wiznet218
[WizFi250: INFO][OK]

[WizFi250: INFO]AT+WJOIN
[WizFi250: INFO][OK]

[WizFi250: INFO]AT+WSTATUS
[WizFi250: INFO][OK]

[WizFi250: INFO]IP      : 192.168.13.29
[WizFi250: INFO]Gateway : 192.168.13.1
[WizFi250: INFO]WizFi250 is successfully join to AP
IP Address is 192.168.13.29

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s