Offline commands worked for Azure-IoT-Hub-Tester, but not my device. I am developing device that connects to IoT Central on Mqtt protocol. I want to use the Offline command and follow the instruction on https://learn.microsoft.com/en-us/azure/iot-central/core/howto-use-commands. When I connect to the server using Azure-IoT-Hub-Tester, offline command seem to be working. The command that executed on the IoT Central while device is disconnected is received by the Azure-IoT-Hub-Tester. However, when I connect my device to the server, offline command never comes. My device receives the commands correctly when it is connected to the server. But when command is executed while device is disconnected, the command is missing when the device connects. To make sure that the server never sent the command I even find a way to log the TLS communication between device and server. Anyone had similar experience?
So, I figured it out. In order for Offline command to work, have to set "clean start" bit to 0 in the MQTT CONNECT Packet. It need to be a persistent-session.