This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF: GCP IoT MQTT implementation no longer receiving messages?

Part Number: CC3220SF

We have been developing, testing, and running a CC3220SF project that connects to a GCP (Google Cloud Platform) IoT instance, using SimpleLink SDK v2.40.02 and MQTT.  This project has been working for several months; we ran a test of the GCP IoT functionality last Friday (2019-05-31) successfully.  However, as of this past Tuesday (2019-06-04), we have found that while the MQTT client connects successfully (callback indicates CONNACK), subscribes to a topic successfully, and publishes to a different topic successfully (GCP IoT logs show successful publish), no messages are ever received on the subscribed topic, despite manual updates published to the config topic through the GCP control panel.

We've run a couple of additional tests to try to determine what's going on.  We've tried connecting the CC3220 to a freshly-made GCP IoT test instance using new credentials, but we get the same results (no messages received).  We've used the PC based Mosquitto client to connect to the same test instance, and Mosquitto receives published messages OK.  We've also pointed the CC3220 at a different MQTT server, and it receives messages fine.

In short, when using the CC3220 to connect to GCP IoT via MQTT, something changed in the last few days such that messages are no longer received.  We've also tried reverting back to previous firmware revisions which were known to be functioning with GCP IoT, and those versions no longer receive published messages, either.

So... has anyone else noticed any problems in the last few days when receiving published messages from a GCP IoT MQTT instance?  Is there anything specifically I should be looking at to get to the bottom of this?  Thanks.

  • Hi there,

    Did the device connect to the server? Was the failure at the MQTT protocol level?

    -Aaron

  • Well, I did manage to get to the (seeming?) bottom of what was going on.  I created a fresh copy of the "mqtt_client" SDK example and got it connected to the Mosquitto dot org test server, and later, a GCP IoT test instance, demonstrating subscription and message reception with each of them.  Thus, there was no fundamental inability to get a CC3220 connected to GCP.  Clearly, whatever was preventing my app from receiving messages from GCP IoT was in my app, not in the CC3220 itself.

    So I took my app and changed out the security credentials to point to my GCP IoT test instance rather than the production server.  I then brought up the GCP debug log for MQTT traffic for the node.  I could see from the logs that the CC3220 was connecting, publishing a couple of messages, then unsubscribing and disconnecting.  But the subscriptions were not appearing in the log, and the unsubscriptions were flagged as errors in the log because the subscriptions did not exist.

    So for giggles, I changed the QOS of the subscriptions from 2 to 1.  Suddenly, everything started working... GCP was now logging the subscription commands, and the CC3220 was getting the published config messages.  So apparently GCP IoT is not fond of MQTT QOS 2 subscriptions anymore.  I say "anymore", because as of 10 days ago, the original app was working.

    So this does not appear to be an issue anymore, and in the future, use QOS 1 for GCP IoT topic subscriptions, I suppose.