ostroproject / ostro-os

Ostro OS
Other
93 stars 43 forks source link

client put request return error 4 in Iotivity #203

Open yma11 opened 7 years ago

yma11 commented 7 years ago

Steps to reproduce: 1) start a server like "/opt/iotivity/examples/resource/cpp/simpleserverHQ" and then start corresponding client to communicate with server on same DUT or another DUT.

Result: The put request from client will return error 4 so that server can't get the info. This happens on simpleclientHQ/roomclient/threadingsample Log: simpleclientHQ: iotivity-tester@intel-quark:/home/root$ /opt/iotivity/examples/resource/cpp/simpleclientHQ Finding Resource... Finding Resource for second time... Found resource 822cbb5c-6869-4b53-b138-07a98b9dfd52/a/light for the first time on server with ID: 822cbb5c-6869-4b53-b138-07a98b9dfd52 DISCOVERED Resource: URI of the resource: /a/light Host address of the resource: coap://192.168.8.108:55096 List of resource types: core.light core.brightlight List of resource interfaces: oic.if.baseline oic.if.ll Getting Light Representation... Found resource 822cbb5c-6869-4b53-b138-07a98b9dfd52/a/light again! Found another resource, ignoring GET request was successful Resource URI: /a/light state: 0 power: 0 name: John's light Putting light representation...

onPut Response error: 4

roomclient: iotivity-tester@intel-quark:/home/root$ /opt/iotivity/examples/resource/cpp/roomclient Default input argument. Using IP as Default connectivity type Usage roomclient <0|1> connectivityType: Default connectivityType 0: IP Finding Resource... DISCOVERED Resource: URI of the resource: /oic/p Host address of the resource: coap://192.168.8.108:54448 List of resource types: oic.wk.p List of resource interfaces: oic.if.baseline oic.if.r DISCOVERED Resource: URI of the resource: /a/room Host address of the resource: coap://192.168.8.108:54448 List of resource types: core.room List of resource interfaces: oic.if.baseline oic.if.b oic.if.ll Getting room representation on: oic.if.b Found another resource, ignoring Found another resource, ignoring Found another resource, ignoring GET request was successful Resource URI: /a/room Room name: John's Room Child Resource URI: /a/light state:0 color:0 Child Resource URI: /a/fan state:0 speed:0 Putting room representation on: oic.if.b onPut Response error: 4

threadingsample: Clientside Put response to get was: ErrorCode: 4 In PutResourceInfo Clientside Put response to get was: ErrorCode: 4 In PutResourceInfo Clientside Put response to get was: ErrorCode: 4

testkit commented 7 years ago

@yma11, is iotivity updated compared to last successful case? Is it an iotivity upstream bug actually?

yma11 commented 7 years ago

@testkit, compared the last 2 ostro build we tested, related iotivity TCs passed in build 452 and corresponding iotivity version is 1.1.0-r0.4 . This bug is opened against build 507 and the iotivity version is 1.1.1-r2.0. I suspect that iotivity is updated while the sample apps don't. FYI.

testkit commented 7 years ago

@yma11, thanks for checking. Can we reproduce this issue on Ubuntu? This might help us to identify it's ostro issue or iotivity upstream issue.