You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to integrate bridge functionality into iotivity-lite. However, the latest library does not seem to support the ability to dynamically delete and recreate OCF Devices.
As an example, I created an 5 devices, or OCF Client, OCF Bridge and three VODs (Virtual OCF Device) in one android app. Then, when I deleted VOD#1 and tried to create it again, an error occurred and the app crashed.
When I looked at the files/credentials directory of the app package with Android Studio's Device Explorer, I confirmed that u_ids_0~4 (also ael, cred, pstat, ... etc) were created. VOD#1 corresponds to u_ids_2.
In the case of ZigBee VOD, VOD must be dynamically created or deleted during the process of connecting and resetting the ZigBee device. Of course, it is required to manage the VOD index well, but first, I wonder if there will be any problems when dynamically deleting and re-creating the OCF Device (or VOD) in the latest iotivity-lite library.
Can anyone answer this issue?
The text was updated successfully, but these errors were encountered:
@joochlee
Based on the recent iotivity-lite (commit fc89bd6), I am working on merging some of the ocfbridging branch's bridge-related source code and our Zigbee library into the iotivity source code.
The point I want to know is whether the current iotivity-lite library supports the case of programmatically deleting and recreating a device. Looking at the source, I see that the OcPlaform class has an addDevice() member function but no removeDevice(), so I am wondering if it is not supported.
My guess is that the current iotivity library only allows adding devices in InitHandler and does not consider deleting them later. If so, it seems that it will also affect the VOD create/delete function.
ocfbridging is tool old branch. Currently I'm trying to merge new bridging support code to iotivity-lite stack, but it does not include Android API supports..
Another API is required to add and delete VODs dynamically. So current latest iotivity-lite stack only provides the way to add OCF Device(s) statically in InitHandler as you said.
@jkralik @Danielius1922
I'm trying to integrate bridge functionality into iotivity-lite. However, the latest library does not seem to support the ability to dynamically delete and recreate OCF Devices.
As an example, I created an 5 devices, or OCF Client, OCF Bridge and three VODs (Virtual OCF Device) in one android app. Then, when I deleted VOD#1 and tried to create it again, an error occurred and the app crashed.
When I looked at the files/credentials directory of the app package with Android Studio's Device Explorer, I confirmed that u_ids_0~4 (also ael, cred, pstat, ... etc) were created. VOD#1 corresponds to u_ids_2.
In the case of ZigBee VOD, VOD must be dynamically created or deleted during the process of connecting and resetting the ZigBee device. Of course, it is required to manage the VOD index well, but first, I wonder if there will be any problems when dynamically deleting and re-creating the OCF Device (or VOD) in the latest iotivity-lite library.
Can anyone answer this issue?
The text was updated successfully, but these errors were encountered: