calimero-project / calimero-core

Core library for KNX network access and management
Other
126 stars 64 forks source link

Mangamementclient no basic restart anymore with v2.5? #104

Closed Darthyson closed 2 years ago

Darthyson commented 2 years ago

Hi, with calimero-core v2.5 calling ManagementClientImpl.restart(dst, 0, 255) results in:

tuwien.auto.calimero.KNXIllegalArgumentException: unsupported erase code 0
    at tuwien.auto.calimero.mgmt.ManagementClient$EraseCode.of(ManagementClient.java:492)
    at tuwien.auto.calimero.mgmt.ManagementClient.restart(ManagementClient.java:565)
    ...

Is this behavior intended? I think basic restart is still supported by the KNX spec. The lowest EraseCode i can find in ManagementClient.java is ConfirmedRestart which results in 1.

bmalinowsky commented 2 years ago

The method you are calling is restarting a device including a master reset, not a basic restart. A basic restart would be ::restart(dst).

Darthyson commented 2 years ago

Problem is on my side. I just read the spec, Btw. it was working with 2.4 :-). Thanks for the fast response.

bmalinowsky commented 2 years ago

Thanks for the update. Yes, before 2.5 the method did no range check of the erase code before sending. But it shouldn't have worked because a remote endpoint should not restart itself with code 0 (ideally, maybe some do).