首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >蚊子和ibm沃森对覆盆子皮连接拒绝

蚊子和ibm沃森对覆盆子皮连接拒绝
EN

Stack Overflow用户
提问于 2017-05-11 14:05:39
回答 1查看 592关注 0票数 0

我是IoT的新手。我刚刚在rpi上安装了蚊子,并使用本教程( https://developer.ibm.com/recipes/tutorials/using-mosquitto-as-a-gateway-for-watson-iot/ )在沃森https://developer.ibm.com/recipes/tutorials/using-mosquitto-as-a-gateway-for-watson-iot/平台上注册了我的设备和网关

摩斯基托的地方模式很好。但是,我在使用以下命令进行订阅/发布时遇到了问题:

代码语言:javascript
复制
 mosquitto_sub -d -h pxci52.messaging.internetofthings.ibmcloud.com  -i 'g:pxci52:myfstream:gateway' -t iot-2/type/myfstream/id/gateway/evt/status/fmt/raw

代码语言:javascript
复制
sudo mosquitto_pub -d -h pxci52.messaging.internetofthings.ibmcloud.com  -i 'g:pxci52:myfstream:gateway' -t iot-2/type/myfstream/id/gateway/evt/status/fmt/raw -m "hello"

这是我的conf文件:

代码语言:javascript
复制
pid_file /var/run/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest topic


log_type error
log_type warning
log_type notice
log_type information

connection_messages true
log_timestamp true

include_dir /etc/mosquitto/conf.d
connection bridge-to-watsoniot
address pxci52.messaging.internetofthings.ibmcloud.com:1883
cleansession true
try_private false
bridge_attempt_unsubscribe false
notifications false
notification_topic iot-2/type/myfstream/id/gateway/evt/status/fmt/raw
remote_username token
remote_password xxxxxx
remote_clientid g:pxci52:myfstream:gateway
notifications true
topic iot-2/type/+/id/+/cmd/+/fmt/+ in iot-2/type/+/id/+/cmd/+/fmt/+
topic iot-2/type/+/id/+/evt/+/fmt/+ out iot-2/type/+/id/+/evt/+/fmt/+
connection_messages true

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-05-11 19:22:21

我在日志中看到设备auth的无效userID (令牌):ClientID=‘g:pqci52 52:myfstream:gateway’,而不是仅仅是"token“--试试"use-token-auth”,这是您在下面的菜谱示例中指定的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43917742

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档