Hello, We are having an issue on our nrf9160 custom board and application where we receive an AWS IoT mqtt Disconnect while waiting for an PUBACK from AWS!!!
We are using V1.7.0 SDK. and modem firmware version 1.3.1. We are using a Soracom SIM card on our board. Note that this also occurs on a different board with Twilio SIM card.
Both boards are connected to the T-Mobile LTE-M network!!!!
Show below is status information that we received from the AWS IoT mqtt Subscribe client. When our nrf910 application tries to connect to AWS IoT, we immediately receive a disconnect and then a connect as shown below. The reason for the disconnect as shown below is DUPLICATE_CLIENT_ID. We have verified in AWS IoT that we do not have Duplicat Client IDs.
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0x10000
*** Booting Zephyr OS build v2.6.99-ncs1 ***
[00:00:00.267,364] <wrn> main: asset_tracker AWS V2 Started
*** Reason for reset 0x2
*** Global Watchdog reset
*** FW VERSION: V 1.27 Data Logger 11/29/24 (Bd 2.2)
*** GPS not available!
*** device_get_binding uart0 passed
*** device_get_binding uart2 passed
*** device_get_binding spi passed
*** device_get_binding i2c passed
*** device_get_binding pwm passed
*** device_get_binding adc passed
*** initialized leds, err code: 0
[00:00:00.317,199] <inf> spi_nrfx_spim: CS control inhibited (no GPIO device)
[00:00:00Nextion display - initialize display
.324,859] <wrn> gps_module: gnss_event_thread_fn
[00:00:00.336,547] <dbg> cloud_module.state_set: State: Unknown
[00:00:00.343,719] <dbg> cloud_module.sub_state_set: Sub state: SUB_STATE_CLOUD_DISCONNECTED
[00:00:00.353,607] <dbg> data_module.state_set: State: STATE_CLOUD_DISCONNECTED
[00:00:00.362,274] <dbg> sensor_module.state_set: State: STATE_INIT
[00:00:00.371,063] <dbg> cloud_module.state_set: State transition Unknown --> STATE_LTE_DISCONNECTED
[00:00:00.389,404] <dbg> aws_iot_integration.cloud_wrap_init: ******Read Flash Parameters
**************************************
[00:00:00.402,557] <dbg> aws_iot_integration.cloud_wrap_init: The Asset Tracker v2 has started
[00:00:00.411,895] <dbg> aws_iot_integration.cloud_wrap_init: Version: 0.0.0-development
[00:00:00.421,081] <dbg> aws_iot_integration.cloud_wrap_init: Client ID: 351358810503323
[00:00:00.430,053] <dbg> aws_iot_integration.cloud_wrap_init: Cloud: AWS IoT
[00:00:00.438,323] <dbg> aws_iot_integration.cloud_wrap_init: Endpoint: a2uy3w9dvx40gv-ats.iot.us-east-1.amazonaws.com
[00:00:00.449,920] <dbg> aws_iot_integration.cloud_wrap_init: ********************************************
Flash Parameters Size: 880
Key: 0x12345678
Time Zone: -5
Duty Cycle: 900 Seconds
SW1: False
SW2: False
GPIO09 Mode: Input
Low Power: Off
Mode_nPM Enable: False
Offset Am2315: 0.000 C
Offset Am2315 Humidity: 0.000 %
Offset MSP300 Pressure: 0.000 PSI
Offset RTD: 0.000 C
Offset EZORTD: -0.001 C
Offset Thermistor: 0.000 C
Silent: False
Sensor ID: 19E822
Sensor Name: PC_MapleShade_Private_Ref
Customer: Virtua
Location: A5 Primary Care VFC
Group: Primary_Care_Maple_Shade
Distributor: CirrusCon1
Client ID: 351358810503323
EDRX Parameter:
PSM Tau: 11000001
PSM AT: 00001010
JSON Packets Saved: 5
Next Saved JSON Packet Read: 0 0x0
Next Saved JSON Packet Write: 80 0x50
Global Alarms Enabled: True
Temperature Units: F
Temperature Alarm Check: 30 seconds
Temperature Alarms Valid: 60 seconds
Temperature Alarms
Sensor Low E Low A Low T Low V Low Time Low Valid
0 None E I 36.00 60
1 None D I 32.00 0
2 None D I 32.00 0
3 None D I 32.00 0
Sensor High E High A High T High V High Time High Valid
0 None E I 46.00 60
1 None D I 32.00 0
2 None D I 32.00 0
3 None D I 32.00 0
Humidity Alarms Check: 40 seconds
Humidity Alarms Valid: 90 seconds
Humidity Alarms
Sensor Low E Low A Low T Low V Low Time Low Valid
0 None D I 0.00 0
1 None D I 0.00 0
Sensor High E High A High T High V High Time High Valid
0 None D I 0.00 0
1 None D I 0.00 0
Pressure Alarms Check: 45 seconds
Pressure Alarms Valid: 90 seconds
Pressure Alarms
Sensor Low E Low A Low T Low V Low Time Low Valid
0 D I 0.00 0
Sensor High E High A High T High V High Time High Valid
0 D I 0.00 0
EZOEC Alarms Check: 65535 seconds
EZOEC Alarms Valid: 65535 seconds
EZOEC Alarms
Sensor Low E Low A Low T Low V Low Time Low Valid
0 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
1 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
2 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
3 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
4 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
5 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
Sensor High E High A High T High V High Time High Valid
0 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
1 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
2 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
3 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
4 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
5 None E A -0.01 -0.01 12/31/1969 23:59:59 65535
Power Alarm Check: 30 seconds
Power Alarm Valid: 60 seconds
Power Alarm
Sensor E A Time
0 D I
RTC date-time: -1/00/2000 00:00:00 (0 UTC)
Local date-time: 10/30/1999 00:00:00
Nextion display - initialize global alarm from flash
Nextion display - initialize buzzer
Nextion display - initialize battery status
Nextion display - initialize network status
Nextion display - initialize Date/Time
BMP280 Temperature/Barometric Pressure - Not Present
SCD30 Temperature/Humidity/CO2 - Not Present
SDP810 Temp/differential Pressure - Not Present
MSP300 Temp/Gauge Pressure - Not Present
MCP7940 RTC - Not Present
AM2315 temperature/Humidity - Not Present
AM2315C temperature/Humidity - Not Present
MCP9600_1 temperature - Not Present
MCP9600_2 temperature - Not Present
EZO_RTD Temperature - Not Present
EZO_EC Electrical Conductivity - Not Present
EZO_TDS Total Dissolved Solids - Not Present
EZO_S Salinity - Not Present
EZO_SG Specific Gravity - Not Present
EZO_O2 Oxygen - Not Present
W25Q64JV 64MB Flash Memory - Present
RTD Temperature - Not Present
MCP3425 Temperature - Present
Nextion display - initialize external power status
Enter Stopped CLI. if no key hit within 5 seconds will continue.
11/30/1999 00:00:00 cmd> cliIdleWait: 0 runFlag: 0
[00:00:14.334,075] <inf> event_manager: APP_EVT_START
[00:00:14.339,538] <wrn> gps_module: on_state_running_gps_idle
[00:00:14.346,679] <inf> watchdog: Watchdog timeout installed. Timeout: 60
[00:00:14.356,353] <inf> watchdog: Watchdog started
[00:00:14.361,694] <inf> watchdog: Watchdog feed enabled. Timeout: 30
[00:00:14.371,002] <dbg> data_module.config_print_all: Device mode: Active
[00:00:14.380,615] <dbg> data_module.config_print_all: Active wait timeout: 120
[00:00:14.390,747] <dbg> data_module.config_print_all: Movement resolution: 120
[00:00:14.398,529] <dbg> data_module.config_print_all: Movement timeout: 3600
[00:00:14.408,477] <dbg> data_module.config_print_all: GPS timeout: 360
[00:00:14.417,602] <dbg> data_module.config_print_all: Accelerometer threshold: 10.000000
[00:00:14.426,330] <dbg> data_module.config_print_all: Requesting of neighbor cell data is enabled
[00:00:14.435,791] <dbg> data_module.config_print_all: Requesting of GNSS data is enabled
[00:00:14.444,519] <inf> event_manager: DATA_EVT_CONFIG_INIT
[00:00:14.451,049] <inf> main: Device mode: Active
[00:00:14.456,207] <inf> main: Start data sample timer: 900 seconds interval
[00:00:14.463,867] <inf> event_manager: APP_EVT_ACTIVITY_DETECTION_DISABLE
[00:00:14.471,649] <dbg> main.state_set: State transition STATE_INIT --> STATE_RUNNING
[00:00:14.482,391] <dbg> main.sub_state_set: Sub state: SUB_STATE_ACTIVE_MODE
[00:00:14.492,462] <dbg> sensor_module.state_set: State transition STATE_INIT --> STATE_RUNNING
[00:00:14.549,621] <inf> event_manager: MODEM_EVT_LTE_CONNECTING
%CESQ: 41,2,18,2
+CEREG: 2,"56E4","02155305",7
[00:00:16.049,743] <inf> event_manager: MODEM_EVT_LTE_DISCONNECTED
[00:00:16.056,945] <inf> event_manager: MODEM_EVT_LTE_CELL_UPDATE
+CSCON: 1
+CSCON: 0
+CSCON: 1
+CEREG: 5,"56E4","02155305",7,,,"11100000","11100000"
[00:00:38.174,682] <inf> event_manager: MODEM_EVT_LTE_CONNECTED
[00:00:38.181,610] <inf> event_manager: MODEM_EVT_LTE_PSM_UPDATE
[00:00:38.188,781] <dbg> cloud_module.state_set: State transition STATE_LTE_DISCONNECTED --> STATE_LTE_CONNECTED
[00:00:38.199,432] <dbg> cloud_module.connect_cloud: Connecting to cloud
[00:00:38.206,604] <wrn> cloud_module: Cloud connection establishment in progress
[00:00:38.214,843] <wrn> cloud_module: New connection attempt in 32 seconds if not successful
[00:00:38.224,212] <dbg> aws_iot_integration.aws_iot_event_handler: AWS_IOT_EVT_CONNECTING
[00:00:38.235,321] <dbg> cloud_module.cloud_wrap_event_handler: CLOUD_WRAP_EVT_CONNECTING
[00:00:38.299,652] <inf> event_manager: CLOUD_EVT_CONNECTING
[00:00:38.621,856] <dbg> aws_iot.broker_init: IPv4 Address found 34.192.240.81
[00:00:41.087,982] <inf> jfet_module: Temp Alarm Check 0 Low Valid: 60 High Valid: 60
[00:00:41.096,252] <inf> jfet_module: Power Alarm Check 0 Valid: 0
+CSCON: 0
+CSCON: 1
[00:00:50.067,504] <inf> jfet_module: Humidity Alarm Check 0 Low Valid: 0 High Valid: 0
[00:00:54.410,552] <inf> jfet_module: Pressure Alarm Check 0 Low Valid: 0 High Valid: 0
[00:01:11.088,043] <inf> jfet_module: Temp Alarm Check 0 Low Valid: 60 High Valid: 60
[00:01:11.096,313] <inf> jfet_module: Power Alarm Check 0 Valid: 0
[00:01:11.176,727] <dbg> cloud_module.connect_check_work_fn: Cloud connection timeout occurred
[00:01:11.185,852] <inf> event_manager: CLOUD_EVT_CONNECTION_TIMEOUT
[00:01:11.193,054] <dbg> cloud_module.connect_cloud: Connecting to cloud
[00:01:11.200,195] <dbg> aws_iot.connection_poll_start: Connection poll in progress
[00:01:11.208,374] <wrn> aws_iot: connection_poll_start failed, error: -119
[00:01:11.216,125] <err> aws_iot_integration: aws_iot_connect, error: -119
[00:01:11.223,693] <err> cloud_module: cloud_connect failed, error: -119
[00:01:11.233,520] <wrn> cloud_module: Cloud connection establishment in progress
[00:01:11.243,896] <wrn> cloud_module: New connection attempt in 64 seconds if not successful
+CSCON: 0
+CSCON: 1
+CSCON: 0
+CSCON: 1
[00:01:30.067,382] <inf> jfet_module: Humidity Alarm Check 0 Low Valid: 0 High Valid: 0
+CSCON: 0
+CSCON: 1
+CSCON: 0
[00:01:41.087,982] <inf> jfet_module: Temp Alarm Check 0 Low Valid: 60 High Valid: 60
[00:01:41.207,153] <inf> jfet_module: Pressure Alarm Check 0 Low Valid: 0 High Valid: 0
[00:01:41.215,606] <inf> jfet_module: Power Alarm Check 0 Valid: 0
+CSCON: 1
%CESQ: 36,1,18,2
+CSCON: 0