开发者社区 > 物联网 > 正文

阿里云物联网套件MQTT协议接入,连接失败问题

我在linux平台上,修改编译了基于MQTT协议的c版本的SDK,调通了两台设备通过发布订阅一个topic可以相互通信,
我现在在windows端安装了一个MQTT协议的客户端mosquitto,根据说明我连接不上。
命令如下:
订阅命令:
mosquitto_sub.exe -t "/1000060141/topic1" -h "iot.channel.aliyun.com" -p "8080" -q 1 -i

"1000060141:0Q5arXaCfdSblBzgG" -u D953D38A63DFB4E5AB97ECF92E2316AD -k 100

发布命令:
mosquitto_pub.exe -t "/1000060141/topic1" -h "iot.channel.aliyun.com" -p "8080" -q 1 -i

"1000060141:0Q5arXaCfdSblBzgG" -u D953D38A63DFB4E5AB97ECF92E2316AD -k 100 -m helll

命令有什么问题么?
总是提示如下错误:
Error: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

确认mosquitto客户端程序是正常的。

展开
收起
counect 2016-08-17 16:44:03 12343 0
1 条回答
写回答
取消 提交回答
  • 你好,我也是刚接触IOT SDK,我编译了设备端的SDK,linux版本的,但是运行出错了,请问是什么原因呢?请问有联系方式吗
    root@custVBOX:mqtt# ./demo
    start demo!
    [notice] src/aliyun_iot_auth.c:592 aliyun_iot_auth_init()| auth init success!
    [error] src/aliyun_iot_auth.c:145 aliyun_iot_get_response()| auth failed: errorCode: Unknow
    [error] src/aliyun_iot_auth.c:418 aliyun_iot_get_auth_info()| run aliyun_iot_get_response error!
    [error] src/aliyun_iot_auth.c:726 aliyun_iot_auth()| run aliyun_iot_get_auth_info error!result = -1
    run aliyun_iot_auth() error!
    [notice] src/aliyun_iot_auth.c:613 aliyun_iot_auth_release()| auth release!
    out of demo!

    2019-07-17 20:04:03
    赞同 展开评论 打赏

物联网领域前沿技术分享与交流

相关产品

  • 物联网平台
  • 相关电子书

    更多
    RocketMQ Client-GO 介绍 立即下载
    RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载
    基于 RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载