Hello folks,
I am testing iotivity server codes on arduino with ITT now.
While I'm testing this, I found some problem;
The IoTivity server for "arduino" can't handle virtual resource (/oic/d).
When client sends request like below, server just returns error (4.00;
bad request).
===================
TE --------> Get Request --------> DUT
Protocol Type : COAP
Destination URI : 192.168.100.185:55555/oic/d
Confirmable Type : True
Query : if=oic.if.r
===================
I tried to find where the problem happened and I found:
Since "SRMInitSecureResponses()" is not called while OCInit() is running,
server couldn't get device id and finally it failed to send response to
request for "/oic/d".
<ocstack.c>
initResources() {
...
#ifndef WITH_ARDUINO
if (result == OC_STACK_OK )
{
result = SRMInitSecureResources();
}
#endif
...
}
After removing preprocessor directives, server returns correct answers.
Is this a bug? or is there some reason?
Thanks & regards
- Kevin
--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee
Service Standard Research Team, PEC, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune at etri.re.kr/cms.rune at gmail.com Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+