Details
Description
I am very happy to be testing the qtknx library.
I've stumbled upon an issue and I wonder if you can help me solve it.
The issue presents when sending a 'WriteRequest'-frame via an 'QKnxNetIpTunnelConnection'.
I use wireshark to analyze the packets, and I notice an issue in the packethandling.
The IP interface used is 'KNX/IP Interface 730' from Weinzierl.
When simulating the WriteRequest via ETS, I notice the following flow when writing to a communication object:
ETS -> IP interface (TunnellingRequest)
IP interface -> ETS (Ack)
IP interface -> ETS (TunnelingRequest)
ETS -> IP interface (Ack)
When I use the function in 'sendTunnelFrame' from the 'QKnxNetIpTunnelConnection' connection, I notice the following flow:
qtknx -> IP interface (TunnellingRequest)
IP interface -> qtknx (Ack)
IP interface -> qtknx (TunnelingRequest)
IP interface -> qtknx (DISCONNECT REQUEST)
As you notice, the qtknx library does not ACK the tunnelingrequest, which causes the IP interface to disconnect to the library.
I've found thehandling for the tunnellingrequest packets here: https://github.com/qt/qtknx/blob/5.11/src/knx/netip/qknxnetipendpointconnection.cpp#L155
During debugging, I notice the 'dataEndpoint'-readyReady handler is never called and that the 'controlEndpoint'-readyRead handler is called when a 'TunnellingRequest'-packet is received.
I've placed the 'QKnxNetIp::ServiceType::TunnelingRequest' into the 'controlEndpoint' handler, which worked, since now it's correctly sends an ACK message back to the IP interface (see attachment for wireshark plots).
Unfortunately, the ack message is send after 1 second (which is way to long for the IP interface), since the DISCONNECT REQUEST is send after a couple of milliseconds.
Thanks!
Jonathan.
Attachments
For Gerrit Dashboard: QTBUG-67926 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
227590,3 | Fix empty HPAI return value in case KNXnet/IP NAT was used | 5.11 | qt/qtknx | Status: MERGED | +2 | 0 |
227632,3 | Fix connection issue in case KNXnet/IP NAT was used | 5.11 | qt/qtknx | Status: MERGED | +2 | 0 |