Abstract:
This document explains how to troubleshoot a Google Cloud connection, as an extension of the Crimson Cloud Connectors: Google Tech Note.
Products:
CR3000 HMIs / Data Acquisition (DA10 & DA30) / Graphite® HMI / Graphite Controllers
Use Case: Google Cloud Connector
Troubleshooting and verifying tag data transfer to Google's Cloud Platform.
Required Software:
Crimson 3.1
Required Firmware:
Build 3106.000 or higher
Tools to Use
- Debug Console as described at the beginning of the Crimson 3.1: Debugging Output Tech Note. The web option will be used throughout this document.
- Packet Capture as described in the Crimson 3.1: Packet Capture Tech Note. Using the SSL Data option, the unit will save an unencrypted version of the traffic.
Debug Console
- Figure 1 shows a bad connection to the cloud, in this case, the Project name is incorrect. The output is similar if any of the Identification settings in Crimson or if the Public Key configured in the cloud are incorrect.
Figure 1.
- Figure 2 shows a good connection to the cloud device.
Figure 2.
Below is a dissected version of the transmission:
Crimson 3.1 Debug Console
Time is 09/18/19 10:38:36
Cert is mqtt.googleapis.com with alert of 48 certifcate failure, the database Certificate Source is set to Do Not Provide
Cert passed as errors ignored Server Certificate is set to ignore, so the transfer will continue
mqtt: connect
mqtt: send:
.....MQTT.....X
projects/zinc-transit-249712/locations/us-central1/registries/registry/devices/device-01/devices/device-01/events cloud device that data is being sent to.
{"connected":"false"} Red Lion not previously connected
mqtt: recv:
23F83130 : 0000 : 20 02 00 00
mqtt: going online
mqtt: send:
/devices/device-01/events{ cloud device data is being sent to
"connected":"true", Red Lion device is connected
"device":{ the following data is the device information
"cellular":{"valid":"false"}, no cellular connection
"location":{"valid":"false"}, no location information
"status":"okay" Red Lion device status
},
"timestamp":"2019-09-18T13:38:37.600Z" timestamp of data transfer
}
mqtt: recv:
23F83130 : 0000 : 40 02 00 02
mqtt: send:
/devices/device-01/events..{ cloud device data is being sent to
"connected":"true", Red Lion device is connected
"tags":{ the following data is tag values
"Tag1":12, Tag1 (numeric) is twelve
"Tag2":"12" Tag2 (string) is "12"
},
"timestamp":"2019-09-18T13:38:58.000Z" timestamp of data transfer
}
mqtt: recv:
23F83130 : 0000 : 40 02 00 03
Packet Capture
You can use the SSL packet capture to see the contents of the packets and check them in WireShark. The TLS capture records that unencrypted data, so it’s useful for debugging encrypted links.
Select TLS as the interface and the port configured on the Network tab of the connector, port 8883 as shown in Figure 3, then start the capture.
Figure 3.
After stopping the capture and downloading the file, open it in Wireshark. You will see the unencrypted data transfer, as shown in Figure 4.
Figure 4.
Validating Data Transfer
As mentioned in the Crimson Cloud Connectors: Google Tech Note, using the Log Viewer is one way to validate the data transfer.
From the Cloud Platform Dashboard, click on Cloud Functions under Resources, highlighted in Figure 5.
Figure 5.
Next, click on the function created to receive data, function-1 as highlighted in Figure 6.
Figure 6.
Click VIEW LOGS at the top of the page, as shown in Figure 7.
Figure 7.
Figure 8 shows a log event of the tag data transfer, clicking on the triangle to the left of the time stamp will expand the log entry.
Figure 8.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement