Lines Matching +full:aws +full:- +full:region

1 .. zephyr:code-sample:: aws-iot-mqtt
2 :name: AWS IoT Core MQTT
3 :relevant-api: bsd_sockets mqtt_socket dns_resolve tls_credentials json sntp random_api
5 Connect to AWS IoT Core and publish messages using MQTT.
11 can publish messages to AWS IoT Core using the MQTT protocol. Key features include:
13 - Acquiring a DHCPv4 lease
14 - Connecting to an SNTP server to obtain the current time
15 - Establishing a TLS 1.2 connection with AWS IoT Core servers
16 - Subscribing to a topic on AWS IoT Core
17 - Publishing data to AWS IoT Core
18 - Passing the AWS Device Qualification Program (DQP) test suite: `Device Qualification Program (DQP…
19 - Sending and receiving keep-alive pings
20 - Retrying connections using an exponential backoff algorithm
25 - An entropy source
26 - An AWS account with access to AWS IoT Core
27 - AWS credentials and necessary information
28 - Network connectivity
33 This application has been built and tested on the ST NUCLEO-F429ZI board and
35 authenticate to the AWS IoT Core. The sample includes a script to convert
38 Register a *thing* in AWS IoT Core and download the certificate and private key.
43 To configure the sample, set the following Kconfig options based on your AWS IoT
44 Core region, thing, and device advisor configuration:
46 - :kconfig:option:`CONFIG_AWS_ENDPOINT`: The AWS IoT Core broker endpoint, found in the AWS IoT Core
48 - :kconfig:option:`CONFIG_AWS_MQTT_PORT`: Port number for AWS IoT Core MQTT broker.
49 - :kconfig:option:`CONFIG_AWS_THING_NAME`: The name of the thing created in AWS IoT Core. Associated
52 - :kconfig:option:`CONFIG_AWS_SUBSCRIBE_TOPIC`: The topic to subscribe to.
53 - :kconfig:option:`CONFIG_AWS_PUBLISH_TOPIC`: The topic to publish to.
54 - :kconfig:option:`CONFIG_AWS_QOS`: The QoS level for subscriptions and publications.
55 - :kconfig:option:`CONFIG_AWS_EXPONENTIAL_BACKOFF`: Enable the exponential backoff algorithm.
57 Refer to the `AWS IoT Core Documentation <https://docs.aws.amazon.com/iot/index.html>`_
60 Additionnaly, it is possible to tune the firmware to pass the AWS DQP test
63 More information about the AWS device advisor can be found here:
64 `AWS IoT Core Device Advisor <https://aws.amazon.com/iot-core/device-advisor/>`_.
69 Access the MQTT test client in the AWS IoT Core console, subscribe to the
72 the AWS console will show the JSON message sent by the device under the
78 This is the output from the ST-Link UART on the NUCLEO-F429ZI board.
80 .. code-block:: console
82 *** Booting Zephyr OS build zephyr-v3.3.0 ***
83 [00:00:01.626,000] <inf> aws: starting DHCPv4
84 [00:00:01.969,000] <dbg> aws: sntp_sync_time: Acquired time from NTP server: 1683472436
85 [00:00:01.977,000] <inf> aws: Resolved: 52.212.60.110:8883
86 [00:00:03.327,000] <dbg> aws: mqtt_event_cb: MQTT event: CONNACK [0] result: 0
87 [00:00:03.327,000] <inf> aws: Subscribing to 1 topic(s)
88 [00:00:03.390,000] <dbg> aws: mqtt_event_cb: MQTT event: SUBACK [7] result: 0
89 …[00:00:03.390,000] <inf> aws: PUBLISHED on topic "zephyr_sample/data" [ id: 1 qos: 0 ], payload: 1…
90 [00:00:03.390,000] <dbg> aws: publish_message: Published payload:
92 [00:00:11.856,000] <dbg> aws: mqtt_event_cb: MQTT event: PUBLISH [2] result: 0
93 …[00:00:11.856,000] <inf> aws: RECEIVED on topic "zephyr_sample/downlink" [ id: 13 qos: 0 ] payload…
94 [00:00:11.856,000] <dbg> aws: handle_published_message: Received payload:
96 48 65 6c 6c 6f 20 66 72 6f 6d 20 41 57 53 20 49 |Hello fr om AWS I
98 …[00:00:11.857,000] <inf> aws: PUBLISHED on topic "zephyr_sample/data" [ id: 2 qos: 0 ], payload: 1…
99 [00:00:11.857,000] <dbg> aws: publish_message: Published payload:
101 [00:01:11.755,000] <dbg> aws: mqtt_event_cb: MQTT event: 9 result: 0
102 [00:02:11.755,000] <dbg> aws: mqtt_event_cb: MQTT event: 9 result: 0