Skip to content

Commit

Permalink
fixed wrong mediumType on Router
Browse files Browse the repository at this point in the history
  • Loading branch information
thewhobox committed Jan 2, 2024
1 parent 095fd97 commit 27dc260
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/knx/knx_ip_description_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ KnxIpDescriptionResponse::KnxIpDescriptionResponse(IpParameterObject& parameters

_deviceInfo.length(LEN_DEVICE_INFORMATION_DIB);
_deviceInfo.code(DEVICE_INFO);
_deviceInfo.medium(0x20); //KNX-IP FIXME get this value from somewhere else
#if MASK_VERSION == 0x57B0
_deviceInfo.medium(0x20); //MediumType is IP (for IP-Only Devices)
#else
_deviceInfo.medium(0x02); //MediumType is TP
#endif
_deviceInfo.status(deviceObject.progMode());
_deviceInfo.individualAddress(parameters.propertyValue<uint16_t>(PID_KNX_INDIVIDUAL_ADDRESS));
_deviceInfo.projectInstallationIdentifier(parameters.propertyValue<uint16_t>(PID_PROJECT_INSTALLATION_ID));
Expand Down
6 changes: 5 additions & 1 deletion src/knx/knx_ip_search_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ KnxIpSearchResponse::KnxIpSearchResponse(IpParameterObject& parameters, DeviceOb

_deviceInfo.length(LEN_DEVICE_INFORMATION_DIB);
_deviceInfo.code(DEVICE_INFO);
_deviceInfo.medium(0x20); //KNX-IP FIXME get this value from somewhere else
#if MASK_VERSION == 0x57B0
_deviceInfo.medium(0x20); //MediumType is IP (for IP-Only Devices)
#else
_deviceInfo.medium(0x02); //MediumType is TP
#endif
_deviceInfo.status(deviceObject.progMode());
_deviceInfo.individualAddress(parameters.propertyValue<uint16_t>(PID_KNX_INDIVIDUAL_ADDRESS));
_deviceInfo.projectInstallationIdentifier(parameters.propertyValue<uint16_t>(PID_PROJECT_INSTALLATION_ID));
Expand Down

0 comments on commit 27dc260

Please sign in to comment.