KNXnetIP implementation in C #

I am developing a C # application to manage my home KNX system. So, I used the ETS3Demo software, and using a proxy server allows you to "see" the IP datagrams sent by ETS3 to the KNX / IP interface.

I have continuity with "Connection_Request", "ConnectionState_Request" and "Disconnect_Request", i.e. I am sending a request datagram and the KNX / IP interface is responding.

The only query that gives me headaches is "Tunnelling_Request". I am sending information in exactly the same way as I am sending previous datagrams, but this one does not seem to work.

I am sending a byte by byte datagram, as you can see in the following code:

byte[] byteToSend1 = { 06, 16, 04, 32, 00, 21, 04 }; string communicationChannel = ComunicationChannelNum.Text; byte bytesnew = Convert.ToByte(communicationChannel); byte[] byteToSend2 = { 00, 00, 17, 00, 188, 224, 00, 00, 09, 01, 01, 00, 129 }; writer.WriteBytes(byteToSend1); writer.WriteByte(bytesnew); writer.WriteBytes(byteToSend2); 

I alredy changed the byte, which corresponds to the source address and group address for the variable "int", and still does not work.

Can someone give me a suggestion or something that I can do wrong.

thanks

+4
source share
2 answers

For those who come here, looking at the topic:

You can always use the Falcon Library KNX library, which can be downloaded for free, and allows you to pre-perform all operations (runtime and control). This requires that you understand the KNX protocol, although not the most beautiful and clean library, but it works.

here: https://my.knx.org/en/downloads/falcon

Note. You may need to register, but it's free. [I cannot share this here because it violates the License Agreement. Thank you Mr. Bummy!]

+2
source

I use knx to turn on / off the light, which I used this to send a tunneling request.

0
source

Source: https://habr.com/ru/post/1436632/


All Articles