WizFi210
Programmers’ Guide
(WIZnet Co., Ltd.)
8-58
②
Then, connect to that HTTP server you want using “AT+HTTPOPEN” command.
③
Next, send a query data to get HTML data to that HTTP server using “AT+HTTPSEND”
command.
8.1.2.
Communicating with Secure Web Server using HTTPS
Now, we explain how to communicate with a Secured Web Server, m.twitter.com, with a simple
example.
Normally, When registering our own tweet or getting mentions from others on twitter.com, we
need a secure session known as HTTPS. In order to do this, we need something to do as below.
①
Certificate from the Secured Web Server, like twitter.com
②
A secure TCP/IP Session, this means TLS(SSL) function is supported.
As an example, we will describe how to connect to twitter.com and register user’s own tweet on
it, step by step.
Getting Twitter Certificate
You have to get twitter certificate using a Web browser in your PC, as WizFi210 doesn’t operate
as a real Web browser. You can do this in the same way that you connect to other secure Web
13
80 is the default port number of normal HTTP server, not HTTPS server.
14
If this value is ‘0’, then it makes WizFi210 use the standard HTTP protocol, not HTTPS protocol
15
The CID number of a socket connected to mobile.twitter.com
AT+HTTPCONF=20,User-Agent: Mozilla/5.0
[OK]
AT+HTTPCONF=3,close
[OK]
AT+HTTPCONF=11,www.wiznet.co.kr
[OK]
(
Response which means executed successfully
)
AT+HTTPOPEN=www.wiznet.co.kr,80
13
,0
14
IP:118.129.166.160
0
15
(Response from WizFi210)
[OK]
(Response from WizFi210)
AT+HTTPSEND=0,1,10,/
<ESC>H0......
(Data from WizFi210 to Host processor)
[DISCONNECT 0]
(Notification message from WizFi210)