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
Copy file name to clipboardExpand all lines: doc/nrf/external_comp/nrf_cloud.rst
+13-30Lines changed: 13 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,6 @@ You can use the services offered by nRF Cloud in the following scenarios:
38
38
39
39
The website or application interacts with the `nRF Cloud REST API`_ to display device data and manage it in a customized way.
40
40
41
-
* Device connected to nRF Cloud over REST.
42
-
43
-
The device uses the services by interacting with the `nRF Cloud REST API`_.
44
-
45
41
* Device connected to a customer cloud service in a suitable manner.
46
42
47
43
The services can be used from the customer cloud service that communicates over REST to interact with the `nRF Cloud REST API`_ in a proxy configuration.
@@ -94,7 +90,7 @@ Before running the script, you must install and run firmware on the device that
94
90
95
91
If the device already contains certificates, delete the old certificates from the device by adding the ``--delete`` option.
96
92
97
-
Choosing a protocol: CoAP, MQTT or REST
93
+
Choosing a protocol: CoAP and MQTT
98
94
***************************************
99
95
100
96
When choosing a protocol, consider the following:
@@ -105,11 +101,9 @@ When choosing a protocol, consider the following:
105
101
* What are the network data usage requirements for the device?
106
102
* What are the carrier's network settings (NAT timeout, eDRX/PSM) and how will the settings affect device behavior?
107
103
108
-
MQTT has a higher (data/power) cost to set up a connection than CoAP or REST.
109
-
However, the data size of an MQTT publish event is smaller than a comparable REST transaction.
110
-
The data size of a CoAP transfer can be the smallest of all.
104
+
MQTT has a higher (data/power) cost to set up a connection than CoAP.
105
+
The data size of a CoAP transfer is smaller than MQTT.
111
106
MQTT may be preferred if a device is able to maintain a connection to the broker and sends/receives data frequently.
112
-
REST may be preferred if a device sends data infrequently or does not need to receive unsolicited data from the cloud.
113
107
CoAP may be preferred if a device sends data infrequently, does not need to receive unsolicited data from the cloud, and must use the least amount of cellular data and the least amount of power.
114
108
115
109
CoAP overview
@@ -121,15 +115,6 @@ CoAP overview
121
115
The JWT is approximately 450 bytes.
122
116
* Each CoAP transaction contains a CoAP header and API-specific payload.
123
117
124
-
REST overview
125
-
=============
126
-
127
-
* The device initiates a TLS connection to nRF Cloud.
128
-
* nRF Cloud supports a connection keep-alive/idle time of 60 seconds for REST API sockets.
129
-
* For authentication, the device must send a JSON Web Token (JWT) with each REST transaction.
130
-
The JWT is approximately 450 bytes, but can be larger depending on the claims.
131
-
* Each REST transaction contains HTTP headers, including the JWT, and any API specific payload.
132
-
133
118
MQTT overview
134
119
=============
135
120
@@ -142,7 +127,7 @@ MQTT overview
142
127
Security
143
128
********
144
129
145
-
A device can successfully connect to `nRF Cloud`_ using CoAP or REST if the following requirements are met:
130
+
A device can successfully connect to `nRF Cloud`_ using CoAP if the following requirements are met:
146
131
147
132
* The device contains a correct x509 CA certificate, and private key.
148
133
* The public key derived from the private key is registered with an nRF Cloud account.
@@ -177,7 +162,7 @@ A device can successfully connect to `nRF Cloud`_ using MQTT if the following re
177
162
178
163
* Preconnect provisioning
179
164
180
-
This is supported by CoAP, MQTT, and REST connections.
165
+
This is supported by CoAPand MQTT connections.
181
166
182
167
1. Run the `device_credentials_installer.py`_ Python script to create and install credentials on the device:
183
168
@@ -197,7 +182,7 @@ A device can successfully connect to `nRF Cloud`_ using MQTT if the following re
197
182
|NCS| library support
198
183
*********************
199
184
200
-
The |NCS| provides the :ref:`lib_nrf_cloud` library, which if enabled, allows you to connect your devices to nRF Cloud and use the update, location, and connectivity services using MQTT or REST.
185
+
The |NCS| provides the :ref:`lib_nrf_cloud` library, which if enabled, allows you to connect your devices to nRF Cloud and use the update, location, and connectivity services using MQTT or CoAP.
201
186
202
187
For more information on the various services, see the following documentation:
203
188
@@ -213,21 +198,19 @@ Applications and samples
213
198
214
199
The following sample demonstrates nRF Cloud-specific functionality using CoAP:
215
200
216
-
* :ref:`nrf_cloud_multi_service`
217
-
* :ref:`modem_shell_application`
201
+
* :ref:`nrf_cloud_coap_device_message`
202
+
* :ref:`nrf_cloud_coap_cell_location`
203
+
* :ref:`nrf_cloud_coap_fota_sample`
218
204
219
205
The following sample demonstrates nRF Cloud-specific functionality using MQTT:
220
206
221
-
* :ref:`nrf_cloud_multi_service`
222
-
223
-
The following samples demonstrate nRF Cloud-specific functionality using REST:
224
-
225
-
* :ref:`nrf_cloud_rest_fota`
226
-
* :ref:`nrf_cloud_rest_device_message`
227
-
* :ref:`nrf_cloud_rest_cell_location`
207
+
* :ref:`nrf_cloud_mqtt_device_message`
208
+
* :ref:`nrf_cloud_mqtt_cell_location`
209
+
* :ref:`nrf_cloud_mqtt_fota`
228
210
229
211
Other related samples and applications that use nRF Cloud services:
Copy file name to clipboardExpand all lines: doc/nrf/libraries/modem/location.rst
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,7 @@ The supported location methods are as follows:
36
36
* A-GNSS and P-GPS are managed with :ref:`lib_nrf_cloud_agnss` and :ref:`lib_nrf_cloud_pgps`.
37
37
* The application may also use some other source for the data and use :c:func:`location_agnss_data_process` and :c:func:`location_pgps_data_process` to pass the data to the Location library.
38
38
* The data format of A-GNSS or P-GPS must be as received from :ref:`lib_nrf_cloud_agnss`.
39
-
* The data transport method for :ref:`lib_nrf_cloud_agnss` and :ref:`lib_nrf_cloud_pgps` can be configured to be either MQTT (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) or REST (:kconfig:option:`CONFIG_NRF_CLOUD_REST`).
40
-
If different transport is desired for different location methods, (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) and (:kconfig:option:`CONFIG_NRF_CLOUD_REST`) can be enabled simultaneously. In such a case, MQTT takes
41
-
precedence as the transport method of GNSS assistance data.
39
+
* You can configure the data transport method for :ref:`lib_nrf_cloud_agnss` and :ref:`lib_nrf_cloud_pgps` to be either MQTT (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) or CoAP (:kconfig:option:`CONFIG_NRF_CLOUD_COAP`).
42
40
* Note that acquiring GNSS fix only starts when LTE connection, more specifically Radio Resource Control (RRC) connection, is idle.
43
41
Also, if A-GNSS is not used and Power Saving Mode (PSM) is enabled, the Location library will wait for the modem to enter PSM.
44
42
* Selectable location accuracy (low/normal/high).
@@ -76,7 +74,7 @@ Here are details related to the services handling cell information for cellular
76
74
77
75
* Services can be handled by the application by enabling the :kconfig:option:`CONFIG_LOCATION_SERVICE_EXTERNAL` Kconfig option, in which case rest of the service configurations are ignored.
78
76
* The service is selected in the :c:struct:`location_method_config` structure when requesting for location.
79
-
* You can configure the data transport method for the `nRF Cloud Location Services <nRF Cloud Location Services documentation_>`_ to either MQTT (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) or REST (:kconfig:option:`CONFIG_NRF_CLOUD_REST`).
77
+
* You can configure the data transport method for the `nRF Cloud Location Services <nRF Cloud Location Services documentation_>`_ to either MQTT (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) or CoAP (:kconfig:option:`CONFIG_NRF_CLOUD_COAP`).
80
78
81
79
Diagrams
82
80
========
@@ -192,7 +190,7 @@ nRF Cloud certificates
192
190
======================
193
191
194
192
When using nRF Cloud for any location data, you must have the certificate provisioned.
195
-
An nRF91 Series DK comes pre-provisioned with certificates for nRF Cloud.
193
+
To provision and onboard your device, install `nRF Cloud Utils`_ and follow the instructions in the README.
196
194
197
195
Location service accounts
198
196
=========================
@@ -269,7 +267,7 @@ Configuring the obstructed visibility detection is always a tradeoff between pow
269
267
270
268
To enable the transport method, set the :kconfig:option:`CONFIG_NRF_CLOUD` Kconfig option and select one of the following options:
271
269
272
-
* :kconfig:option:`CONFIG_NRF_CLOUD_REST` - Uses REST APIs to communicate with `nRF Cloud`_ if :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` is not set.
270
+
* :kconfig:option:`CONFIG_NRF_CLOUD_COAP` - Uses CoAP transport to communicate with `nRF Cloud`_.
273
271
* :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` - Uses MQTT transport to communicate with `nRF Cloud`_.
274
272
275
273
Both cellular and Wi-Fi location services are handled externally by the application or selected using the runtime configuration, in which case you must first configure the available services.
@@ -384,7 +382,7 @@ This library uses the following |NCS| libraries:
Copy file name to clipboardExpand all lines: doc/nrf/libraries/networking/nrf_cloud_agnss.rst
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Configuration
31
31
To enable this library, set the :kconfig:option:`CONFIG_NRF_CLOUD` Kconfig option and configure the following options:
32
32
33
33
* :kconfig:option:`CONFIG_NRF_CLOUD_AGNSS`
34
-
* :kconfig:option:`CONFIG_NRF_CLOUD_MQTT`, :kconfig:option:`CONFIG_NRF_CLOUD_REST`, or :kconfig:option:`CONFIG_NRF_CLOUD_COAP`
34
+
* :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` or :kconfig:option:`CONFIG_NRF_CLOUD_COAP`
35
35
36
36
See :ref:`configure_application` for information on how to change configuration options.
37
37
@@ -45,8 +45,6 @@ A-GNSS data can be requested using one of the following methods:
45
45
46
46
If :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` is enabled, the :c:func:`nrf_cloud_agnss_request` function is used to request by type, and the :c:func:`nrf_cloud_agnss_request_all` function is used to return all available assistance data.
47
47
48
-
If :kconfig:option:`CONFIG_NRF_CLOUD_REST` is enabled, the :c:func:`nrf_cloud_rest_agnss_data_get` function is used to request A-GNSS data.
49
-
50
48
If :kconfig:option:`CONFIG_NRF_CLOUD_COAP` is enabled, the :c:func:`nrf_cloud_coap_agnss_data_get` function is used to request A-GNSS data.
51
49
52
50
When nRF Cloud responds with the requested A-GNSS data, the :c:func:`nrf_cloud_agnss_process` function processes the received data.
Copy file name to clipboardExpand all lines: doc/nrf/libraries/networking/nrf_cloud_log.rst
+6-15Lines changed: 6 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,8 @@ The logging backend can either use JSON encoding or `Dictionary-based Logging`_
16
16
Overview
17
17
********
18
18
19
-
This library provides an API for REST-, MQTT-, or CoAP-based applications to send logs to nRF Cloud.
19
+
This library provides an API for MQTT- or CoAP-based applications to send logs to nRF Cloud.
20
20
For MQTT- and CoAP-based applications, you can enable or disable logging as well as change the logging level remotely using the nRF Cloud portal or `nRF Cloud Patch Device State`_ REST API.
21
-
For REST-based applications, the enabled state and logging level can be controlled at compile time or at run time on the device, but not from the cloud.
22
21
23
22
Each JSON log message contains the following elements:
24
23
@@ -55,7 +54,7 @@ The sequence number is set to a monotonically-increasing value that resets to ``
55
54
Supported backends
56
55
==================
57
56
58
-
When so configured, this library includes a Zephyr logging backend that can transport log messages to nRF Cloud using REST, MQTT, or CoAP.
57
+
When so configured, this library includes a Zephyr logging backend that can transport log messages to nRF Cloud using MQTT or CoAP.
59
58
The logging backend can also use either JSON messages or dictionary-based compact binary messages.
60
59
61
60
Multiple JSON log messages are sent together as a JSON array to the `d2c/bulk device message topic <nRF Cloud MQTT Topics_>`_.
@@ -70,7 +69,6 @@ Requirements
70
69
************
71
70
72
71
The device must be connected to nRF Cloud before calling the :c:func:`nrf_cloud_log_send` function.
73
-
The :c:func:`nrf_cloud_rest_log_send` function initiates the connection as needed.
74
72
75
73
Configuration
76
74
*************
@@ -82,7 +80,7 @@ To enable direct log messages or the logging backend, set the :kconfig:option:`C
82
80
83
81
If only the first is enabled:
84
82
85
-
* Calls to the direct log message functions:c:func:`nrf_cloud_log_send` and :c:func:`nrf_cloud_rest_log_send` send messages direct to nRF Cloud immediately.
83
+
* Calls to the direct log message function:c:func:`nrf_cloud_log_send` send messages direct to nRF Cloud immediately.
86
84
* The cloud logging backend is not available, and consequently, no Zephyr log messages are transmitted to the cloud.
87
85
88
86
If only the second is enabled:
@@ -95,7 +93,6 @@ If both options are enabled, calls to the direct log message functions are passe
95
93
Configure one of the following Kconfig options to select the data transport method:
96
94
97
95
* :kconfig:option:`CONFIG_NRF_CLOUD_MQTT`
98
-
* :kconfig:option:`CONFIG_NRF_CLOUD_REST`
99
96
* :kconfig:option:`CONFIG_NRF_CLOUD_COAP`
100
97
101
98
Configure the message encoding:
@@ -141,29 +138,23 @@ Usage
141
138
To use this library, complete the following steps:
142
139
143
140
1. Include the :file:`nrf_cloud_log.h` file.
144
-
#. If the :kconfig:option:`CONFIG_NRF_CLOUD_LOG_DIRECT` Kconfig option is enabled, call the :c:func:`nrf_cloud_log_send` function when connected to nRF Cloud using MQTT or CoAP, or call :c:func:`nrf_cloud_rest_log_send` when using REST.
141
+
#. If the :kconfig:option:`CONFIG_NRF_CLOUD_LOG_DIRECT` Kconfig option is enabled, call the :c:func:`nrf_cloud_log_send` function when connected to nRF Cloud using MQTT or CoAP.
145
142
#. If the :kconfig:option:`CONFIG_NRF_CLOUD_LOG_BACKEND` option is enabled, use the normal Zephyr logging macros :c:macro:`LOG_ERR`, :c:macro:`LOG_WRN`, :c:macro:`LOG_INF`, or :c:macro:`LOG_DBG`, as well as the ``_HEXDUMP_ forms``.
146
143
147
144
Samples using the library
148
145
*************************
149
146
150
147
The following |NCS| samples use this library:
151
148
152
-
* :ref:`nrf_cloud_multi_service`
153
-
* :ref:`nrf_cloud_rest_device_message`
154
-
155
-
Limitations
156
-
***********
157
-
158
-
For REST-based applications, you can disable or set a log level for logs only at compile time.
0 commit comments