Method Of Setting Tcp Server And Exchanging Data In Data Mode - Wiznet WizFi250 Programmer's Manual

Hide thumbs Also See for WizFi250:
Table of Contents

Advertisement

Exchanging data with a peer system
If WizFi250 successfully connects to a peer system, WizFi250 will print [CONNECT(CID)] message and enter data
mode. In data mode, WizFi250 can send serial data to peer system and receive network data from peer system
without other translation.
Socket Close
In order to close TCP connection, WizFi250 has to switch to AT Command Mode. ( When +++ message entered,
WizFi250 can be changed to AT Command Mode. ) After being changed to AT Command Mode, TCP Connection
can be closed by using <AT+SMGMT=CID> or <AT+SMGMT=ALL> command.
Checking Socket Status
After being changed to AT Command Mode, TCP Connection can be closed by using <AT+SMGMT=CID> or
<AT+SMGMT=ALL> command.
AT+SMGMT=?
Number of Sockets : 1 (SCID/Socket/Mode/Remote/Local/DataMode)
0/TCN/192.168.12.23:5000/5001/1
[OK]
2013/09/04 13:20 ·
jeonggw

Method of setting TCP Server and exchanging data in Data Mode

Socket Open
This section explains how to open <TCP Server Socket> and communicate with peer system. Below is the
example for setting TCP Server and then changing to data mode. For detailed information about <AT+SCON>
command, refer to
AT+SCON
Mode : Data Mode, TCP Server
Local Port : 5000
AP Association
AT+SCON=O,TSN, , ,5000,1
[OK]
[CONNECT 0]
Exchanging data with a peer system
Exchanging data with its peer system is the same as previous
2020/11/26 12:13
and
Socket
Open.
( Refer to Association & Disassociation Example )
( AT command listening with a TCP Server Socket )
<= When TCP connection is done, you can see this message
65/81
Exchanging data with a peer
system.
WizFi250 Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents