User Tools

Site Tools


products:wiz550sr:wiz550sr_tutorial_en:exam4

Exam 4. Example of data communication with more than two devices in Static IP


1. Set WIZ550SR with Static IP

Set Network IP(192.168.3.101), Subnet Mask(255.255.255.0) and Gateway(192.168.3.1) in WIZ550SR.

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


2. Open a UDP socket
Open a UDP socket with its local port 5000.

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


3. Get data from the first UDP device

If the first UDP device, which its IP address is 192.168.3.201 and port number is 4001, sent “AAAAAAAAAA”
then WIZ550SR notify to you like below.

<RX> [R,0,10,192.168.3.201,4001]\r\nAAAAAAAAAA\r\n


4. Send data to the first UDP device

Send 10 bytes data “aaaaaaaaaa” to the first UDP device.

<TX> AT+NSEND=0,10,192.168.3.201,4001\r\naaaaaaaaaa
<RX> [W,0]\r\n[S,0]\r\n


5. Get data from the second UDP device

If the second UDP device, which its IP address is 192.168.3.202 and port number is 4002, sent “BBBBBBBBBB”
then WIZ550SR notify to you like below.

<RX> [R,0,10,192.168.3.202,4002]\r\nBBBBBBBBBB\r\n


6. Send data to the second UDP device

Send 10 bytes data “bbbbbbbbbb” to the second UDP device.

<TX> AT+NSEND=0,10,192.168.3.202,4002\r\nbbbbbbbbbb
<RX> [W,0]\r\n[S,0]\r\n


7. Get data from the third UDP device

If the third UDP device, which its IP address is 192.168.3.203 and port number is 4003, sent “CCCCCCCCCC”
then WIZ550SR notify to you like below.

<RX> [R,0,10,192.168.3.203,4003]\r\nCCCCCCCCCC\r\n


8. Send data to the third UDP device

Send 10 bytes data “cccccccccc” to the second UDP device.

<TX> AT+NSEND=0,10,192.168.3.203,4003\r\ncccccccccc
<RX> [W,0]\r\n[S,0]\r\n


9. Close UDP socket

<TX> AT+NCLOSE=0\r\n
<RX> [W,0]\r\n[S,0]\r\n
products/wiz550sr/wiz550sr_tutorial_en/exam4.txt · Last modified: 2016/06/21 10:42 by jeongsk