FreeRTOS:
HTTPS Client
HTTPS Client v1.0.0 library
|
Return to main page ↑ |
Configuration settings of the HTTP Client demo.
Configuration settings are C pre-processor constants. They can be set with a #
in the iot_config.h or by using a compiler option such as define
-D
in gcc. If a configuration setting is not defined, the library will use a "sensible" default value (unless otherwise noted). Because they are compile-time constants, a library must be rebuilt if a configuration setting is changed.
The settings on this page only affect the HTTP Client demo. In addition to the settings on this page, the HTTP Client demo will also be affected by settings that affect all demos.
Presigned URL for AWS S3 GET Object access.
This is generated using the script demos/https/presigned_url_gen.py. demos/https/README.md explains how to use the script.
Possible values: Presigned URL of the form: https://aws-s3-endpoint/object-key.txt?AWSAccessKeyId=AAAAAAAAAAAAAAAAAAAA&Expires=1560555644&Signature=SomeHash12345UrlABcdEFgfIjK%3D
.
Default value (if undefined): "Please configure a presigned GET URL in iot_config.h."
The port number for the TLS connection to AWS S3's HTTP server.
Possible values: Any positive integer up to 2^16.
Default value (if undefined): 443
The trusted root CA needed to connected to AWS S3's HTTP server.
Possible values: A valid PEM encoded certificate string.
Default value (if undefined): The Baltimore Cybertrust root CA.
The size of the static user buffer to store the HTTP Client connection context.
Size in bytes of the User Buffer used to store the internal connection context. The size presented here accounts for storage of the internal connection context. The minimum size can be found in connectionUserBufferMinimumSize.
Possible values: Any positive integer.
Default value (if undefined): 400
The size of the static user buffer to store the HTTP Client request context and HTTP formatted request headers.
Size in bytes of the user buffer used to store the internal request context and HTTP request header lines. The size presented here accounts for the storage of the internal context, the first Request-Line in the HTTP formatted header and extra headers. The minimum size can be found in requestUserBufferMinimumSize. Keep in mind that this requestUserBufferMinimumSize does not include the size of the path in the Request-Line. The path could be well over 100 characters long as it includes not only the object key name in S3, but also the query following. The query following has the AWSAccessKeyId, the expiration time, and the AWS Signature Version 4 signature.
Possible values: Any positive integer.
Default value (if undefined): 512
The size of the static user buffer to store the HTTP Client response context and HTTP formatted response headers.
Size in bytes of the user buffer used to store the internal response context and the HTTP response header lines. The size presented here accounts for the storage of the internal context, the first Request-Line in the HTTP formatted header and extra headers. The minimum can be found in requestUserBufferMinimumSize. Keep in mind that if the headers from the response do not all fit into this buffer, then the rest of the headers will be discarded. The minimum size can be found in responseUserBufferMinimumSize.
Possible values: Any positive integer.
Default value (if undefined): 1024
The size of the static buffer to store an increment of the response body.
Size in bytes of the buffer used to store the response body (parts of it). This should be less than or equal to the size of the file we want to download
Possible values: Any positive integer.
Default value (if undefined): 512
Pointer to the data to upload to S3.
This can be a pointer to a memory location or a string literal.
Possible values: Any readable address location or string.
Default value (if undefined): `"Hello World!"
The size of the data pointed to by IOT_DEMO_HTTPS_UPLOAD_DATA.
Possible values: Any positive integer.
Default value (if undefined): ( sizeof( IOT_DEMO_HTTPS_UPLOAD_DATA ) - 1 )
Time to wait in milliseconds before retrying the HTTPS Connection.
A connection is only attempted again if IOT_HTTPS_CONNECTION_ERROR is returned from IotHttpsClient_Connect(). This indicates an error in the network layer. To view network errors update IOT_LOG_LEVEL_NETWORK to IOT_LOG_ERROR in iot_config.h.
Possible values: Any positive integer. Default value (if undefined): 3000
Number of times to retry the HTTPS connection.
A connection is only attempted again if IOT_HTTPS_CONNECTION_ERROR is returned from IotHttpsClient_Connect(). This indicates an error in the network layer. To view network errors update IOT_LOG_LEVEL_NETWORK to IOT_LOG_ERROR in iot_config.h.
Possible values: Any positive integer. Default value (if undefined): 3
Timeout in milliseconds to wait for a response to to a synchronous request.
This timeout is applied to function IotHttpsClient_SendSync.
This configuration applies to iot_demo_https_s3_download_sync.c and iot_demo_https_s3_upload_sync.c
Possible values: Any positive integer.
Default value (if undefined): 60000
The maximum number of inflight asynchronous requests.
This configuration applies only to iot_demo_https_s3_download_async.c.
This configures the total number of requests in the pool of HTTPS Client library configurations and handles. In order to send a request asynchronously the memory for both the request buffers and the response buffers must not be shared between other asynchronous requests on the same connection. You can reuse the buffer only after the request/response process has been finished. It is finished when the responseCompleteCallback() is invoked. We create a pool of memory so that all available requests in the pool can be scheduled right away without over-writing each other.
Possible values: Any positive integer.
Default value (if undefined): 3
Timeout in milliseconds to wait for all asynchronous requests to finish.
This configuration applies to iot_demo_https_s3_download_async.c and iot_demo_https_s3_upload_async.c
For iot_demo_https_s3_download_async.c this timeout starts when the last IOT_HTTPS_DEMO_MAX_ASYNC_REQUESTS sent have been scheduled.
Possible values: Any positive integer.
Default value (if undefined): 300000