Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knx-linux-coupler fails on download application #294

Open
ajlajlajl opened this issue Sep 30, 2024 · 10 comments
Open

knx-linux-coupler fails on download application #294

ajlajlajl opened this issue Sep 30, 2024 · 10 comments

Comments

@ajlajlajl
Copy link
Contributor

Hi,
So I've been trying to setup the knx-linux-coupler in my ubuntu, its connected to a knx development board (NCN5120).
It works alright when I send write/read commands or while monitoring the bus for packets that devices exchange between eachother.
But when I try to download an application on a device its tries for a sec and then fails with: "Failed to connect to 1.1.6" , with 1.1.6 being the device that Im trying to download app on.
I tried to watch the packets on wireshark but it dowsnt look like theres any request that has not been responded. and Im not really familiar with the underlying knx stack so Im not sire what the probmen is.
btw I enabled some of debug outputs and this is the output when download fails:

pRxF: [1] 01.01.006 -> 01/00/057 [__R_D__A] ( 9C 11 06 08 39 E3 00 80 14 20 12 )
Inbound:  01.01.006 -> 01/00/057 [__R_D__A] ( 9C 11 06 08 39 E3 00 80 14 20 12 )
  TP<: 9C 11 06 08 39 E3 00 80 14 20 12 
  CEMI<: 29 00 9C E0 11 06 08 39 03 00 80 14 20 
ToTunnel L_data_ind: src: 1106 dst: 839 frame: 29 00 9C E0 11 06 08 39 03 00 80 14 20 
Send to Channel: 4
L_data_req: src: FF01 dst: 1106 frame: 11 00 B0 60 FF 01 11 06 00 80 
L_data_con: src: FF01 dst: 1106 frame: 2E 00 B0 60 FF 01 11 06 00 80 
Send to Channel: 4
ToTunnel L_data_ind: src: FF01 dst: 1106 frame: 29 00 B0 60 FF 01 11 06 00 80 
Found no Tunnel for IA: 1106
L_data_req: src: FF01 dst: 1106 frame: 11 00 B0 60 FF 01 11 06 01 43 00 
L_data_con: src: FF01 dst: 1106 frame: 2E 00 B0 60 FF 01 11 06 01 43 00 
Send to Channel: 4
ToTunnel L_data_ind: src: FF01 dst: 1106 frame: 29 00 B0 60 FF 01 11 06 01 43 00 
Found no Tunnel for IA: 1106
L_data_req: src: FF01 dst: 1106 frame: 11 00 B0 60 FF 01 11 06 00 81 
L_data_con: src: FF01 dst: 1106 frame: 2E 00 B0 60 FF 01 11 06 00 81 
Send to Channel: 4
ToTunnel L_data_ind: src: FF01 dst: 1106 frame: 29 00 B0 60 FF 01 11 06 00 81 
Found no Tunnel for IA: 1106

this "Found no Tunnel for IA: 1106" message is all I get and Im not sure what it means..
Do I need to set some config or something to make this works? since it looks like to be a internal logic error.
or am I doing something wrong?

Thanks.

@thelsing
Copy link
Owner

thelsing commented Oct 1, 2024

I guess I broke this on a merge. I'll try to look into this this weekend.

@thelsing
Copy link
Owner

thelsing commented Oct 1, 2024

Which knxprod did you use?

@aliglzr
Copy link

aliglzr commented Oct 2, 2024

I have this issue too
What branch or version I need to use for a bug free coupler?

@thelsing
Copy link
Owner

thelsing commented Oct 2, 2024

@aliglzr Which knxprod do you use?

@ajlajlajl
Copy link
Contributor Author

ajlajlajl commented Oct 3, 2024

Which knxprod did you use?

I'm using the knx-linux-coupler example code. And I'm trying to download on a different device in TP network through this.

btw, theres two other fixes? I made to make it work:

  1. target_compile_definitions(knx-linux-iptp PUBLIC -DMASK_VERSION=0x091A -DKNX_TUNNELING)

    here I had to change "-DKNX_TUNNELING" to "-DKNX_TUNNELING=10" to make it work with 'Group Monitor' in ETS. otherwise it was giving errors that theres no available tunnel i think.. . 10 is arbitary.
  2. _ipAddress = ntohl(ipaddr->sin_addr.s_addr);

    in ETS the shown IP address was in reverse and when selected ETS was trying to connect to that reverse IP ( for example my linux IP was 192.168.3.120 but in ETS it was shown as 120.3.168.192). I had to remove the "ntohl" function in lines 89 & 94. Im not sure if its something specific to my system or not

@aliglzr
Copy link

aliglzr commented Oct 7, 2024

@thelsing any good news?

@aliglzr
Copy link

aliglzr commented Oct 12, 2024

@thelsing
I'm sorry to message you again
But my project depends on your answer to solve the problem, can you help me or solve my problem?
Your help is very valuable to me

@thelsing
Copy link
Owner

You should be able to program other devices without tunnelling but with multicast. Just by using the network interface as the programming interface in ETS. If you want to use tunneling try changing -DKNX_TUNNELING to -DKNX_TUNNELING=1 at

target_compile_definitions(knx-linux-iptp PUBLIC -DMASK_VERSION=0x091A -DKNX_TUNNELING)

You can also try to remove it to disable tunnelling.

@aliglzr
Copy link

aliglzr commented Oct 13, 2024

I've tried to use multicast before but it doesn't work at all. it passes nothing through.
Also if I set KNX_TUNNELING to 1 , I'll get 'no free tunnel' error in logs and ETS also throws an error that it cant connect.
the 'no free tunnel' can be fixed if I give a higher number, for example 10 as I did. then It can pass normal packets like read and write commands but download/get info from device fails.

@aliglzr
Copy link

aliglzr commented Dec 8, 2024

Any updates?
I am still stuck on this issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants