Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi, sorry about the delay... #1590

Closed
jramirez0309 opened this issue Jan 14, 2020 · 1 comment
Closed

Hi, sorry about the delay... #1590

jramirez0309 opened this issue Jan 14, 2020 · 1 comment
Labels
type: docs Improvement to the documentation for an API.

Comments

@jramirez0309
Copy link

Hi, sorry about the delay...

So, it turns out, I was trying to be too clever.

Since I'm using Typescript, I was getting told that secureProtocol does not exist in type 'IClientOptions' and decided I should try the only other property that did exist but wasn't being used ('protocolId' as below).

const connectionArgs: mqtt.IClientOptions = {
  host: mqttBridgeHostname,
  port: mqttBridgePort,
  clientId: mqttClientId,
  username: deviceId,
  password: createJWT(projectId, privateKeyFile, algorithm),
  protocol: 'mqtts',
  protocolId: 'TLSv1_2_method'
}

mqtt.connect(opts)

I changed 'protocolId' back to 'secureProtocol' and told typescript to ignore it and all is working as expected now.

As a side note

I feel like something is missing in the docs here: https://cloud.google.com/iot/docs/how-tos/mqtt-bridge#downloading_mqtt_server_certificates

At the end of the section 'Downloading MQTT server certificates' the sentence

After downloading Google root CA certificates to your device, you can configure an MQTT client to authenticate the device, connect to the MQTT server, and communicate over the MQTT bridge.

'configure an MQTT client to authenticate the device' is a link to a section on the page that doesn't exist.

There's nothing else in the documentation or in the code samples that explains or demonstrates what to do with the Google root CA certificate. Is it even needed?

Originally posted by @prenna in #1563 (comment)

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jan 15, 2020
@fhinkel
Copy link
Contributor

fhinkel commented Jan 15, 2020

@jramirez0309 Thanks for raising the issue. I opened a bug internally so we can update our documentation. Appreciate you letting us know!

@fhinkel fhinkel closed this as completed Jan 15, 2020
@fhinkel fhinkel added type: docs Improvement to the documentation for an API. and removed triage me I really want to be triaged. labels Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvement to the documentation for an API.
Projects
None yet
Development

No branches or pull requests

3 participants