calimero-project / calimero-core

Core library for KNX network access and management
Other
129 stars 65 forks source link

Support for knx secure over RF #133

Open danishmhmd opened 1 month ago

danishmhmd commented 1 month ago

Hi Channel i am looking to use knx secure over RF can you suggest if support for the same is available along with any reference implementation example for the same. Link for the product: https://weinzierl.de/en/products/knx-rf-usb-interface-stick-340/ Link for the SDK: https://weinzierl.de/en/software/knx/sdk-for-baos-binary-services/

bmalinowsky commented 1 month ago

The USB link creation is the same as for plain communication. To enable secure communication, specify the keys using a KNX keyring with Security.defaultInstallation().useKeyring(...).

bmalinowsky commented 1 month ago

I put an example for KNX Secure process communication in the introduction repo here.

danishmhmd commented 1 month ago

@bmalinowsky I am able to decrypt now and listen to events on bus but not being able to write any command. Can you suggest if this has something to do with library or its an issue with programming

Group Address I am getting event from

22:24:20.806493005 3.1.2->1/1/1 write.ind: 01 22:24:20.837195897 3.1.1->1/1/2 write.ind: 01 22:24:21.119391354 3.1.2->1/1/1 write.ind: 00 22:24:21.173208470 3.1.1->1/1/2 write.ind: 00

While writing i am getting error : 1/1/1 does not have a surrogate specified

bmalinowsky commented 1 month ago

You can add a surrogate in the map Security.defaultInstallation().groupSenders(), i.e., a secure sender device in the KNX installation for that group address. It has to be a sender which also has a device tool key specified in the keyring.

Otherwise, modify the ETS project, so the exported keyring contains XML elements like <Group Address="1234" Senders="a.b.c x.y.z ..." /> inside an <Interface> element.