Open sbernard31 opened 1 year ago
Since an object device is mandatory, it would be nice to trigger a warning if the client starts without one.
Yep agree with that.
Since an object device is mandatory, it would be nice to trigger a warning if the client starts without one.
@jvermillard, I created a PR about that : https://github.com/eclipse/leshan/pull/1378 , If wanted you could have a look.
When running https://github.com/sbernard31/benchmark-clients/pull/7 based on Leshan 2.0.0-M10 using ,
java -jar target/benchmark-clients-0.2.0-SNAPSHOT-jar-with-dependencies.jar -n 2 -u coap://leshan.eclipseprojects.io -e device%08d
I get :This doesn't happen with
master
based on Leshan 1.3.1.After activating LOG in TRACE I get :
Debugging this, it seems that client has no Device Object Enabler and so unable to get SupportedBindingMode.
Adding something like
initializer.setInstancesForObject(DEVICE, new Device("manufacturer","modelnumber","serialnumber"));
seems to solve the issue.I need to investigate more to understand why this does happen with previous version of Leshan but I guess SupportedBindingMode is new resource from LWM2M 1.1.