简体   繁体   English

如何获取Azure IoT中心的IP地址而不是主机名

[英]How to get IP address of azure IoT hub instead of hostname

I have azure Iot hub with connection details like address, remote_username, remote_password which my device uses to connect to the IoT hub. 我的Azure Iot集线器具有连接详细信息,例如地址,remote_username,remote_password,我的设备用于连接到IoT集线器。 I am running mosquitto which uses below configuration settings in order to connect to azure Iot hub: 我正在运行mosquitto,它使用以下配置设置来连接到Azure Iot集线器:

connection iot-bridge
log_type all
address apsdc.azure-devices.net:8883
remote_username apsdc.azure-devices.net/Device1
remote_password SharedAccessSignature sr=apsdc.azure-devices.net&sig=ofIUhB3Tx6r3lGruCveI166ua655y8wA7U5dffqxBqY%3D&se=1534941834&skn=iothubowner
remote_clientid Device1

....
other settings...
....

Mosquitto on device connects to the iot-bridge which is apsdc.azure-devices.net using the provided username and sas password. 上设备Mosquitto连接到IOT桥是apsdc.azure-devices.net使用所提供的用户名和密码的SAS。 I was wondering if its possible to use any public IP address instead of apsdc.azure-devices.net . 我想知道是否有可能使用任何公共IP地址代替apsdc.azure-devices.net Is there any settings on azure to get the IP address. 天蓝色上是否有任何设置可以获取IP地址。 Thanks 谢谢

根据此页面 ,您可以重新编译Mosquitto以支持DNS,这样您就不必再连接到IP地址。

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

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