简体   繁体   English

GCP IoT core 与 BG96 连接出现问题

[英]There is a problem to connect GCP IoT core with BG96

Before, I succeed to connect AWS IoT Core with BG96(LTE module).之前,我成功将 AWS IoT Core 与 BG96(LTE 模块)连接起来。

And now I'm trying to connect GCP IoT Core with BG96.现在我正在尝试将 GCP IoT Core 与 BG96 连接起来。 However, there are some problems.但是,也存在一些问题。

I followed the guideline of IoT Core and downloaded MQTT server certificates(complete Goolge root CA, RSA key with a self-signed x.509 certificate).我遵循 IoT Core 的指南并下载了 MQTT 服务器证书(完整的 Goolge 根 CA,带有自签名 x.509 证书的 RSA 密钥)。

Then, created JWT from jwt.io using another generated RSA key with below header and payload.然后,从 jwt.io 使用另一个生成的 RSA 密钥创建 JWT,该密钥低于 Z099FB995346F31C749F6E40。

在此处输入图像描述

After, uploaded key files to cert section of device tab.之后,将密钥文件上传到设备选项卡的证书部分。

在此处输入图像描述

At BG96, I set the configurations like below.在 BG96,我设置如下配置。 (root: complete Google root CA, cert: rsa_cert.pem (x.509), key: rsa_private.pem (x.509)) (根:完整的 Google 根 CA,证书:rsa_cert.pem (x.509),密钥:rsa_private.pem (x.509))

AT+QCDS
+QCDS: "SRV","CAT-M",45012,2500,12BAF1B,R13,3,313,1031,-75,-102,-10,3,128,0,0,0
OK
AT+QSSLCFG="cacert",0,"UFS:root.pem"
OK
AT+QSSLCFG="clientcert",0,"UFS:cert.pem"
OK
AT+QSSLCFG="clientkey",0,"UFS:key.pem"
OK
AT+QSSLCFG="seclevel",0,2
OK
AT+QSSLCFG="sslversion",0,4
OK
AT+QMTCFG="SSL",0,1,0
OK
AT+QMTCFG="will",0,0
OK
AT+QMTCFG="version",0,4
OK
AT+QMTCFG="keepalive",0,60
OK
AT+QMTCFG="session",0,1
OK
AT+QMTOPEN=0,"mqtt.googleapis.com",8883
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,"projects/mqtt-test/locations/asia-east1/registries/test-registry/devices/my-
device","unused",["jwt"](I just covered it up)
OK
+QMTSTAT: 0,1

I don't know why but It keeps disconnecting GCP.我不知道为什么,但它不断断开 GCP。

Did I make a mistake somewhere?我在某个地方犯了错误吗?

I found the problem.我发现了问题。 The client ID was different.客户 ID 不同。 It was mqtt-test-282503, not mqtt-test.它是 mqtt-test-282503,而不是 mqtt-test。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM