nRF Cloud multi-service - nRF Cloud connections fail with "MQTT input error: 128" and "Device not authenticated" errors

Hi,

After successful provisioning using "nRF Cloud Multi-service", I can view device on my nRF Cloud account. It shows successful MQTT and CoAP connections and GPS tracking. However, when attempting subsequent MQTT or CoAP connections, I get the errors below.

Connection to the LTE-M network is fine but attempts to connect to nRF Cloud throws "MQTT input error: 128" for MQTT and "Device not authenticated" error for CoAP.

I'm running nRF Connect SDK v2.9.0 and using the latest version of "nRF Cloud Multi-service".

Here are the MQTT and CoAP logs (IMEI masked out):

MQTT with no overlay option:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
*** Booting My Application v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Primary image: magic=bad, swap_type=0x1, copy_done=0x2, image_ok=0x2
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
[00:00:00.253,417] <inf> spi_nor: gd25wb256e3ir@0: 32 MiBy flash
*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
[00:00:00.261,138] <inf> main: nRF Cloud multi-service sample has started, version: 1.0.0, protocol: MQTT
[00:00:00.261,169] <inf> application: Reset reason: 0x10001
[00:00:00.261,322] <inf> cloud_connection: Enabling connectivity...
[00:00:00.593,627] <inf> cloud_connection: Setting up nRF Cloud library...
[00:00:00.599,090] <inf> nrf_cloud_info: Device ID: nrf-xxxxxxxxxxxxxxxx
[00:00:00.599,548] <inf> nrf_cloud_info: IMEI: xxxxxxxxxxxxxxxx
[00:00:00.599,945] <inf> nrf_cloud_info: Modem FW: mfw_nrf91x1_2.0.2
[00:00:00.600,006] <inf> nrf_cloud_info: Protocol: MQTT
[00:00:00.600,036] <inf> nrf_cloud_info: Download protocol: HTTPS
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


 

CoAP with "overlay_coap.conf":

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
uart:~$ *** Booting My Application v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Primary image: magic=bad, swap_type=0x1, copy_done=0x2, image_ok=0x2
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
[00:00:00.253,448] <inf> spi_nor: gd25wb256e3ir@0: 32 MiBy flash
*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
[00:00:00.261,596] <inf> main: nRF Cloud multi-service sample has started, version: 1.0.0, protocol: CoAP
[00:00:00.261,627] <inf> application: Reset reason: 0x10001
[00:00:00.261,810] <inf> cloud_connection: Enabling connectivity...
[00:00:00.594,421] <inf> cloud_connection: Setting up nRF Cloud library...
[00:00:00.597,808] <inf> nrf_cloud_info: Device ID: nrf-xxxxxxxxxxxxxxxx
[00:00:00.598,266] <inf> nrf_cloud_info: IMEI: xxxxxxxxxxxxxxxx
[00:00:00.683,685] <inf> nrf_cloud_info: UUID: 50333248-3037-4c3b-804e-0a104cb84456
[00:00:00.694,183] <inf> nrf_cloud_info: Modem FW: mfw_nrf91x1_2.0.2
[00:00:00.694,213] <inf> nrf_cloud_info: Protocol: CoAP
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I've tried using different sims and also NCS v2.8.0. So far, I've been unable to get successful nRF Cloud connections with MQTT or CoAP except when using the provisioning overlays.

It appears, there others who have run into the same or similar issues.

Regards,
Ravi