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

Hide thumbs Also See for WizFi250:
Table of Contents

Advertisement

Gateway
: 192.168.12.1
[OK]
AT+WLEAVE
[Link-Down Event]
[OK]
2013/09/04 13:20 ·
jeonggw
2013/09/04 13:20 ·
jeonggw

Examples - Data Communication

Method of setting TCP Client and exchanging data in Data Mode

Socket Open
This section explains how to open <TCP Client Socket> and communicate with peer system. Below is an
example showing how to set TCP Client and change the mode to data mode. It also explains parameters of
<AT+SCON> command.
(AT+SCON=<OpenType>,<SocketType>,<RemoteIP>,<RemotePort>,<LocalPort>,<DataMode>)
If you enter <O> or <SO> value to <Open Type> parameter, WizFi250 will try to connect to TCP Server
immediately. But when using <S> value, WizFi250 will try to connect to TCP Server after reboot and you have to
set <SocketType>,<RemoteIP>,<RemotePort> and <LocalPort> as below
In order to set WizFi250 to data mode, you have to enter 1 value to <Data Mode> parameter of <AT+SCON>
command. For detailed information to this command, refer to AT+SCON.
Mode: Data Mode, TCP Client
Remote IP : 192.168.12.102
Remote Port : 5000
Local Port : 5001
AP Association
)
AT+SCON=O,TCN,192.168.12.102,5000,5001,1 ( AT command connecting with a TCP Client
Socket )
[OK]
[CONNECT 0]
2020/11/26 12:13
(AT Command disassociating from AP association)
( Refers to Association & Disassociation Example
<= At this point, a TCP connection is done
64/81
WizFi250 Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents