Skip to content

Commit

Permalink
added debug print and increased core version
Browse files Browse the repository at this point in the history
  • Loading branch information
thewhobox committed Feb 14, 2024
1 parent 371357a commit 5c6c70c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions src/knx/ip_data_link_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,23 @@ void IpDataLinkLayer::loopHandleSearchRequestExtended(uint8_t* buffer, uint16_t
//defaults: “Device Information DIB”, “Extended Device Information DIB” and “Supported Services DIB”.
int dipLength = LEN_DEVICE_INFORMATION_DIB + LEN_SERVICE_DIB + LEN_EXTENDED_DEVICE_INFORMATION_DIB;

if(searchRequest.srpByProgMode)
println("srpByProgMode");

if(searchRequest.srpByMacAddr)
println("srpByMacAddr");

if(searchRequest.srpByService)
{
//FIXME not implemented
return;
println("srpByService");
}

if(searchRequest.srpRequestDIBs)
{
//FIXME not implemented
//dipLength += XX
return;
println("srpRequestDIBs");
}

KnxIpSearchResponseExtended searchResponse(_ipParameters, _deviceObject, dipLength);
Expand All @@ -439,7 +445,6 @@ void IpDataLinkLayer::loopHandleSearchRequestExtended(uint8_t* buffer, uint16_t
{
//FIXME not implemented
//searchResponse.setXXXX
return;
}

_platform.sendBytesUniCast(searchRequest.hpai().ipAddress(), searchRequest.hpai().ipPortNumber(), searchResponse.data(), searchResponse.totalLength());
Expand Down
2 changes: 1 addition & 1 deletion src/knx/knx_ip_search_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ KnxIpSearchResponse::KnxIpSearchResponse(IpParameterObject& parameters, DeviceOb

_supportedServices.length(LEN_SERVICE_DIB);
_supportedServices.code(SUPP_SVC_FAMILIES);
_supportedServices.serviceVersion(Core, 1);
_supportedServices.serviceVersion(Core, 2);
_supportedServices.serviceVersion(DeviceManagement, 1);
#ifdef KNX_TUNNELING
_supportedServices.serviceVersion(Tunnelling, 1);
Expand Down
4 changes: 2 additions & 2 deletions src/knx/knx_ip_search_response_extended.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ KnxIpSearchResponseExtended::KnxIpSearchResponseExtended(IpParameterObject& para
: KnxIpFrame(LEN_KNXIP_HEADER + LEN_IPHPAI + dibLength),
_controlEndpoint(_data + LEN_KNXIP_HEADER)
{
serviceTypeIdentifier(SearchResponse);
serviceTypeIdentifier(SearchResponseExt);

_controlEndpoint.length(LEN_IPHPAI);
_controlEndpoint.code(IPV4_UDP);
Expand Down Expand Up @@ -65,7 +65,7 @@ void KnxIpSearchResponseExtended::setSupportedServices()
KnxIpSupportedServiceDIB _supportedServices(_data + currentPos);
_supportedServices.length(LEN_SERVICE_DIB);
_supportedServices.code(SUPP_SVC_FAMILIES);
_supportedServices.serviceVersion(Core, 1);
_supportedServices.serviceVersion(Core, 2);
_supportedServices.serviceVersion(DeviceManagement, 1);
#ifdef KNX_TUNNELING
_supportedServices.serviceVersion(Tunnelling, 1);
Expand Down

0 comments on commit 5c6c70c

Please sign in to comment.