Skip to content

Commit f4783a0

Browse files
authored
Merge pull request #86 from SmartThingsCommunity/master_rel_1_5_11
Master rel 1 5 11
2 parents e90f9ff + 7723a1c commit f4783a0

11 files changed

+268
-54
lines changed

apps/capability_sample/caps_button.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ static void caps_button_set_button_value(caps_button_data_t *caps_data, const ch
122122
static void caps_button_attr_button_send(caps_button_data_t *caps_data)
123123
{
124124
int sequence_no = -1;
125+
IOT_EVENT *attr = NULL;
126+
iot_cap_val_t value;
127+
iot_cap_attr_option_t attr_option = { 0 };
125128

126129
if (!caps_data || !caps_data->handle) {
127130
printf("fail to get handle\n");
@@ -132,12 +135,16 @@ static void caps_button_attr_button_send(caps_button_data_t *caps_data)
132135
return;
133136
}
134137

135-
ST_CAP_SEND_ATTR_STRING(caps_data->handle,
136-
(char *)caps_helper_button.attr_button.name,
137-
caps_data->button_value,
138-
NULL,
139-
NULL,
140-
sequence_no);
138+
value.type = IOT_CAP_VAL_TYPE_STRING;
139+
value.string = caps_data->button_value;
140+
141+
attr_option.state_change = true;
142+
143+
attr = st_cap_create_attr_with_option(caps_data->handle, (char *)caps_helper_button.attr_button.name, &value, NULL, NULL, &attr_option);
144+
if (attr != NULL){
145+
sequence_no = st_cap_send_attr(&attr, 1);
146+
st_cap_free_attr(attr);
147+
}
141148

142149
if (sequence_no < 0)
143150
printf("fail to send button value\n");
@@ -146,7 +153,6 @@ static void caps_button_attr_button_send(caps_button_data_t *caps_data)
146153

147154
}
148155

149-
150156
static int caps_button_get_numberOfButtons_value(caps_button_data_t *caps_data)
151157
{
152158
if (!caps_data) {

build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def print_usage():
2323

2424
try:
2525
usage_buf = ""
26-
for bsp_dir in os.listdir(os.path.join(STDK_REF_PATH, "bsp")):
27-
if (os.path.isdir(os.path.join(STDK_REF_PATH, "bsp", bsp_dir))
26+
for bsp_dir in os.listdir(os.path.join(STDK_REF_PATH, "apps")):
27+
if (os.path.isdir(os.path.join(STDK_REF_PATH, "apps", bsp_dir))
2828
and os.path.isdir(os.path.join(STDK_REF_PATH, "apps", bsp_dir))):
2929
app_list = ""
3030
for dir in os.listdir(os.path.join(STDK_REF_PATH, "apps", bsp_dir)):

doc/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ The SmartThings App should be used to control an IoT device that is running with
516516
517517
1. **Enable developer mode**
518518
You need to enable the ***Developer Mode*** in the SmartThings app before start testing.
519-
Please refer [here](https://smartthings.developer.samsung.com/docs/testing/developer-mode.htm) for more details.
519+
Please refer [here](https://smartthings.developer.samsung.com/docs/testing/developer-mode.html) for more details.
520520
![developer mode](./res/developer_mode.png)
521521
522522
2. **Add device**
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From e38e879f7e71d417a96337dd0c56c2ce35cf79a8 Mon Sep 17 00:00:00 2001
2+
From: Sanghee Kim <sh0130.kim@samsung.com>
3+
Date: Tue, 2 Feb 2021 18:07:14 +0900
4+
Subject: [PATCH] mbedtls: esp_config: add MBEDTLS_SSL_ASYNC_PRIVATE
5+
6+
It has been added from v2.11.0.
7+
---
8+
.../mbedtls/port/include/mbedtls/esp_config.h | 13 +++++++++++++
9+
1 file changed, 13 insertions(+)
10+
11+
diff --git a/components/mbedtls/port/include/mbedtls/esp_config.h b/components/mbedtls/port/include/mbedtls/esp_config.h
12+
index 9c6323276..1bea5f1c4 100644
13+
--- a/components/mbedtls/port/include/mbedtls/esp_config.h
14+
+++ b/components/mbedtls/port/include/mbedtls/esp_config.h
15+
@@ -786,6 +786,19 @@
16+
*/
17+
#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
18+
19+
+/**
20+
+ * \def MBEDTLS_SSL_ASYNC_PRIVATE
21+
+ *
22+
+ * Enable asynchronous external private key operations in SSL. This allows
23+
+ * you to configure an SSL connection to call an external cryptographic
24+
+ * module to perform private key operations instead of performing the
25+
+ * operation inside the library.
26+
+ *
27+
+ */
28+
+#ifdef CONFIG_MBEDTLS_SSL_ASYNC_PRIVATE
29+
+#define MBEDTLS_SSL_ASYNC_PRIVATE
30+
+#endif
31+
+
32+
/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
33+
*
34+
* Enable support for Encrypt-then-MAC, RFC 7366.
35+
--
36+
2.17.1
37+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From 8cd8a0f16683160791fa4b426c70ed1d9f009f26 Mon Sep 17 00:00:00 2001
2+
From: Sanghee Kim <sh0130.kim@samsung.com>
3+
Date: Tue, 2 Feb 2021 19:20:41 +0900
4+
Subject: [PATCH] mbedtls: Kconfig: add option for MBEDTLS_SSL_ASYNC_PRIVATE
5+
6+
For certificate-based onboarding
7+
---
8+
components/mbedtls/Kconfig | 8 ++++++++
9+
1 file changed, 8 insertions(+)
10+
11+
diff --git a/components/mbedtls/Kconfig b/components/mbedtls/Kconfig
12+
index 7514d7621..68b5902fe 100644
13+
--- a/components/mbedtls/Kconfig
14+
+++ b/components/mbedtls/Kconfig
15+
@@ -462,6 +462,14 @@ menu "mbedTLS"
16+
help
17+
Enable the RIPEMD-160 hash algorithm.
18+
19+
+ config MBEDTLS_SSL_ASYNC_PRIVATE
20+
+ bool "Enable asynchronous external private key"
21+
+ default n
22+
+ help
23+
+ This allows you to configure an SSL connection to call
24+
+ an external cryptographic module to perform private key operations
25+
+ instead of performing the operation inside the library.
26+
+
27+
menu "Certificates"
28+
29+
config MBEDTLS_PEM_PARSE_C
30+
--
31+
2.17.1
32+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From e38e879f7e71d417a96337dd0c56c2ce35cf79a8 Mon Sep 17 00:00:00 2001
2+
From: Sanghee Kim <sh0130.kim@samsung.com>
3+
Date: Tue, 2 Feb 2021 18:07:14 +0900
4+
Subject: [PATCH] mbedtls: esp_config: add MBEDTLS_SSL_ASYNC_PRIVATE
5+
6+
It has been added from v2.11.0.
7+
---
8+
.../mbedtls/port/include/mbedtls/esp_config.h | 13 +++++++++++++
9+
1 file changed, 13 insertions(+)
10+
11+
diff --git a/components/mbedtls/port/include/mbedtls/esp_config.h b/components/mbedtls/port/include/mbedtls/esp_config.h
12+
index 9c6323276..1bea5f1c4 100644
13+
--- a/components/mbedtls/port/include/mbedtls/esp_config.h
14+
+++ b/components/mbedtls/port/include/mbedtls/esp_config.h
15+
@@ -786,6 +786,19 @@
16+
*/
17+
#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
18+
19+
+/**
20+
+ * \def MBEDTLS_SSL_ASYNC_PRIVATE
21+
+ *
22+
+ * Enable asynchronous external private key operations in SSL. This allows
23+
+ * you to configure an SSL connection to call an external cryptographic
24+
+ * module to perform private key operations instead of performing the
25+
+ * operation inside the library.
26+
+ *
27+
+ */
28+
+#ifdef CONFIG_MBEDTLS_SSL_ASYNC_PRIVATE
29+
+#define MBEDTLS_SSL_ASYNC_PRIVATE
30+
+#endif
31+
+
32+
/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
33+
*
34+
* Enable support for Encrypt-then-MAC, RFC 7366.
35+
--
36+
2.17.1
37+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From a5b1fe8d9ab7063432bc647fef9e84b1d0be0457 Mon Sep 17 00:00:00 2001
2+
From: Sanghee Kim <sh0130.kim@samsung.com>
3+
Date: Wed, 3 Feb 2021 10:19:39 +0900
4+
Subject: [PATCH] mbedtls: Kconfig: add option for MBEDTLS_SSL_ASYNC_PRIVATE
5+
6+
For certificate-based onboarding
7+
---
8+
components/mbedtls/Kconfig | 8 ++++++++
9+
1 file changed, 8 insertions(+)
10+
11+
diff --git a/components/mbedtls/Kconfig b/components/mbedtls/Kconfig
12+
index 1d9f93d21..4e69e42a1 100644
13+
--- a/components/mbedtls/Kconfig
14+
+++ b/components/mbedtls/Kconfig
15+
@@ -426,6 +426,14 @@ menu "mbedTLS"
16+
help
17+
Enable the RIPEMD-160 hash algorithm.
18+
19+
+ config MBEDTLS_SSL_ASYNC_PRIVATE
20+
+ bool "Enable asynchronous external private key"
21+
+ default n
22+
+ help
23+
+ This allows you to configure an SSL connection to call
24+
+ an external cryptographic module to perform private key operations
25+
+ instead of performing the operation inside the library.
26+
+
27+
menu "Certificates"
28+
29+
config MBEDTLS_PEM_PARSE_C
30+
--
31+
2.17.1
32+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 23bfbd1ba6ff0e4f845c6279242b743e6b3a1e40 Mon Sep 17 00:00:00 2001
2+
From: Sanghee Kim <sh0130.kim@samsung.com>
3+
Date: Tue, 2 Feb 2021 17:58:02 +0900
4+
Subject: [PATCH] mbedtls: esp: add MBEDTLS_SSL_ASYNC_PRIVATE in configuration
5+
6+
It has been added from v2.11.0.
7+
---
8+
.../mbedtls/port/include/mbedtls/esp_config.h | 13 +++++++++++++
9+
1 file changed, 13 insertions(+)
10+
11+
diff --git a/components/mbedtls/port/include/mbedtls/esp_config.h b/components/mbedtls/port/include/mbedtls/esp_config.h
12+
index 7cc51003..617670cc 100644
13+
--- a/components/mbedtls/port/include/mbedtls/esp_config.h
14+
+++ b/components/mbedtls/port/include/mbedtls/esp_config.h
15+
@@ -726,6 +726,19 @@
16+
*/
17+
#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
18+
19+
+/**
20+
+ * \def MBEDTLS_SSL_ASYNC_PRIVATE
21+
+ *
22+
+ * Enable asynchronous external private key operations in SSL. This allows
23+
+ * you to configure an SSL connection to call an external cryptographic
24+
+ * module to perform private key operations instead of performing the
25+
+ * operation inside the library.
26+
+ *
27+
+ */
28+
+#ifdef CONFIG_MBEDTLS_SSL_ASYNC_PRIVATE
29+
+#define MBEDTLS_SSL_ASYNC_PRIVATE
30+
+#endif
31+
+
32+
/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
33+
*
34+
* Enable support for Encrypt-then-MAC, RFC 7366.
35+
--
36+
2.17.1
37+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From e8cce8de38737d55c140ebb1be260834373ca665 Mon Sep 17 00:00:00 2001
2+
From: Sanghee Kim <sh0130.kim@samsung.com>
3+
Date: Wed, 3 Feb 2021 10:38:22 +0900
4+
Subject: [PATCH] mbedtls: Kconfig: add option for MBEDTLS_SSL_ASYNC_PRIVATE
5+
6+
For certificate-based onboarding
7+
---
8+
components/mbedtls/Kconfig | 8 ++++++++
9+
1 file changed, 8 insertions(+)
10+
11+
diff --git a/components/mbedtls/Kconfig b/components/mbedtls/Kconfig
12+
index 10949c96..b1920b85 100644
13+
--- a/components/mbedtls/Kconfig
14+
+++ b/components/mbedtls/Kconfig
15+
@@ -439,6 +439,14 @@ menu "mbedTLS"
16+
help
17+
Enable the RIPEMD-160 hash algorithm.
18+
19+
+ config MBEDTLS_SSL_ASYNC_PRIVATE
20+
+ bool "Enable asynchronous external private key"
21+
+ default n
22+
+ help
23+
+ This allows you to configure an SSL connection to call
24+
+ an external cryptographic module to perform private key operations
25+
+ instead of performing the operation inside the library.
26+
+
27+
menu "Certificates"
28+
29+
config MBEDTLS_PEM_PARSE_C
30+
--
31+
2.17.1
32+

0 commit comments

Comments
 (0)