开发者社区> 问答> 正文

阿里云物联网套件,C-SDK例程报错

shexj 2017-08-28 17:16:59 2605

物联网套件,C-SDK
使用版本:华东2站点 版本V2.0
问题描述:

在x86上编译,例程执行正常。登录IOT后台查看,设备在线;交叉编译移植到arm板子上,运行例程报错。打印如下:

[root@OBU2 ~]# /home/mqtt-example loop
[inf] iotx_device_info_init(40): device_info created successfully!
[dbg] iotx_device_info_set(50): start to set device info!
[dbg] iotx_device_info_set(64): device_info set successfully!
[dbg] _calc_hmac_signature(211): | source: clientIdB8Y6JdDUmND.obu01deviceNameobu01productKeyB8Y6JdDUmNDtimestamp2524608000000 (83)
[dbg] _calc_hmac_signature(212): | secret: VdEMtOsNgiG8Cq94LEhAZi02cGyNs0Vp (32)
[dbg] _calc_hmac_signature(215): | method: hmacsha1
[dbg] _calc_hmac_signature(228): | signature: 8ce4079b78ea076bba224299d6ca548574d2dfc2 (40)
[dbg] iotx_guider_authenticate(764): ....................................................
[dbg] iotx_guider_authenticate(765): ProductKey : B8Y6JdDUmND
[dbg] iotx_guider_authenticate(766): DeviceName : obu01
[dbg] iotx_guider_authenticate(767): DeviceID : B8Y6JdDUmND.obu01
[dbg] iotx_guider_authenticate(768): DeviceSecret : VdEMtOsNgiG8Cq94LEhAZi02cGyNs0Vp
[dbg] iotx_guider_authenticate(769): ....................................................
[dbg] iotx_guider_authenticate(770): PartnerID Buf :
[dbg] iotx_guider_authenticate(771): Guider URL : http://iot-auth.cn-shanghai.aliyuncs.com/auth/devicename
[dbg] iotx_guider_authenticate(775): Guider Timestamp : 2524608000000
[dbg] iotx_guider_authenticate(776): ....................................................
[dbg] iotx_guider_authenticate(777): Guider Sign : 8ce4079b78ea076bba224299d6ca548574d2dfc2
[dbg] iotx_guider_authenticate(782): ....................................................
[dbg] iotx_guider_authenticate(801): req_str = 'productKey=B8Y6JdDUmND&deviceName=obu01&signmethod=hmacsha1&sign=8ce4079b78ea076bba224299d6ca548574d2dfc2&version=default&clientId=B8Y6JdDUmND.obu01&timestamp=2524608000000&resources=mqtt'
[dbg] _http_response(272): requ_payload:

productKey=B8Y6JdDUmND&deviceName=obu01&signmethod=hmacsha1&sign=8ce4079b78ea076bba224299d6ca548574d2dfc2&version=default&clientId=B8Y6JdDUmND.obu01&timestamp=2524608000000&resources=mqtt

[dbg] httpclient_common(783): host: 'iot-auth.cn-shanghai.aliyuncs.com', port: 443
[inf] _ssl_client_init(164): Loading the CA root certificate ...

  1. version : 3
  2. number : 04:00:00:00:00:01:15:4B:5A:C3:94

issuer name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
subject name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
issued on : 1998-09-01 12:00:00
expires on : 2028-01-28 12:00:00
signed using : RSA with SHA1
RSA key size : 2048 bits
basic constraints : CA=true
key usage : Key Cert Sign, CRL Sign
[inf] _ssl_parse_crt(132): crt content:451
[inf] _ssl_client_init(172): ok (0 skipped)
[inf] TLSConnectNetwork(337): Connecting to /iot-auth.cn-shanghai.aliyuncs.com/443...
[inf] TLSConnectNetwork(339): failed ! net_connect returned -0x0052
[err] httpclient_conn(79): establish connection failed
[err] httpclient_common(789): httpclient_connect is error,ret = -8
[dbg] _iotId_iotToken_http(389): http response:

[err] iotx_guider_authenticate(813): _iotId_iotToken_http() failed
mqtt_client|160 :: AUTH request failed!
[err] LITE_dump_malloc_free_stats(297): WITH_MEM_STATS = 0
main|289 :: out of sample!

物联网
分享到
取消 提交回答
全部回答(2)
  • 1509805300425710
    2019-07-17 21:32:24

    请问你们怎么移植这SDK2.0 的呢?

    0 0
  • shexj
    2019-07-17 21:32:24

    自己解决。arm板上面没有配置DNS。所以域名解析不出来。

    0 0
添加回答
IoT
+ 订阅

物联网软硬件开发者一站式基地

推荐文章
相似问题
推荐课程