Exchanging Data With A Peer System; Closing Tcp Connection And Udp Socket - Wiznet WizFi210 Programmer's Manual

Hide thumbs Also See for WizFi210:
Table of Contents

Advertisement

10.3.2. Exchanging data with a peer system

When using multi sockets, you have to use ESCAPE SEQUENCE to send and/or receive data
to/from peer devices. For details of ESCAPE SEQUENCE, refer to 4.3.2 Escape Sequences.
Sending data to a Socket with CID 0 under not using BULK mode
<ESC>S0abcd<ESC>E
Sednig data to a Socket with CID 0 under using BULK mode
<ESC>Z00004abcd => 1B 5A 30
Receiving data from a UDP Socket under not using BULK mode
<Esc>U0192.168.1.1:52:Hello<Esc>E
1B 55 30 31 39 32 2E 31 36 38 2E 31 2E 31 3A 35 32 3A 48 65 6C 6C 6F 1B
45 (in HEX)
Receiving data from a UDP Socket under using BULK mode
<Esc>y0192.168.1.1 52\t0005Hello
1B 79 30 31 39 32 2E 31 36 38 2E 31 2E 31 20 35 32 09 30 30 30 35 48 65
6C 6C 6F (in HEX)
Figure 25 Example of exchanging data in multi sockets mode

10.3.3. Closing TCP connection and UDP socket

AT+NCLOSE=0
(Sent AT command followed 0x0d)
[DISCONNECT 0]
(Response)
[OK]
(Sent AT command followed 0x0d)
AT+NCLOSE=1
[DISCONNECT 1]
[OK]
(Response)
21
CID
22
Data Length
23
Data
WizFi210
Programmers' Guide
=> 1B 53 30 61 62 63 64 1B 45 (in HEX, no space)
21
30 30 30 34
(Notification Message by issuing a command, AT+XDUM=0)
<=
(Notification Message by issuing a command, AT+XDUM=0)
<=
Figure 26 Example of commands for closing sockets
(WIZnet Co., Ltd.)
22
23
61 62 63 64
10-74

Advertisement

Table of Contents
loading

Table of Contents