Configurations and Settings
141
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
HTTP Server
Table 9-1. Key Features (continued)
Feature
Description
Serve HTML pages from file system
Serve any resource that can be placed on the file system.
RESTful APIs
Execute various APIs through simple POST requests.
Built-in configuration pages
Built-in default page that provides device configuration, status, and analyzing tools
Host callbacks
HTTP requests can be handled by the host through a simple callback mechanism.
HTTP port configuration
Default is port 80.
HTTP web server authentication
Includes authentication name, password, and realm, which are configurable. Can
be enabled or disabled (disabled by default).
Domain name configuration
Supported in AP mode.
Redirect mechanism
Redirect a nonsecure connection to secured .
Host-controlled resource transfer size
Host is able to select desired packet size for sending and receiving resources.
9.3
Configurations and Settings
The HTTP server is active by default on all device modes (STA, AP, and Wi-Fi Direct). It can be disabled
or enabled per specific device mode using the sl_NetAppStart / sl_NetAppStop API. Domain names can
be set by using the HTTP server options, and are configured through the sl_NetAppSet API with
SL_NETAPP_HTTP_SERVER_ID as the App ID. For the configuration to take effect, the server must be
restarted (either by stopping and restarting the service or by restarting the entire network subsystem).
describes the available configuration options.
Table 9-2. Configuration Options
Option Name
Function
Notes
Default Value
SL_NETAPP_HTTP_PRIMARY_PORT_NUMB
ER
Port on which the server accepts
new connections
80
SL_NETAPP_HTTP_PRIMARY_PORT_SECU
RITY_MODE
Enables the secure socket
connection (SSL) on the primary
server port
Disabled
SL_NETAPP_HTTP_AUTH_CHECK
Enable or disable the client
authentication.
Disabled
SL_NETAPP_HTTP_AUTH_NAME
Authentication username
Maximum length is 20
characters
Admin
SL_NETAPP_HTTP_AUTH_PASSWORD
Authentication password
Maximum length is 20
characters
Admin
SL_NETAPP_HTTP_AUTH_REALM
Authentication realm
Only one realm is
supported. Maximum
length is 20
characters
SimpleLink CC31xx
SL_NETAPP_HTTP_ROM_PAGES_ACCESS
Enable access to the
configuration pages stored in the
ROM of the device and
processing of the RESTful APIs.
Enabled
SL_NETAPP_HTTP_SECONDARY_PORT_NU
MBER
Secondary port on the HTTP
server accepts connections.
80
SL_NETAPP_HTTP_SECONDARY_PORT_EN
ABLE
Enable or disable secondary port.
Disabled
SL_NETAPP_HTTP_PRIVATE_KEY_FILENA
ME
Public or private pair used for key
exchange when secure socket is
enabled
N/A
SL_NETAPP_HTTP_DEVICE_CERTIFICATE_
FILENAME
Public or private pair used for key
exchange when secure socket is
enabled
N/A
SL_NETAPP_HTTP_CA_CERTIFICATE_FILE
_NAME
Certificate file name which will be
used for client authentication (if
present).
N/A