thelsing / knx

knx stack (TP, IP and RF) for arduino and linux, Can be configured with ETS
GNU General Public License v3.0
276 stars 95 forks source link

knx-linux-coupler fails on download application #294

Open ajlajlajl opened 5 days ago

ajlajlajl commented 5 days ago

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 commented 3 days ago

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

thelsing commented 3 days ago

Which knxprod did you use?

aliglzr commented 3 days ago

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

thelsing commented 2 days ago

@aliglzr Which knxprod do you use?

ajlajlajl commented 2 days ago

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. https://github.com/thelsing/knx/blob/a30bbd0f0ab99a7703cb304f6ee0cb643bf17d3a/examples/knx-linux-coupler/CMakeLists.txt#L174 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. https://github.com/thelsing/knx/blob/a30bbd0f0ab99a7703cb304f6ee0cb643bf17d3a/src/linux_platform.cpp#L89 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