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: README.md
+83Lines changed: 83 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,89 @@ for more information on the troubleshooting
203
203
|9|CELLULAR NETWORK REGISTRATION STATUS MAX|
204
204
<p>Table 2. Network Registration Status </p>
205
205
206
+
## Device Controller
207
+
The Device Controller is an API that allows you to interact with devices integrated into the 1NCE API. You can use this API to send requests to devices, and the devices will respond accordingly. For more details you can visit our [DevHub](https://help.1nce.com/dev-hub/docs/1nce-os-device-controller)
208
+
### Sending a Request
209
+
To send a request to a specific device, you can use the following `curl` command:
Replace `<ICCID>` with the ICCID (International Mobile Subscriber Identity) of the target device and `<your Access Token>` with the authentication token from [Obtain Access Token](https://help.1nce.com/dev-hub/reference/postaccesstokenpost).
Replace `<ICCID>` with the ICCID (International Mobile Subscriber Identity) of the target device and `<your Access Token>` with the authentication token from [Obtain Access Token](https://help.1nce.com/dev-hub/reference/postaccesstokenpost).
242
+
243
+
##### Requested Parameters
244
+
*`payload`: The data you want to send to the device. This should be provided as a string.
245
+
*`payloadType`: The type of the payload. In this example, it is set to "STRING".
246
+
*`port`: The port number on which the device will receive the request. In the code, this is defined as NCE_RECV_PORT.
247
+
*`path`: The path of the request. It can include query parameters as well. In this example, it is set to "/example?param1=query_example1".
248
+
*`requestType`: The type of request, such as "POST", "GET", etc.
249
+
*`requestMode`: The mode of the request. In this example, it is set to "SEND_NOW". There are other possible value like SEND_WHEN_ACTIVE.
250
+
251
+
#### FreeRTOS Configuration
252
+
To handle the incoming request from the 1NCE API, the configuration of certain parameters needed
253
+
254
+
##### nce_demo_config.h
255
+
```
256
+
/* C2D Parameters */
257
+
#define NCE_RECV_PORT 3000
258
+
#define NCE_RECEIVE_BUFFER_SIZE 200
259
+
260
+
```
261
+
*`NCE_RECV_PORT`: This is the port number where your device will listen for incoming requests. It should match the port parameter used in the request.
262
+
*`NCE_RECEIVE_BUFFER_SIZE` : This is the size of the buffer that will be used to receive the incoming data from the 1NCE API.
263
+
264
+
#### FreeRTOS Output
265
+
266
+
##### COAP
267
+
268
+
When the FreeRTOS application receives a request from the 1NCE API, it will produce output similar to the following:
[ListeningTask] [INFO ][DEMO][8652] Listening on UDP port 3000...
286
+
[ListeningTask] [INFO ][DEMO][9520] Received 13 bytes:
287
+
enable_sensor
288
+
```
206
289
## Asking for Help
207
290
208
291
The most effective communication with our team is through GitHub. Simply create a [new issue](https://github.com/1NCE-GmbH/blueprint-freertos/issues/new/choose) and select from a range of templates covering bug reports, feature requests, documentation issue, or Gerneral Question.
0 commit comments