Skip to content

Commit

Permalink
Add instructions for using IoT credentials in the samples and documen…
Browse files Browse the repository at this point in the history
…t additional cmake options (#2058)

* Add instructions for using IoT credentials in the samples and documentat additional cmake options

* Address comments in the readme
  • Loading branch information
sirknightj authored Oct 2, 2024
1 parent e22e08b commit d9ab52d
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ If `-DBUILD_STATIC_LIBS=TRUE` then all dependencies and KVS WebRTC libraries wil
#### CMake Arguments
You can pass the following options to `cmake ..`.

* `-DBUILD_STATIC_LIBS` -- Build all KVS WebRTC and third-party libraries as static libraries.
* `-DBUILD_SAMPLE` -- Build the sample executables. ON by default.
* `-DIOT_CORE_ENABLE_CREDENTIALS` -- Build the sample applications using IoT credentials. OFF by default.
* `-DBUILD_STATIC_LIBS` -- Build all KVS WebRTC and third-party libraries as static libraries. Default: OFF (shared build).
* `-DADD_MUCLIBC` -- Add -muclibc c flag
* `-DBUILD_DEPENDENCIES` -- Whether or not to build depending libraries from source
* `-DBUILD_OPENSSL_PLATFORM` -- If building OpenSSL what is the target platform
Expand All @@ -152,7 +154,7 @@ You can pass the following options to `cmake ..`.
* `-DCMAKE_BUILD_TYPE` -- Build Release/Debug libraries. By default, the SDK generates Release build. The standard options are listed [here](https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#default-and-custom-configurations)
* `-DLINK_PROFILER` -- Link with gperftools (available profiler options are listed [here](https://github.com/gperftools/gperftools))
* `-DPKG_CONFIG_EXECUTABLE` -- Set pkg config path. This might be required to find gstreamer's pkg config specifically on Windows.
* `DENABLE_KVS_THREADPOOL` -- Enable the KVS threadpool which is off by default.
* `-DENABLE_KVS_THREADPOOL` -- Enable the KVS threadpool which is off by default.

To clean up the `open-source` and `build` folders from previous build, use `cmake --build . --target clean` from the `build` folder

Expand Down Expand Up @@ -261,7 +263,13 @@ If you have a custom CA certificate path to set, you can set it using:
export AWS_KVS_CACERT_PATH=../certs/cert.pem
```

By defaut, the SSL CA certificate is set to `../certs/cert.pem` which points to the file in this repository:
Or, you can pass it in through the CMake flag:

```shell
cmake .. -DKVS_CA_CERT_PATH=/path/to/cert.pem
```

By default, the SSL CA certificate is set to [`../certs/cert.pem`](./certs/cert.pem) which points to the file in this repository.

### Running the Samples
After executing `make` you will have sample applications in your `build/samples` directory. From the `build/` directory, run any of the sample applications by passing to it the name of your signaling channel. If a signaling channel does not exist with the name you provide, the application creates one.
Expand Down Expand Up @@ -402,6 +410,27 @@ createLwsIotCredentialProvider(
freeIotCredentialProvider(&pSampleConfiguration->pCredentialProvider);
```
### Running samples with IoT Core credentials
Build the samples using IoT Core credentials mode:
```shell
cmake .. -DIOT_CORE_ENABLE_CREDENTIALS=ON
make
```

Set the environment variables for IoT Core credentials:

```shell
export AWS_IOT_CORE_CREDENTIAL_ENDPOINT=xxxxx.credentials.iot.xxxxx.amazonaws.com
export AWS_IOT_CORE_PRIVATE_KEY=xxxxxxxx-private.pem.key
export AWS_IOT_CORE_ROLE_ALIAS=xxxxxx
export AWS_IOT_CORE_THING_NAME=xxxxxx
export AWS_IOT_CORE_CERT=xxxxx-certificate.pem.crt
```

AWS access keys are ignored from environment variables if the sample was built in IoT Core credentials mode.

## TWCC support

Transport Wide Congestion Control (TWCC) is a mechanism in WebRTC designed to enhance the performance and reliability of real-time communication over the internet. TWCC addresses the challenges of network congestion by providing detailed feedback on the transport of packets across the network, enabling adaptive bitrate control and optimization of media streams in real-time. This feedback mechanism is crucial for maintaining high-quality audio and video communication, as it allows senders to adjust their transmission strategies based on comprehensive information about packet losses, delays, and jitter experienced across the entire transport path.
Expand Down

0 comments on commit d9ab52d

Please sign in to comment.