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
@cskiraly By trying to fix #63 we don't deregister the device from dbus so we can't reregister the same device.
The d-feet tool did help to clear up things ( but I'm not sure how it can connect to a socket file)
In DeviceManagerImp.java line 96
DeviceDefinition registeredDev = null;
if (device != null) {
registeredDev = device.Definition();
logger.info("Device already registered: {}", device.Id());
So if DeviceFactory doesn't delete the old device object a new device will never get registered
the Stop method in DeviceImp.java should include code to deregister the device. I'm not sure what dbusDisconnect() is supposed to do here
Proposed change in DeviceImp.java line 437 (I'll make a pull request later on)
logger.info ("removing "+deviceID+ "object from " + connection.toString());
String devicePath = AGILE_DEVICE_BASE_BUS_PATH + deviceID;
if (connection != null) connection.unExportObject(devicePath);
A device cannot be re-registered after being deleted.
05:26:38.612 [Thread-2] INFO i.a.devicemanager.DeviceManagerImp - Connection established: org.freedesktop.dbus.DBusConnection@623fc1bd
05:26:38.871 [Thread-2] INFO i.a.devicemanager.DeviceManagerImp - Creating new device: Dummy
05:26:38.959 [Thread-2] INFO i.a.devicemanager.DeviceManagerImp - Created new device: [iot.agile.object.DeviceDefinition<dummy001122334455, 00:11:22:33:44:55, Dummy, , iot.agile.protocol.Dummy, /iot/agile/Device/dummy001122334455, [iot.agile.object.DeviceComponent<DummyData, dum>]>]
05:26:38.986 [Thread-8] INFO i.a.devicemanager.DeviceManagerImp - Device connected
05:26:43.401 [Thread-2] INFO i.a.devicemanager.DeviceManagerImp - Deleting device dummy001122334455
05:26:43.406 [Thread-2] INFO i.a.devicemanager.DeviceManagerImp - Device deleted: dummy001122334455
05:26:45.285 [Thread-2] INFO i.a.devicemanager.DeviceManagerImp - Connection established: org.freedesktop.dbus.DBusConnection@623fc1bd
05:26:47.751 [Thread-2] INFO i.a.devicemanager.DeviceManagerImp - Device already registered: dummy001122334455
05:26:47.755 [Thread-9] INFO i.a.devicemanager.DeviceManagerImp - Device connected
The text was updated successfully, but these errors were encountered: