zephyr/samples/net/cloud/google_iot_mqtt
Torsten Rasmussen 407b49b35c cmake: use find_package to locate Zephyr
Using find_package to locate Zephyr.

Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.

Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.

It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
..
src
CMakeLists.txt cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
Kconfig
README.rst
prj.conf
sample.yaml

README.rst

.. _google-iot-mqtt-sample:

Google IOT MQTT Sample
######################

Overview
********

This sample application demonstrates a "full stack" application.  This
currently is able to

- Acquire a DHCPv4 lease.
- Connect to an SNTP server and acquire current time
- Establish a TLS connection with the Google IOT Cloud servers
- Publish data to the Google IOT Cloud
- Send/Receive keep alive / pings from cloud server

The source code for this sample application can be found at:
:zephyr_file:`samples/net/cloud/google_iot_mqtt`.

Requirements
************
- Entropy source
- Google IOT Cloud account
- Google IOT Cloud credentials and required information
- Network connectivity

Building and Running
********************
This application has been built and tested on the NXP FRDMK64F.  RSA or
ECDSA certs/keys are required to authenticate to the Google IOT Cloud.
The application includes a key creation script.

Run the ``create_keys.py`` script in the
``samples/net/cloud/google_iot_mqtt/src/private_info/`` directory.

Users will also be required to configure the following Kconfig options
based on their Google Cloud IOT project:

- CLOUD_CLIENT_ID - created from <telemetry>/<region>/registries/<registry name>/devices/<device name>
- CLOUD_AUDIENCE - created from telemetry without projects on front
- CLOUD_SUBSCRIBE_CONFIG - created from /devices/<device name>/config
- CLOUD_PUBLISH_TOPIC - created from /devices/<device name>/state

See `Google Cloud MQTT Documentation
<https://cloud.google.com/iot/docs/how-tos/mqtt-bridge>`_.