iotivity-lite
iotivity-lite copied to clipboard
In MultiDeviceServer with iotivity-lite v2.2.4.3, ownership setting (e.g. JW OTM) fails from the second device onwards.
Using Android apps, MultiDeviceServer and OnBoardingTool with iotivity-lite v2.2.4.3 or later, OTM failed from 2nd device. OTM to the first device is OK, but OTM to the second device fails regardless of the OTM type.
In iotivity-lite v2.2.0, OTM was successful for all devices added in MultiDeviceServer.
What changes have occurred since the iotivity-lite version was upgraded?
[ MultiDeviceServer customized ]
[ OnBoardingTool]
I think I found the source of the issue - https://github.com/iotivity/iotivity-lite/commit/c9e97deac32a1ff989101c4ec8a6fb78fcd285a3 .
The problem is that for multicasts the get doxm handler uses static buffer that's shared by all devices (static oc_separate_response_t doxm_separate_response
). When you have multiple devices they all want to use the single buffer and just overwrite it. I'll discuss the solution with @jkralik once he returns from vacation.
(And you can see in this commit that a random jitter was added to the response time, so that answers the question from the other ticket why the discover responses come in small random intervals.)
@Askidea should be fixed in master now.