leshan icon indicating copy to clipboard operation
leshan copied to clipboard

Choose LWM2M version for Leshan Client

Open sbernard31 opened this issue 3 years ago • 2 comments
trafficstars

Currently Leshan v1.x support LWM2M v1.0 and Leshan v2.x support LWM2M v1.1. And only servers have backward compatibility* with common major version.

More concretely that means that :

  • Leshan v1.x servers support only LWM2M v1.0 client.
  • Leshan v2.x servers should support LWM2M v1.0 and v1.1 client.
  • Leshan v1.x client only behave as LWM2M v1.0 client.
  • Leshan v2.x client only behave as LWM2M v1.1 client.

A possible enhancement would be to make possible to configure a Leshan v2.x client to make it behave as a LWM2M v1.0 client or a LWM2M v1.1 client. This could make easier to write some compatibility tests.

See https://github.com/eclipse/leshan/issues/1241 discussion for more details.

sbernard31 avatar Apr 26 '22 09:04 sbernard31

This could be a great feature but also lot of more work to maintain it. We don't plan to work on this at short / mid term.

But let us know if you are interested or in you want to work on this.

sbernard31 avatar Apr 26 '22 09:04 sbernard31

For now, if you need a LWM2M v1.0 client for your tests you need to use Leshan v1.x.

This could be an issue if you want to write some junit tests with Leshan v2.x as server and Leshan v1.x as client because of package/class name conflicts. With maven a solution could maybe be to use maven-shade-plugin to relocate leshan v1.x package name. See : https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#relocations (I didn't test it so not sure it works)

sbernard31 avatar Apr 26 '22 09:04 sbernard31