【问题标题】:Unable to connect TI SensorTag CC2650STK to IoT Foundation / Bluemix无法将 TI SensorTag CC2650STK 连接到 IoT Foundation/Bluemix
【发布时间】:2015-09-08 12:54:07
【问题描述】:

我可以将 SensorTag 与我的 Android 手机上的 BLE SensorTag 应用程序连接起来,我可以使用默认的 Push to Cloud Quickstart 设置将数据发送到 IoT Foundation Quickstart。但是当我尝试作为注册设备连接到 IoT Foundation 时失败了。

我已经在 IoT Foundation 上注册了设备:

Organization ID         abcdef   (<- not my real org on IoT Foundation)
Device Type             sensortag
Device ID               sensortag1
Authentication Method   token
Authentication Token    somecrypticcharacters

在云端设置中我手机上的 BLE SensorTag 应用中:

Cloud Service: IBM IoT Foundation
Username:      use-token-auth
Password:      somecrypticcharacters
Device id:     d:abcdef:sensortag:sensortag1
Broker add.:   abcdef.messaging.internetofthings.ibmcloud.com
Broker Port:   1883
Publish topic: iot-2/evt/sensors/fmt/json

当我启用推送到云时,我得到一个

"Failed with error code: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference'

我在这里做错了什么?

【问题讨论】:

    标签: ibm-cloud iot


    【解决方案1】:

    我在 IoT Foundation 连接中遇到了同样的问题(“设备身份验证的用户 ID () 无效:ClientID....”)。

    你可以这样解决:

    client.connect(options, new IMqttActionListener() {....

    client.connect(options,this.context, new IMqttActionListener() {...

    • 编译并安装更新的应用程序。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-24
      • 1970-01-01
      • 1970-01-01
      • 2017-03-19
      相关资源
      最近更新 更多