Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4683 Datasheet(PDF) 20 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) 20 Page - STMicroelectronics

Back Button AN4683 Datasheet HTML 16Page - STMicroelectronics AN4683 Datasheet HTML 17Page - STMicroelectronics AN4683 Datasheet HTML 18Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 20 / 31 page
background image
Demonstration package
AN4683
20/31
DocID027745 Rev 1
When WIND:55 indications occur, the pending data is still encrypted, thus the length of
decrypted data is not known in advance. The SOCKQ can be used to get the actual length
of the data decrypted by TLS library and already waiting for reading.
Up to 4 consecutive WIND:55 messages (w/o SOCKR) are guaranteed. To prevent data
loss, it is suggested to empty the buffer by using the AT+S.SOCKR command and to avoid
exceeding 4 indications.
AT+S.SOCKW=<sock id>,<len>
AT+S.SOCKQ=<sock id>
AT+S.SOCKR=<sock id>,<len>
Note:
When using a secure socket, the module can handle data packets up to 3 KB. This means
that the len parameter in AT+S.SOCKW and AT+S.SOCKR can be up to 3072 bytes.
Detailed description of AT commands is contained in (see [2] in References).
3.4
Example 2: TLS Client with one-way authentication
This second example implements a TLS connection supporting one-way authentication. The
server and CA use RSA-2048 authentication.
Before running the example, the SPWF01Sxxx (client) must be connected to the Wi-Fi LAN
as illustrated in Section 3.2 and OpenSSL must be installed on the PC (acting as server).
For testing purposes, OpenSSL-1.0.1i has been used as TLS Server. Documentation and
installation instructions are available on the OpenSSL website (see [12] in References).
The IP addresses of the client and server are automatically assigned by the network router.
To start the server, open a command prompt into the folder Project/Examples/Example2 and
run this line:
openssl s_server -cert server_cert.pem -key server_key.pem -accept <port>
Note:
The accept parameter specifies the TCP port to listen on for connections. If not specified,
the default 4433 is used.
To start the client, it's recommended to run AT+S.TLSCERT2=clean,all to clean the Flash
memory, and then use these AT commands:
AT+S.SETTIME=<seconds>
AT+S.TLSCERT=f_ca,<size><CR><data>
AT+S.TLSDOMAIN=f_domain,<server domain>
AT+S.SOCKON=<hostname>,<port>,s[,ind]
Note:
Seconds is the current time expressed in seconds since 1970-Jan-01: AT+S.SETTIME can
be done only once after module reset.
AT+S.TLSCERT=<f_ca/f_cert/f_key>,<size><CR><data> stores certificates or key files to
the module. In case of one-way authentication, only the CA certificate (f_ca) must be
loaded, the data must be in PEM format. This command accepts data after the <CR> at the
end of the command line. The host is expected to supply <size> of data as last parameter of
the command line. The size values must be expressed in bytes.
AT+S.TLSDOMAIN=f_domain,<server domain> passes the server domain to the module
and stores the domain information to Flash memory. The server domain is a string of



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