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

Hide thumbs Also See for WizFi250:
Table of Contents

Advertisement

Checking Socket Status
Checking socket status is the same as previous
2013/09/04 13:21 ·
jeonggw

Method of setting TCP Client and exchanging data in Command Mode

Socket Open
This section explains how to set <TCP Client> in <Command Mode> and communicate to peer system. Below is
the example for setting TCP Client on the Command Mode . In order to enter in the Command Mode, you have to
enter 0 value to <Data Mode> parameter of <AT+SCON> command. For detailed information to this command,
refer to
AT+SCON
Mode : Command Mode, TCP Client
Remote IP: 192.168.12.23
Remote Port : 5000
Local Port : 5001
AP Association
AT+SCON=O,TCN,192.168.12.23,5000,5001,0
[OK]
[CONNECT 0]
Exchanging data with a peer system
If WizFi250 connects to peer system successfully, WizFi250 will print [CONNECT(CID)] message. At this time,
WizFi250 is in command mode. In order to send data to peer system, you have to use <AT+SSEND=CID,
Destination IP, Destination Port, Data Length> command. If you input serial command like <Data Length> ,
WizFi250 will send serial data to peer system.
AT+SSEND=0,,,5
Hello
system
[OK]
{0,192.168.12.23,5000,11}Hi WizFi250
Socket Close
In <AT Command Mode>, TCP connection can be closed through <AT+SMGMT=CID> or <AT+SMGMT=ALL>
command.
2020/11/26 12:13
( Refer to Association & Disassociation Example )
( Sending data to a Socket with CID 0 )
<= When serial data is 5byte, WizFi250 send this data to peer
68/81
Checking Socket
Status.
<= At this point, a TCP connection is done
( Receiving data from pear system )
WizFi250 Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents