5

I'm developing an application in C# to control my KNX home system. So, i've used the software ETS3Demo, and using the software wireshark could "see" the IP datagrams sent by the ETS3 to the KNX/IP Interface.

I've alredy succeed with the "Connection_Request", "ConnectionState_Request" and "Disconnect_Request", i.e. I send the requests datagram and the KNX/IP Interface responds.

The only request that is giving me headaches is the "Tunnelling_Request". I send the information exactly the same way as I send the previous datagrams, but this one seems not to work.

I send the datagram "byte by byte", 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've alredy changed the byte that corresponds to the source address and the group address to a "int" variable, and still doesn't work.

Can someone give me a suggestion or something that I might be doing wrong.

Thanks

ccellar
  • 10,326
  • 2
  • 38
  • 56
Canha
  • 103
  • 1
  • 7

2 Answers2

3

For anyone coming here looking up the thread:

You can always use the KNX association Falcon Library that can be downloaded for free and allows to preform all the operations (run-time and management). It requires you to understand KNX protocol though and isn't the prettiest and cleaner library ever, but works.

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

Note: May need you to register, but that is for free. [I can't share it here because it would violate the License Agreement. Thanks Mr. Bummi!]

Community
  • 1
  • 1
João Portela
  • 83
  • 1
  • 6
  • I am a bit concerned with the license agreement for this product. I think it's fine if you are developing something for yourself, however, if you planning on building a product I recommend very carefully reading their license. – TheLegendaryCopyCoder Apr 19 '21 at 14:50
  • Knx.Falcon.Sdk is available on nuget.org since a while. – Klaus Gütter Feb 11 '23 at 15:16
0

I'm using knx to on/off the light I used this link to send tunneling request.

joy
  • 131
  • 1
  • 8