Skip to content

Commit

Permalink
Update Basic_Ssl, Echo_Ssl and HttpClient sample readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Jul 20, 2019
1 parent b320861 commit 52e21ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 108 deletions.
28 changes: 8 additions & 20 deletions samples/Basic_Ssl/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path-to-sming>/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 <path-to-sming>/samples/Basic_Ssl
make clean
make ENABLE_SSL=1
Now you can flash your application to your ESP8266 device.
Expand All @@ -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 <path-to-sming>/Sming
make clean
make ENABLE_SSL=1 SSL_DEBUG=1
Slow SSL negotiation
Expand All @@ -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"
51 changes: 1 addition & 50 deletions samples/Echo_Ssl/README.rst
Original file line number Diff line number Diff line change
@@ -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 <path-to-sming>/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 <path-to-sming>/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 <path-to-sming>/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.
39 changes: 1 addition & 38 deletions samples/HttpClient/README.rst
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 52e21ba

Please sign in to comment.