- My goal is:
Refresh JWT with Mongoose OS before timeout without disconnecting to IoT Core.
- My actions are:
Using MOS GCP Lib to connect to IoT Core.
- The result I see is:
MOS console:
mgos_gcp.c:86 Dropping MQTT connection due to imminent token expiration
On IoT Core I get this error with every timeout:
IoT Core logs:
jsonPayload: {
disconnectType: "SERVER"
eventType: "DISCONNECT"
protocol: "MQTT"
resourceName: "projects/..."
serviceName: "cloudiot.googleapis.com"
status: {
code: 9
description: "FAILED_PRECONDITION"
message: "The connection broke or was closed by the client."
}
}
- My expectation & question is:
The device should stay connected to IoT Core. The disconnection results in a loss of data if, for example, data is to be sent via commands. Is it possible to refresh the token without a disconnect?