From cdcfbb4e8338665645797980bfe72f9fb656d51e Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Sat, 31 Aug 2019 03:00:35 +0200 Subject: [PATCH] fix connect --- src/knx/application_layer.cpp | 5 ++++- src/knx/transport_layer.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/knx/application_layer.cpp b/src/knx/application_layer.cpp index 3d96559..321942a 100644 --- a/src/knx/application_layer.cpp +++ b/src/knx/application_layer.cpp @@ -175,7 +175,10 @@ void ApplicationLayer::connectIndication(uint16_t tsap) void ApplicationLayer::connectConfirm(uint16_t destination, uint16_t tsap, bool status) { - + if (status) + _connectedTsap = tsap; + else + _connectedTsap = -1; } void ApplicationLayer::disconnectIndication(uint16_t tsap) diff --git a/src/knx/transport_layer.cpp b/src/knx/transport_layer.cpp index eb00d64..e63f624 100644 --- a/src/knx/transport_layer.cpp +++ b/src/knx/transport_layer.cpp @@ -666,6 +666,7 @@ void TransportLayer::A12(uint16_t destination, Priority priority) CemiFrame frame(0); TPDU& tpdu = frame.tpdu(); tpdu.type(Connect); + _networkLayer->dataIndividualRequest(AckRequested, destination, NetworkLayerParameter, priority, tpdu); _seqNoRecv = 0; _seqNoSend = 0; enableConnectionTimeout();