summaryrefslogtreecommitdiff
path: root/prilohy/nrfdemo_source/README.rst
diff options
context:
space:
mode:
authorMichal Hanus <mikehanus@protonmail.com>2025-06-02 09:46:16 +0200
committerMichal Hanus <mikehanus@protonmail.com>2025-06-02 09:46:16 +0200
commitb3b9164352b1fc276f0c1388be5e6c44f16906f2 (patch)
treecd6d0a4f98264c68083a54caefe288dd7ea91a58 /prilohy/nrfdemo_source/README.rst
parent2634e6fdfd5ef87311deeff3709eaa76610888f8 (diff)
final1
Diffstat (limited to 'prilohy/nrfdemo_source/README.rst')
-rw-r--r--prilohy/nrfdemo_source/README.rst68
1 files changed, 68 insertions, 0 deletions
diff --git a/prilohy/nrfdemo_source/README.rst b/prilohy/nrfdemo_source/README.rst
new file mode 100644
index 0000000..a76ecd4
--- /dev/null
+++ b/prilohy/nrfdemo_source/README.rst
@@ -0,0 +1,68 @@
+
+MQTT: Read and control device over MQTT Protocol
+####################################################################################
+
+Description
+***********
+
+This sample application shows how to use the MQTT protocol and library to connect to an MQTT
+broker and send data back and forth to another MQTT client to remotely control
+the LEDs and monitor the status of buttons on your Stratus board.
+
+When button 1/ Mode button is pressed on the board, the message “Hello from Conexio Stratus DK” is
+published to `CONFIG_MQTT_PUB_TOPIC`, and any client subscribed to this topic will receive this message.
+
+On the other hand, when the `LEDON` message is sent from another client to the `CONFIG_MQTT_SUB_TOPIC`
+topic, the Blue LED on the board is turned ON. When the `LEDOFF` message is sent from another client to the
+`CONFIG_MQTT_SUB_TOPIC`` topic, the LED is turned OFF.
+
+
+Building and Running
+********************
+
+For the Stratus Pro nrf9151/nRF9161 device, the west build command is:
+
+ west build -b conexio_stratus_pro/nrf9161/ns -- -DBOARD_ROOT=/opt/nordic/ncs/v2.7.0/conexio-firmware-sdk
+
+For the Stratus nRF9160 device, the build command is:
+
+ west build -b conexio_stratus/nrf9160/ns -- -DBOARD_ROOT=/opt/nordic/ncs/v2.7.0/conexio-firmware-sdk
+
+Flash the compiled firmware using `newtmgr` to the Stratus DK
+
+ newtmgr -c serial image upload build/zephyr/app_update.bin
+
+
+Sample Output
+=============
+
+.. code-block:: console
+
+ *** Booting nRF Connect SDK v3.5.99-ncs1 ***
+ [00:00:00.250,854] <inf> MQTT: Starting MQTT sample on conexio_stratus_pro
+ [00:00:00.250,885] <inf> MQTT: Initializing modem library
+ [00:00:00.488,494] <inf> MQTT: Connecting to LTE network
+ [00:01:09.398,864] <inf> MQTT: RRC mode: Connected
+ [00:01:11.441,558] <inf> MQTT: Network registration status: Connected - roaming
+ [00:01:11.441,711] <inf> MQTT: Connected to LTE network
+ [00:01:11.696,868] <inf> MQTT: IPv4 Address found 91.121.93.94
+ [00:01:12.195,983] <inf> MQTT: MQTT client connected
+ [00:01:12.196,014] <inf> MQTT: Subscribing to: stratus/sub/topic len 17
+ [00:01:12.509,826] <inf> MQTT: SUBACK packet id: 1234
+ [00:01:16.851,287] <inf> MQTT: RRC mode: Idle
+ [00:01:52.350,280] <inf> MQTT: RRC mode: Connected
+ [00:01:52.467,407] <inf> MQTT: MQTT PUBLISH result=0 len=6
+ [00:01:52.467,895] <inf> MQTT: Received: LEDOFF
+ [00:01:56.277,648] <inf> MQTT: RRC mode: Idle
+ [00:02:01.310,577] <inf> MQTT: RRC mode: Connected
+ [00:02:01.426,727] <inf> MQTT: MQTT PUBLISH result=0 len=5
+ [00:02:01.427,185] <inf> MQTT: Received: LEDON
+ [00:02:05.244,934] <inf> MQTT: RRC mode: Idle
+ [00:02:12.820,953] <inf> MQTT: RRC mode: Connected
+ [00:02:12.947,113] <inf> MQTT: MQTT PUBLISH result=0 len=6
+ [00:02:12.947,570] <inf> MQTT: Received: LEDOFF
+ [00:02:16.627,197] <inf> MQTT: RRC mode: Idle
+
+Credit
+===============
+Nordic Semiconductor \ No newline at end of file