Dragino NB IoT 到 Azure Cosmos DB

问题描述 投票:0回答:0

我正在尝试从 Dragino NB IoT (NBSN95) 节点将数据加载到 Azure Cosmos DB。 Dragino提供以下传输方式和AT命令来设置相关参数。

COAP

AT+SERVADDR=120.24.4.116,5683     // to set CoAP server address and port
AT+URI=5,11,"mqtt",11,"coap",12,"0",15,"c=text1",23,"0"  //Set COAP resource path

UDP

AT+SERVADDR=120.24.4.116,5601      //  to set UDP server address and port

MQTT

AT+SERVADDR=120.24.4.116,1883         // Set MQTT server address and port
AT+CLIENT=CLIENT                                  // Set up the CLIENT of MQTT
AT+UNAME=UNAME                               // Set the username of MQTT
AT+PWD=PWD                                        // Set the password of MQTT
AT+PUBTOPIC=T1_PUB                           // Set the sending topic of MQTT
AT+SUBTOPIC=T1_SUB                           // Set the subscription topic of MQTT

TCP

AT+SERVADDR=120.24.4.116,5600

我最初希望通过AZ IoT Hub使用MQTT,但是用户名和密码参数是受设备限制的字符长度(

uint8_t  uname[41]; uint8_t  pwd[41]
),因此Azure用户名和密码(SAS)太长了。我可以通过修改集线器名称和设备 ID 来缩短用户名,并省略 API 版本(?如果这仍然有效)但我不能缩短 SAS 并且设备不支持 x509。

我考虑过可能使用 HiveMD 作为桥梁,但此功能在他们的系统上尚不可用,或者需要许可证才能在 Azure 中使用 Hive MD 以及其他 Azure 功能的费用。

我一直在研究 Azure 中的蚊子,但尚未取得进展,希望找到更简单的解决方案。我目前有其他(非 NB IoT)设备使用 Azure webhook 功能从第三方设备提供商接收进程并将 JSON 帖子传输到 Cosmos DB,无论对错,这都是一个简单的解决方案。

对于在上述限制范围内将数据加载到 Cosmos DB 的任何建议,我将不胜感激。

azure mqtt iot azure-iot-hub
© www.soinside.com 2019 - 2024. All rights reserved.