- Home
- Symmetry Blog
- How to connect nRF9160 DK to Google Cloud
From Nordic: How to connect nRF9160 DK to Google Cloud
About Symmetry Electronics
Established in 1998, Symmetry Electronics, a Division of Braemac, is a global distributor of electronic components and systems. Combining premier components and comprehensive value-added services with an expert in-house engineering team, Symmetry supports engineers in the design, development, and deployment of a broad range of connected technologies.
Exponential Technology Group Member
Acquired by Berkshire Hathaway company TTI, Inc. in 2017, Symmetry Electronics is a proud Exponential Technology Group (XTG) member. A collection of specialty semiconductor distributors and engineering design firms, XTG stands alongside industry leaders TTI Inc., Mouser Electronics, and Sager Electronics. Together, we provide a united global supply chain solution with the shared mission of simplifying engineering, offering affordable technologies, and assisting engineers in accelerating time to market. For more information about XTG, visit www.xponentialgroup.com.
This blog post covers how to connect to Google Cloud with an nRF9160 DK. The nRF9160 DK is using MQTT protocol to communicate with Google Cloud IoT Core, a service that connects to and manages IoT Devices. The project code is attached at the end of this post.
We used the Cloud IoT Core to get data from the nRF9160 DK into Pub/Sub, which is Google Cloud’s internal messaging service that allows us to send and receive messages from and to IoT devices. From here we used Cloud Functions as a functionality to react on, among other things, Pub/Sub events or HTTP triggers.
nRF9160 DK
In order to set up the development environment, follow the Getting Started Assistant in nRF Connect for Desktop. This is a guide on how to install the required tools for this project. In addition, it is recommended to read this tutorial about using the nRF Connect SDK to create an application. This also explains how to build and flash the application.
gcloud library
We have developed our own library for interfacing with Cloud IoT Core. It handles most necessary tasks; like provisioning of keys, connection, publishing and receiving. Description for the individual functions are found in the header file. Note that the library runs an infinite while loop polling on data from the cloud, this can interfere with other operations on the sockets.
Source: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-connect-nrf91-to-google-cloud