| Electronic Components Datasheet Search |
|
AN4683 Datasheet(PDF) 23 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4683 Datasheet(HTML) 23 Page - STMicroelectronics |
|
23 / 31 page ![]() 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> |
|
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 |
| 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 |