From b9fa6698a7462838b34aa7aada83354a100ad771 Mon Sep 17 00:00:00 2001 From: Wouter Date: Fri, 17 Nov 2023 11:01:58 +0000 Subject: [PATCH 1/2] fix for meta data id == 0 (changed from 9) --- knx_iot_virtual_pb.c | 16 ++++++++-------- knx_iot_virtual_sa.c | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/knx_iot_virtual_pb.c b/knx_iot_virtual_pb.c index 826d407..77fbe2e 100644 --- a/knx_iot_virtual_pb.c +++ b/knx_iot_virtual_pb.c @@ -516,7 +516,7 @@ get_OnOff_1(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -624,7 +624,7 @@ get_InfoOnOff_1(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -783,7 +783,7 @@ get_OnOff_2(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -891,7 +891,7 @@ get_InfoOnOff_2(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -1050,7 +1050,7 @@ get_OnOff_3(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -1158,7 +1158,7 @@ get_InfoOnOff_3(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -1317,7 +1317,7 @@ get_OnOff_4(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -1425,7 +1425,7 @@ get_InfoOnOff_4(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | diff --git a/knx_iot_virtual_sa.c b/knx_iot_virtual_sa.c index d0fdcf0..861dfa5 100644 --- a/knx_iot_virtual_sa.c +++ b/knx_iot_virtual_sa.c @@ -559,7 +559,7 @@ get_OnOff_1(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -731,7 +731,7 @@ get_InfoOnOff_1(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -839,7 +839,7 @@ get_OnOff_2(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -1011,7 +1011,7 @@ get_InfoOnOff_2(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | @@ -1119,7 +1119,7 @@ get_OnOff_3(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) | From 0d5a05b188c8ca721ebdfe81d4534f930af532e6 Mon Sep 17 00:00:00 2001 From: Wouter Date: Fri, 17 Nov 2023 11:03:00 +0000 Subject: [PATCH 2/2] missed one --- knx_iot_virtual_sa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knx_iot_virtual_sa.c b/knx_iot_virtual_sa.c index 861dfa5..ba3216f 100644 --- a/knx_iot_virtual_sa.c +++ b/knx_iot_virtual_sa.c @@ -1291,7 +1291,7 @@ get_InfoOnOff_3(oc_request_t *request, oc_interface_mask_t interfaces, char mystring[100]; snprintf(mystring,99,"urn:knx:sn:%s%s",oc_string(device->serialnumber), oc_string(request->resource->uri)); - oc_rep_i_set_text_string(root, 9, mystring); + oc_rep_i_set_text_string(root, 0, mystring); } // resource types if ((strncmp(m, "rt", m_len) == 0) |