简体   繁体   English

RaspberryPi IoTF 快速入门配方没有发送数据

[英]No data being sent from RaspberryPi IoTF Quickstart recipe

I have a RaspberryPi2 running the Quickstart recipe following instructions on https://developer.ibm.com/iotfoundation/recipes/raspberry-pi/我有一个 RaspberryPi2,它按照https://developer.ibm.com/iotfoundation/recipes/raspberry-pi/ 上的说明运行快速入门配方

This includes installing the "quickstart" - grabbing the files from curl -LO https://github.com/ibm-messaging/iot-raspberrypi/releases/download/1.0.2/iot_1.0-1_armhf.deb , installing via sudo dpkg -i iot_1.0-1_armhf.deb and then checking the service is running using "service iot status".这包括安装“快速入门” - 从 curl -LO https://github.com/ibm-messaging/iot-raspberrypi/releases/download/1.0.2/iot_1.0-1_armhf.deb获取文件,通过 sudo 安装dpkg -i iot_1.0-1_armhf.deb 然后使用“service iot status”检查服务是否正在运行。 The response is as expected [ ok ] iot is running.响应符合预期 [ ok ] 物联网正在运行。 Next step - get the device id using: service iot getdeviceid And I should be able to enter this on the web page mention above and see data.下一步 - 使用以下方法获取设备 ID:service iot getdeviceid 我应该能够在上面提到的网页上输入它并查看数据。

The iotf page says: iotf 页面说:

We are waiting for your device to send us a message我们正在等待您的设备向我们发送消息

The device ID you have entered is valid, but we are waiting for your device to send us a message.您输入的设备 ID 有效,但我们正在等待您的设备向我们发送消息。

Get your device to send us some valid data - we'll visualize it for you让您的设备向我们发送一些有效数据 - 我们将为您可视化

Some initial connection failures but the last attempt passes and /var/log/system says:一些初始连接失败,但最后一次尝试通过, /var/log/system 说:

Jun 28 21:14:55 rasppi2 iot[2029]: Connecting to ssl://XXXXX.messaging.internetofthings.ibmcloud.com:8883 with client Id: d:XXXXX:RaspberryPi2: 6 月 28 日 21:14:55 rasppi2 iot[2029]:使用客户端 ID:d:XXXXX:RaspberryPi2 连接到 ssl://XXXXX.messaging.internetofthings.ibmcloud.com:8883:
Jun 28 21:14:55 rasppi2 ntpd_intres[2135]: DNS 0.debian.pool.ntp.org -> 217.79.179.106 6 月 28 日 21:14:55 rasppi2 ntpd_intres[2135]:DNS 0.debian.pool.ntp.org -> 217.79.179.106
Jun 28 21:14:55 rasppi2 ntpd_intres[2135]: DNS 1.debian.pool.ntp.org -> 178.33.227.201 6 月 28 日 21:14:55 rasppi2 ntpd_intres[2135]:DNS 1.debian.pool.ntp.org -> 178.33.227.201
Jun 28 21:14:55 rasppi2 ntpd_intres[2135]: DNS 2.debian.pool.ntp.org -> 193.225.118.162 6 月 28 日 21:14:55 rasppi2 ntpd_intres[2135]:DNS 2.debian.pool.ntp.org -> 193.225.118.162
Jun 28 21:14:55 rasppi2 ntpd_intres[2135]: DNS 3.debian.pool.ntp.org -> 148.251.6.51 6 月 28 日 21:14:55 rasppi2 ntpd_intres[2135]:DNS 3.debian.pool.ntp.org -> 148.251.6.51
Jun 28 21:14:55 rasppi2 iot[2029]: Connection was successful 6 月 28 日 21:14:55 rasppi2 iot[2029]:连接成功
Jun 28 21:14:58 rasppi2 iot[2029]: Subscription succeeded 6 月 28 日 21:14:58 rasppi2 iot[2029]:订阅成功

Is there anything else I should check?还有什么我应该检查的吗?

It looks like maybe you have stored the device registration info and are trying to connect with it rather than with quickstart?看起来您可能已经存储了设备注册信息并试图与其连接而不是使用快速入门?

Connecting to ssl://XXXXX.messaging.internetofthings.ibmcloud.com:8883 with client Id: d:XXXXX:RaspberryPi2:使用客户端 ID:d:XXXXX:RaspberryPi2 连接到 ssl://XXXXX.messaging.internetofthings.ibmcloud.com:8883:

To use quickstart connection, I would expect the client ID to say quickstart.要使用快速启动连接,我希望客户端 ID 显示快速启动。

Did you do the step in the recipe that included copying the registered device info into device.cfg file on the pi?您是否执行了配方中的步骤,包括将注册的设备信息复制到 pi 上的 device.cfg 文件中?
If you are connected as a registered device then you can't use the quickstart realtime visualization webpage for a device that is connecting with a registered client ID.如果您作为注册设备进行连接,那么您无法对使用注册客户端 ID 连接的设备使用快速入门实时可视化网页。

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

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