User Tools

Site Tools


Exam 1. Example of data communication in Static IP and TCP Server mode

1. Set WIZ550S2E with Static IP

Set Network IP(, Subnet Mask( and Gateway( of WIZ550S2E

<TX> AT+NSET=S,,,\r\n
<RX> [S]\r\n

If you check with AT+NSTAT command after above command, you can get response like below.

<RX> [S,,S,,,,]\r\n

2. Set operating mode of WIZ550S2E with TCP Server mode whose port number is 5000

Create a socket in WIZ550S2E with local port number 5000

<TX> AT+NOPEN=S,5000\r\n
<RX> [S]\r\n

You can check the current status of the socket which you made with AT+NSOCK. Below is an example of it.

<TX> AT+NSOCK=0\r\n
<RX> [S,,S,5000]\r\n

3. a TCP Client connects to WIZ550S2E

When A TCP Client of PC(or any Device) PC connected to WIZ550S2E, you will get a message from WIZ550S2E like below

<RX> [V,0,0]\r\n

4. Send data to TCP Client

If you send 5 bytes data “Hello” to TCP Client with AT+NSEND like below, you will get two step response, Wait Response and Success Response.
[W, 0] means that WIZ550S2E recognized and is processing the command but it is not completed yet. And '0' means socket ID.

<TX> AT+NSEND=0,5\r\nHello
<RX> [W,0]\r\n[S,0]\r\n

5. Receive data “Hi” from TCP Client

If TCP Client sends 2 bytes data “Hi”, then you will get response from WIZ550S2E like below

<RX> [R,0,2]\r\nHi\r\n

6. Disconnect current TCP connection

Do send command like below to disconnect current connection.

<TX> AT+NCLOSE=0\r\n
<RX> [W,0]\r\n[S,0]\r\n

After above command, if you check the status of socket with AT+NSOCK command then you will get response like below.

<TX> AT+NSOCK=0\r\n
<RX> [S,,I]\r\n

<Changing mode from Data mode to Coomand mode>

<TX> +++
<RX> \r\n\r\n\r\n[W,0]\r\n[S,0]\r\n (20 Byte)

<Changing mode from Command mode to Data mode>

<RX> [S]\r\n (5 Byte)
products/wiz550s2e/wiz550s2e_tutorial_en/exam1.txt · Last modified: 2015/03/16 10:33 (external edit)