Template:CC31xx & CC32xx Server Setup with Python Scripts

Using python scripts is an easy solution for peer server. The python package is open sourced and can be easily installed on any PC. This document will describe how to set the python environment on a PC and how to use the provided scripts.

Software requirements

 * Python 2.7.x - Please note that there is also python 3 installers on the web site, please stick to the python 2 versions, as the provided server scripts support of python 3 is not guaranteed. Install the package on your PC according to the instructions the installer prompts.


 * OpenSSL - In order to implement a secure server, OpenSSL must be installed. Please refer to CC31xx & CC32xx Generate Certificate for OpenSSL download and certificate generation. Place all certificate files under the same directory when you are done.

Peer server provided scripts
There are 2 python scripts provided in the packages:
 * 1) tcp_server.py – this script implements a TCP server.
 * 2) ssl_tcp_server.py – this script implements a TCP server with TLS/SLL.

Setting the connection parameters
Each one of the scripts requires the user to set the connection parameters the figures below show an example.


 * tcp_server.py setting example


 * ssl_tcp_server.py setting example

Running the script
Open a command line terminal and run the command, just like in the figure 3 below. Make sure that the running computer is connected to same AP as your simplelink device.


 * Running Example