能够通过PC将数据发布到IBM Watson Cloud,但无法连接到Cloud thorugh设备(Sierra无线wp85模块-ARM arch)

时间:2019-04-12 10:39:57

标签: c embedded iot ibm-watson watson-iot

我正在尝试使用IBM watson的客户端C库(嵌入式)将数据发布到IBM watson云。我正在尝试运行helloworld示例代码。

我能够通过PC(x86 arch)在IBM watsob云上发布数据。为此,我按照IBM(https://github.com/ibm-watson-iot/iot-embeddedc)的github链接中的说明安装了cmocka-1.1.0。 我正在使用Embedded C Client库发布数据。我能够看到在设备详细信息(“最近的事件”选项卡)上发布的数据。

对于设备,我已经使用ARM体系结构(使用WP 85的sierra无线工具链)交叉编译了iot-embedded-c源代码。工具链源位于(https://source.sierrawireless.com/resources/airprime/software/wpx5xx/wpx5xx-firmware-release-15/)上。

成功编译嵌入物联网的源之后,几乎没有生成.so文件和.a文件。我尝试使用yocto配方将这些文件复制到设备/ usr / lib,并成功复制了.so文件(我无法复制.a文件)。经过点烤并在yocto上制作后,创建了yocto图像,该图像已在设备中闪过。

现在,我尝试运行helloWorld应用程序以将数据发布到IBM Watson云设备,该设备已经使用以下命令成功注册,但由于错误代码为-82而被撤消,我无法找到IBM Watson网站doc的错误代码列表。请建议我解决此问题。

root@swi-mdm9x15:~# ./helloWorld
Sample expects minimum of 5 args.
Usage: helloWorld orgID deviceType deviceId token useCerts caCertsPath clientCertPath clientKeyPath
where:
orgId: Watson IoT Platform organization Id to connect. 

deviceType: Name of Device Type as registered on Watson IoT Platform. 

deviceId: Name/ID of Device as registered on Watson IoT Platform. 

token: Device token / password provided at the time of registration. 

useCerts: Whether to use Client Side Certificates or not. 

caCertsPath: If useCerts==1, then valid path containing CA Certificates otherwise not needed. 

clientCertPath: If useCerts==1, then valid path containing Client Certificate otherwise not needed. 

clientKeyPath: If useCerts==1, then valid path containing Client Private Key otherwise not needed. 

root@swi-mdm9x15:~# 
root@swi-mdm9x15:~# ./helloWorld "vagv4k" "test" 1 "RFdEZ@&0ch_XD4iSUa" 0 
Before connection 
Usercerts =0
argv[1] : vagv4k
argv[2] : test
argv[3] : 1
argv[4] : RFdEZ@&0ch_XD4iSUa
rc=0
Connection returned rc = -82.
 Quitting..
root@swi-mdm9x15:~#

0 个答案:

没有答案