Skip to content

Commit 709c58b

Browse files
authored
Merge pull request #99 from SmartThingsCommunity/master_rel_1_7_0
Master rel 1 7 0
2 parents 4367e87 + 2fd18ac commit 709c58b

24 files changed

+1291
-16
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# HISTORY
22

3+
## 1.7.0 : Changes until v1.7.0
4+
5+
New Improvements or features:
6+
- Add changing device name feature
7+
* New API : st_change_device_name() added
8+
- Add 'esp32c3' bsp and modify related component.mk/cmake file
9+
- Add capability helper for 'mode' capability
10+
11+
Enhancements or amendments:
12+
- Add the history feed displaying control options of the struct iot_cap_attr_option_t
13+
* To control whether the event should be displayed in the history feed of the mobile App
14+
15+
Bug fixed:
16+
- Fix Static Code Analysis report
17+
* iot_api:iot_main: Uses 'type casting' to fit in printf format sepcifier
18+
- Fix multiple definition of main error for deps/json : prevent cJSON/test.c building
19+
320
## 1.6.2 : Changes until v1.6.2
421

522
New Improvements or features:

README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ We also provide the additional Reference repository so that you can refer to how
1212

1313
It is distributed in source form and written in C99 for the purpose of portability to most platforms.
1414

15-
## Announcements
16-
17-
Good news! We have launched the new commercial program for MQTT devices. You will be able to submit for certification into the SmartThings mobile app later this month. To prepare for submission, please perform the necessary steps with your current integrations:
18-
19-
- Update to the latest SmartThings SDK for Direct Connected Devices for C
20-
- Please use the SDK v1.3.3 or later
21-
- Downlaod the updated onboarding_config.json for your devices.
22-
- Re-register any test devices you have registered previously.
23-
- Update to the latest SmartThings mobile app to test your device
24-
- Please use SmartThings mobile application v1.7.51 (for Android), v1.6.51 (for iOS) or later
25-
2615
## Main features
2716

2817
This core device library provides the following features :

src/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ config STDK_IOT_CORE_BSP_SUPPORT_ESP32
147147
bool "ESP32"
148148
config STDK_IOT_CORE_BSP_SUPPORT_ESP32S2
149149
bool "ESP32S2"
150+
config STDK_IOT_CORE_BSP_SUPPORT_ESP32C3
151+
bool "ESP32C3"
150152
endchoice
151153

152154
choice STDK_IOT_CORE_OS_SUPPORT

src/component.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ if(CONFIG_STDK_IOT_CORE)
1616
elseif(CONFIG_STDK_IOT_CORE_BSP_SUPPORT_ESP32S2)
1717
set(STDK_SRC_PATH "${STDK_SRC_PATH}" port/bsp/esp32s2)
1818
set(STDK_INCLUDE_PATH "${STDK_INCLUDE_PATH}" include/bsp/esp32s2)
19+
elseif(CONFIG_STDK_IOT_CORE_BSP_SUPPORT_ESP32C3)
20+
set(STDK_SRC_PATH "${STDK_SRC_PATH}" port/bsp/esp32c3)
21+
set(STDK_INCLUDE_PATH "${STDK_INCLUDE_PATH}" include/bsp/esp32c3)
1922
elseif(CONFIG_STDK_IOT_CORE_BSP_SUPPORT_RTL8195)
2023
set(STDK_SRC_PATH "${STDK_SRC_PATH}" port/bsp/rtl8195)
2124
set(STDK_INCLUDE_PATH "${STDK_INCLUDE_PATH}" include/bsp/rtl8195)

src/component.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ else ifeq ($(CONFIG_STDK_IOT_CORE_BSP_SUPPORT_ESP32),y)
1717
else ifeq ($(CONFIG_STDK_IOT_CORE_BSP_SUPPORT_ESP32S2),y)
1818
COMPONENT_SRCDIRS += port/bsp/esp32s2
1919
COMPONENT_ADD_INCLUDEDIRS += include/bsp/esp32s2
20+
else ifeq ($(CONFIG_STDK_IOT_CORE_BSP_SUPPORT_ESP32C3),y)
21+
COMPONENT_SRCDIRS += port/bsp/esp32c3
22+
COMPONENT_ADD_INCLUDEDIRS += include/bsp/esp32c3
2023
else ifeq ($(CONFIG_STDK_IOT_CORE_BSP_SUPPORT_RTL8195),y)
2124
COMPONENT_SRCDIRS += port/bsp/rtl8195
2225
COMPONENT_ADD_INCLUDEDIRS += include/bsp/rtl8195

src/deps/json/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PREFIX := cJSON_
55

66
LOCAL_CFLAGS := -I$(SRCDIR)
77

8-
SRCS = $(wildcard $(SRCDIR)/*.c)
8+
SRCS = $(SRCDIR)/cJSON.c
99
OBJS = $(SRCS:.c=.o)
1010

1111
all: $(OBJS)

src/easysetup/iot_easysetup_st_mqtt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ void *_iot_es_mqtt_registration_json(struct iot_context *ctx,
694694
}
695695
#endif /* STDK_IOT_CORE_SERIALIZE_CBOR */
696696

697+
STATIC_FUNCTION
697698
iot_error_t _iot_es_mqtt_registration(struct iot_context *ctx, st_mqtt_client mqtt_ctx)
698699
{
699700
int ret;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* ***************************************************************************
2+
*
3+
* Copyright 2021 Samsung Electronics All Rights Reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing,
12+
* software distributed under the License is distributed on an
13+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14+
* either express or implied. See the License for the specific
15+
* language governing permissions and limitations under the License.
16+
*
17+
****************************************************************************/
18+
19+
#ifndef _IOT_BSP_CUSTOM_H_
20+
#define _IOT_BSP_CUSTOM_H_
21+
22+
#include "sdkconfig.h"
23+
24+
#endif /* _IOT_BSP_CUSTOM_H_ */
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/* ***************************************************************************
2+
*
3+
* Copyright 2019-2021 Samsung Electronics All Rights Reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing,
12+
* software distributed under the License is distributed on an
13+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14+
* either express or implied. See the License for the specific
15+
* language governing permissions and limitations under the License.
16+
*
17+
****************************************************************************/
18+
19+
#ifndef _IOT_CAPS_HELPER_MODE_
20+
#define _IOT_CAPS_HELPER_MODE_
21+
22+
#include "iot_caps_helper.h"
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
const static struct iot_caps_mode {
29+
const char *id;
30+
const struct mode_attr_supportedModes {
31+
const char *name;
32+
const unsigned char property;
33+
const unsigned char valueType;
34+
} attr_supportedModes;
35+
const struct mode_attr_mode {
36+
const char *name;
37+
const unsigned char property;
38+
const unsigned char valueType;
39+
} attr_mode;
40+
const struct mode_cmd_setMode { const char* name; } cmd_setMode;
41+
} caps_helper_mode = {
42+
.id = "mode",
43+
.attr_supportedModes = {
44+
.name = "supportedModes",
45+
.property = ATTR_SET_VALUE_ARRAY,
46+
.valueType = VALUE_TYPE_STRING,
47+
},
48+
.attr_mode = {
49+
.name = "mode",
50+
.property = ATTR_SET_VALUE_REQUIRED,
51+
.valueType = VALUE_TYPE_STRING,
52+
},
53+
.cmd_setMode = { .name = "setMode" }, // arguments: mode(string)
54+
};
55+
56+
#ifdef __cplusplus
57+
}
58+
#endif
59+
60+
#endif /* _IOT_CAPS_HERLPER_MODE_ */

src/include/iot_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#define IOT_SUB_TOPIC_COMMAND "/v1/commands/%s/cbor"
4747
#define IOT_SUB_TOPIC_NOTIFICATION "/v1/notifications/%s/cbor"
4848
#define IOT_PUB_TOPIC_HEALTH "/v1/health/cbor"
49+
#define IOT_PUB_TOPIC_DEVICES_UPDATE "/v1/devices/update/cbor"
4950
#else
5051
#define IOT_PUB_TOPIC_REGISTRATION "/v1/registrations"
5152
#define IOT_SUB_TOPIC_REGISTRATION "/v1/registrations/notification/%s"
@@ -54,6 +55,7 @@
5455
#define IOT_SUB_TOPIC_COMMAND "/v1/commands/%s"
5556
#define IOT_SUB_TOPIC_NOTIFICATION "/v1/notifications/%s"
5657
#define IOT_PUB_TOPIC_HEALTH "/v1/health"
58+
#define IOT_PUB_TOPIC_DEVICES_UPDATE "/v1/devices/update"
5759
#endif
5860

5961
#define IOT_PUB_TOPIC_DELETE "/v1/devices/delete"

0 commit comments

Comments
 (0)