Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN4683 Datasheet(PDF) 23 Page - STMicroelectronics

Part # AN4683
Description  Transport layer security protocol for SPWFxxx module
PDF  31 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4683 Datasheet(HTML) 23 Page - STMicroelectronics

Back Button AN4683 Datasheet HTML 19Page - STMicroelectronics AN4683 Datasheet HTML 20Page - STMicroelectronics AN4683 Datasheet HTML 21Page - STMicroelectronics AN4683 Datasheet HTML 22Page - STMicroelectronics AN4683 Datasheet HTML 23Page - STMicroelectronics AN4683 Datasheet HTML 24Page - STMicroelectronics AN4683 Datasheet HTML 25Page - STMicroelectronics AN4683 Datasheet HTML 26Page - STMicroelectronics AN4683 Datasheet HTML 27Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 23 / 31 page
background image
DocID027745 Rev 1
23/31
AN4683
Demonstration package
31
The first step is to open the secure connection to the HTTPS server: it is recommended to
run AT+S.TLSCERT2=clean,all to clean the Flash memory and then open a secure
connection to hostname my.st.com on port 443 as below. Note that the parameter ind is
enabled to activate asynchronous indications of pending data from the server.
AT+S.SOCKON=my.st.com,443,s,ind<CR>
<CR><LF>
ID: 00<CR><LF>
<CR><LF>
OK
When the TLS Handshake is successful, the AT+S.SOCKON gives back the sock id and all
the data exchanged from now on are encrypted with the newly established session key.
The second step is to send an HTTPS message to the server: the following code shows how
to use the AT+S.SOCKW to send a basic HTTP GET request:
AT+S.SOCKW=00,18<CR>
GET / HTTP/1.1<CR><LF>
<CR><LF>
OK
The server response to the above GET request is signaled by a couple of asynchronous
indications (see the WIND:55 in the box below). In order to get and decrypt the received
data, we have to iteratively call AT+S.SOCKQ and AT+S.SOCKR to process all the received
pending data as follows:
+WIND:55:Pending Data:0:ENC<CR><LF>
<CR><LF>
+WIND:55:Pending Data:0:ENC<CR><LF>
AT+S.SOCKQ=00<CR>
<CR><LF>
DATALEN: 483<CR><LF>
<CR><LF>
OK
AT+S.SOCKR=00,483<CR>
HTTP/1.1 302 Found<CR><LF>
Date: Tue, 31 Mar 2015 08:48:16 GMT<CR><LF>
Location: https://my.st.com/cas/login?service=https://my.st.com/<CR><LF>
Content-Length: 238<CR><LF>
Content-Type: text/html; charset=iso-8859-1<CR><LF>
Proxy-Connection: Keep-Alive<CR><LF>
Connection: Keep-Alive<CR><LF>
<CR><LF>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><LF>
<html><head><LF>



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com