You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor modifications to the sample README file (#373)
* Modified the basic pub sub sample section of the README.md file
* Adjusted Sample README to include a section on how to use Websockets with the pub-sub sample
* Adjusted the samples README for the raw-pub-sub sample, the shadow sample, and the jobs sample
* Adjusted samples README based on feedback and fixes for policy markdown rendering
To view the commands for a given sample, run the compiled program and pass `--help`.
28
+
29
+
```
30
+
./basic-pub-sub --help
31
+
```
32
+
27
33
#### Note
28
34
29
35
*`-DCMAKE_PREFIX_PATH` needs to be set to the path aws-iot-device-sdk-cpp-v2 installed. Since [Installation](../README.md#Installation) takes sdk-cpp-workspace as an example, here takes that as an example too.
for AWS IoT to send and receive messages through an MQTT connection.
38
-
On startup, the device connects to the server and subscribes to a topic.
39
-
40
-
The terminal prompts the user for input. Type something and press enter to publish a message to the topic.
41
-
Since the sample is subscribed to the same topic, it will also receive the message back from the server.
42
-
Type `quit` and press enter to end the sample.
44
+
On startup, the device connects to the server, subscribes to a topic, and begins publishing messages to that topic. The device should receive those same messages back from the message broker, since it is subscribed to that same topic. Status updates are continually printed to the console.
Note that using Websockets will attempt to fetch the AWS credentials from your enviornment variables or local files.
113
+
See the [authorizing direct AWS](https://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html) page for documentation on how to get the AWS credentials, which then you can set to the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS`, and `AWS_SESSION_TOKEN` environment variables.
114
+
115
+
</details>
116
+
100
117
## PKCS#11 MQTT Pub-Sub
101
118
102
119
This sample is similar to the [Basic Pub-Sub](#basic-mqtt-pub-sub),
@@ -147,7 +164,7 @@ To run this sample using [SoftHSM2](https://www.opendnssec.org/softhsm/) as the
See the [Basic job policy example](https://docs.aws.amazon.com/iot/latest/developerguide/basic-jobs-example.html) page for another policy example.
312
351
</details>
313
352
353
+
To run the job sample use the following command:
354
+
355
+
``` sh
356
+
./describe-job-execution --endpoint <endpoint> --ca_file <path to root CA>
357
+
--cert <path to the certificate> --key <path to the private key>
358
+
--thing_name <thing name> --job_id <the job id>
359
+
```
360
+
361
+
Note that if you get a `Service Error 4 occurred` error, you may have incorrectly input the job id. The job id needs to exactly match the job id in the AWS console.
0 commit comments