From 52e21bad544fb4da5181130e2ac6028458cd1d63 Mon Sep 17 00:00:00 2001 From: mikee47 Date: Sat, 20 Jul 2019 10:08:17 +0100 Subject: [PATCH] Update `Basic_Ssl`, `Echo_Ssl` and `HttpClient` sample readme. --- samples/Basic_Ssl/README.rst | 28 ++++++------------- samples/Echo_Ssl/README.rst | 51 +---------------------------------- samples/HttpClient/README.rst | 39 +-------------------------- 3 files changed, 10 insertions(+), 108 deletions(-) diff --git a/samples/Basic_Ssl/README.rst b/samples/Basic_Ssl/README.rst index 0c9912fb33..a7863b9583 100644 --- a/samples/Basic_Ssl/README.rst +++ b/samples/Basic_Ssl/README.rst @@ -6,23 +6,11 @@ Compilation In Sming the SSL support is not enabled by default. -In order to enable it you should first recompile SmingFramework with -:envvar:`ENABLE_SSL` =1 directive. This can be done using the following commands: +In order to enable it you should compile your project with the +:envvar:`ENABLE_SSL` =1 directive. This can be done using the following command: .. code:: bash - cd /Sming - make clean - make ENABLE_SSL=1 - -Once you have enabled the SSL support in SmingFramework you can go -forward and compile your application with the same directive. For -example the Basic_Ssl project should be compiled with - -.. code:: bash - - cd /samples/Basic_Ssl - make clean make ENABLE_SSL=1 Now you can flash your application to your ESP8266 device. @@ -31,14 +19,10 @@ Debug Information ----------------- If you want to see more debug information during compile type you should -add the directive :envvar:`SSL_DEBUG` =1. A recompilation of SmingFramework with -SSL support and SSL dubug information can be done with the following -commands: +add the directive :envvar:`SSL_DEBUG` =1, like this: .. code:: bash - cd /Sming - make clean make ENABLE_SSL=1 SSL_DEBUG=1 Slow SSL negotiation @@ -50,4 +34,8 @@ CPU is switched back to 80 MHz. If your device is running on battery this can drain the battery much faster. If you do not want the switch from 80 to 160 MHz to happen then -make sure to recompile SmingFramework with :c:macro:`SSL_SLOW_CONNECT` defined. +make sure to recompile SmingFramework with :c:macro:`SSL_SLOW_CONNECT` directive: + +.. code:: bash + + make USER_CFLAGS="SSL_SLOW_CONNECT=1" diff --git a/samples/Echo_Ssl/README.rst b/samples/Echo_Ssl/README.rst index 003cf3b307..bcf5c710a4 100644 --- a/samples/Echo_Ssl/README.rst +++ b/samples/Echo_Ssl/README.rst @@ -1,53 +1,4 @@ Echo SSL ======== -Compilation ------------ - -In Sming the SSL support is not enabled by default. - -In order to enable it you should first recompile SmingFramework with -:envvar:`ENABLE_SSL` =1 directive. This can be done using the following commands: - -.. code:: bash - - cd /Sming - make clean - make ENABLE_SSL=1 - -Once you have enabled the SSL support in SmingFramework you can go -forward and compile your application with the same directive. For -example the Basic_Ssl project should be compiled with - -.. code:: bash - - cd /samples/Basic_Ssl - make clean - make ENABLE_SSL=1 - -Now you can flash your application to your ESP8266 device. - -Debug Information ------------------ - -If you want to see more debug information during compile type you should -add the directive :envvar:`SSL_DEBUG` =1. A recompilation of SmingFramework with -SSL support and SSL dubug information can be done with the following -commands: - -.. code:: bash - - cd /Sming - make clean - make ENABLE_SSL=1 SSL_DEBUG=1 - -Slow SSL negotiation --------------------- - -The initial SSL negotiation is CPU intensive. By default SmingFramework -switches the CPU frequency from 80 to 160 MHz. After the negotiation the -CPU is switched back to 80 MHz. - -If your device is running on battery this can drain the battery much -faster. If you do not want the switch from 80 to 160 MHz to happen then -make sure to recompile SmingFramework with :c:macro:`SSL_SLOW_CONNECT` defined. +See :sample:`Basic_Ssl` for information on compiling and configuring SSL. diff --git a/samples/HttpClient/README.rst b/samples/HttpClient/README.rst index 3356496b50..ead628f4da 100644 --- a/samples/HttpClient/README.rst +++ b/samples/HttpClient/README.rst @@ -1,41 +1,4 @@ HTTP Client =========== -Compilation ------------ - -In Sming the SSL support is not enabled by default. - -In order to enable it you should compile your project with the -:envvar:`ENABLE_SSL` =1 directive. This can be done using the following command: - -.. code:: bash - - make ENABLE_SSL=1 - -Now you can flash your application to your ESP8266 device. - -Debug Information ------------------ - -If you want to see more debug information during compile type you should -add the directive :envvar:`SSL_DEBUG` =1, like this: - -.. code:: bash - - make ENABLE_SSL=1 SSL_DEBUG=1 - -Slow SSL negotiation --------------------- - -The initial SSL negotiation is CPU intensive. By default SmingFramework -switches the CPU frequency from 80 to 160 MHz. After the negotiation the -CPU is switched back to 80 MHz. - -If your device is running on battery this can drain the battery much -faster. If you do not want the switch from 80 to 160 MHz to happen then -make sure to recompile SmingFramework with :c:macro:`SSL_SLOW_CONNECT` directive: - -.. code:: bash - - make USER_CFLAGS="SSL_SLOW_CONNECT=1" +See :sample:`Basic_Ssl` for information on compiling and configuring SSL.