WIZnet WizFi250 Basic Study and Training

wifi 250

1. WIZnet WizFi250 Feature

  • Single band 2.4GHz IEEE 802.11b/g/n
  • Integrated RF power amplifier
  • Supports wireless data rates up to 65Mbit/s
  • 1MB Flash Memory, 128KB SRAM, 1MB Serial Flash
  • Supports per packet Rx Antenna diversity
  • Low power consumption & excellent power management performance
  • Small size, suitable for low volume system integration.
  • Easy integration into mobile and handheld devices flexible system configuration.
  • 412-2.484 GHz two SKUs for worldwide market.
  • Device Package : 28×20 mm (17×20 mm)
  • Serial Interface : UART, SPI
  • Powerful Web server provides
  • Soft AP, WiFi Direct
  • Sufficient memory retention
  • Wi-Fi Security (WEP, WPA/WPA2PSK)
  • L2 Switching
  • OTA(Over The Air F/W Upgrading

2. AT Command Overview

  • The Customer use the setting AT command and parameter through UART(or SPI) interface.
  • The Start characters is “AT” and the End characters “Enter Key” (CR, \r, 0x0d).
  • Ex) ‘AT+MMSG=1’ => ‘A’, ‘T’, ‘+’, ‘M’, ‘M’, ‘S’, ‘G’, ‘=’, ‘1’, ‘CR(0x0d)‘
  • Command mode:

The WizFi250 first default mode is the Command mode

All AT-command execute this mode

This mode use the data transmit /receive for managing system, Wi-Fi setting.

  • Data mode : This mode use for real data transmit / receive

 3. Demo: Station mode, TCP Server

  • Block Diagram

222

  • AT COMMAND
AT+WLEAVE  => Disconnect previous Association[OK]    <= WizFi250 response from the AT+WLEAVE command

AT+WANT=0  => set the Antenna (0:uFL,1:PA,3:Auto)

[OK]

AT+WSET=0,WIZnet_MakerSpace_2.4  => set the SSID

[OK]

AT+WSEC=0,,xxxxxxxx => set the Passphrase

[OK]

AT+WNET=0,192.168.0.xxx,255.255.255.0,192.168.0.1 => set the IP

[OK]

AT+WJOIN => AP Association / Joining : WIZnet_MakerSpace_2.4 Successfully joined : WIZnet_MakerSpace_2.4

[Link-Up Event]

IP Addr    : 192.168.0.xxx

Gateway    : 192.168.0.1

[OK]

AT+SCON=O,TSN,,0,5000,1 => set the Socket (TCP Server)

[OK]

[CONNECT 0]

Hello WizFi250

4. Demo: Station mode, TCP Client

  • Block Diagram

33333333333333

  • AT COMMAND
AT+WLEAVE  => Disconnect previous Association[OK]

AT+WANT=0  => set the Antenna (0:uFL,1:PA,3:Auto)

[OK]

AT+WSET=0,WIZnet_MakerSpace_2.4  => set the SSID

[OK]

AT+WSEC=0,,xxxxxxxx => set the Passphrase

[OK]

AT+WNET=1  => set the DHCP ON

[OK]

AT+WJOIN => AP Association / Joining : WIZnet_MakerSpace_2.4

[Link-Up Event]

IP Addr    : 192.168.3.110

Gateway    : 192.168.3.1

[OK]

AT+SCON=O,TCN,192.168.3.111,5000,,1 => set the Socket (TCP Client)

[OK]

[CONNECT 0]

Hello WizFi250

5. Demo: AP mode, TCP Server

  • Block diagram

5555

  • AT COMMAND
AT+WLEAVE[OK]

AT+WANT=0

[OK]

AT+WSET=1,WizFi250AP

[OK]

AT+WSEC=1,WPA2,12345678

[OK]

AT+WNET=0,192.168.12.1,255.255.255.0,192.168.12.1

[OK]

AT+WJOIN

Joining : WizFi250AP

Successfully joined : WizFi250AP

[Link-Up Event]

IP Addr    : 192.168.12.1

Gateway    : 192.168.12.1

[OK]

AT+SCON=O,TSN,,0,5000,1

[OK]

[CONNECT 0]

Hello WizFi250

 

<Notice>

As below command sustain the setting service mode after

AT+SCON=S,TSN,,0,5000,1

Power Off -> On

AT+MPROF=S

 

6. Demo: Multi Socket

  • Block diagram

6666666666666

  • AT Command
AT+WLEAVE[OK]

AT+WANT=0

[OK]

AT+WSET=0,WIZnet_MakerSpace_2.4  => set the SSID

[OK]

AT+WSEC=0,,xxxxxxxx =>set the  Passphrase

[OK]

AT+WNET=1

OK]

AT+WJOIN

Joining : WizFiDemoAP

Successfully joined : WizFiDemoAP

[Link-Up Event]

IP Addr    : 192.168.3.110

Gateway    : 192.168.3.1

[OK]

AT+SCON=O,TCN,192.168.3.111,5000,,0

[OK]

[CONNECT 0]

AT+SCON=O,TCN,192.168.3.112,5000,,0

[OK]

[CONNECT 1]

{0,192.168.3.111,2735,15}Hello From PC

{1,192.168.3.112,5436,22}Data From Smartphone

 

7. Demo: Connect to Google Web

  • Block diagram

77777777777

  • AT COMMAND
AT+WLEAVE  => Disconnect previous Association[OK]

AT+WANT=0  => set the Antenna (0:uFL,1:PA,3:Auto)

[OK]

AT+WSET=0,WIZnet_MakerSpace_2.4  => set the SSID

[OK]

AT+WSEC=0,,xxxxxxxx => set the Passphrase

[OK]

AT+WNET=1  => set the DHCP ON

[OK]

AT+WJOIN => AP Association / Joining : WIZnet_MakerSpace_2.4

[Link-Up Event]

IP Addr    : 192.168.3.110

Gateway    : 192.168.3.1

[OK]

AT+SFORM=000000000 => Define the header of receive data

[OK]

AT+FDNS=google.com,3000 => Find IP address of google.com

74.125.128.102

[OK]

AT+SCON=O,TCN,74.125.128.102,80,0,0

[OK]

[CONNECT 0]

AT+SSEND=0,,,18

[0,,,18]

GET / HTTP/1.1\r\n => This 18 bytes is real date that It’ll send to be google web server. This was not displayed in your PC monitor!

[OK]

HTTP/1.1 302 Found

Location: http://www.google.co.kr/?gws_rd=cr&ei=pIz0U…&#8230;..

Cache-Control: private

Content-Type: text/html; charset=UTF-8

………………………..

8. Demo: Get Weather Data from Web

  • Block diagram

888888

  • AT COMMAND
AT+WLEAVE  => Disconnect previous Association[OK]

AT+WANT=0  => set the Antenna (0:uFL,1:PA,3:Auto)

[OK]

AT+WSET=0,WIZnet_MakerSpace_2.4  => set the SSID

[OK]

AT+WSEC=0,,xxxxxxxx => set the Passphrase

[OK]

AT+WNET=1  => set the DHCP ON

[OK]

AT+WJOIN => AP Association / Joining : WIZnet_MakerSpace_2.4

[Link-Up Event]

IP Addr    : 192.168.3.110

Gateway    : 192.168.3.1

 

AT+FDNS=api.openweathermap.org,3000  => Find IP address of server

128.199.164.95

[OK]

AT+SCON=O,TCN,128.199.164.95,80,,0

[OK]

 

[CONNECT 0]

AT+SSEND=0,,,81

[0,,,81]

GET /data/2.5/weather?q=Seoul&mode=xml HTTP/1.1\r\n

Host: api.openweathermap.org\r\n\r\n

=> OpenWeatherMap  This 81 bytes is real data that it’ll send to the Weather Server. This was not displayed in your PC monitor!

[OK]

{0,128.199.164.95,80,969}HTTP/1.1 200 OK

Server: nginx

Date: Tue, 05 Aug 2014 23:59:54 GMT

…………………………………………………………….

<temperature max=”298.15″ min=”296.15″ unit=”kelvin” value=”297.38″>

<humidity unit=”%” value=”83″>

<pressure unit=”hPa” value=”1006″>

…………………………………………………………….

 

Sourced by http://ilikethisplus.tistory.com/2

 

Sourced by Steve Kim (ssekim@wiznet.co.kr)

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 )

w

Connecting to %s