Skip to content

Commit e5cb761

Browse files
committed
update Golioth Zephyr SDK to v0.16.0
This is based on NCS v2.8.0 - Update async callbacks: - Remove golioth_response param - Add golioth_status and golioth_coap_rsp_code params - Replace deprecated CONFIG_EVENTFD_MAX with CONFIG_ZVFS_OPEN_MAX - Replace deprecated CONFIG_POSIX_MAX_FDS with CONFIG_ZVFS_OPEN_MAX - Use CONFIG_MBEDTLS_LEGACY_CRYPTO_C to enable support for p-384 curves Signed-off-by: Mike Szczys <[email protected]>
1 parent fbf9638 commit e5cb761

File tree

7 files changed

+34
-25
lines changed

7 files changed

+34
-25
lines changed

boards/aludel_elixir_ns.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ CONFIG_GOLIOTH_SAMPLE_NRF91_LTE_MONITOR=y
3232
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED=n
3333
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED=n
3434

35+
# MbedTLS configuration to support p-384 curve. These options
36+
# enable using the MbedTLS built-in support for operations not
37+
# supported by the default nRF Oberon crypto backend
38+
CONFIG_NORDIC_SECURITY_BACKEND=n
39+
CONFIG_MBEDTLS_LEGACY_CRYPTO_C=y
40+
3541
# Add Network Info Support
3642
CONFIG_MODEM_INFO=y
3743

boards/aludel_mini_nrf9160_ns.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ CONFIG_GOLIOTH_SAMPLE_NRF91_LTE_MONITOR=y
3232
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED=n
3333
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED=n
3434

35+
# MbedTLS configuration to support p-384 curve. These options
36+
# enable using the MbedTLS built-in support for operations not
37+
# supported by the default nRF Oberon crypto backend
38+
CONFIG_NORDIC_SECURITY_BACKEND=n
39+
CONFIG_MBEDTLS_LEGACY_CRYPTO_C=y
40+
3541
# Battery Support
3642
CONFIG_ALUDEL_BATTERY_MONITOR=y
3743

prj.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ CONFIG_GOLIOTH_STREAM=y
1616
CONFIG_GOLIOTH_SAMPLE_COMMON=y
1717

1818
# Configure Golioth SDK dependencies
19-
CONFIG_EVENTFD_MAX=14
19+
CONFIG_ZVFS_EVENTFD_MAX=14
20+
CONFIG_ZVFS_OPEN_MAX=23
2021
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1536
2122
CONFIG_MBEDTLS_ENABLE_HEAP=y
2223
CONFIG_MBEDTLS_HEAP_SIZE=10240
2324
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=2048
2425
CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048
2526
CONFIG_NETWORKING=y
2627
CONFIG_NET_IPV4=y
27-
CONFIG_POSIX_MAX_FDS=23
2828

2929
# Application
3030
CONFIG_MAIN_STACK_SIZE=2048

src/app_sensors.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ static struct golioth_client *client;
2727
/* Add Sensor structs here */
2828

2929
/* Callback for LightDB Stream */
30-
static void async_error_handler(struct golioth_client *client,
31-
const struct golioth_response *response, const char *path,
30+
static void async_error_handler(struct golioth_client *client, enum golioth_status status,
31+
const struct golioth_coap_rsp_code *coap_rsp_code, const char *path,
3232
void *arg)
3333
{
34-
if (response->status != GOLIOTH_OK) {
35-
LOG_ERR("Async task failed: %d", response->status);
34+
if (status != GOLIOTH_OK) {
35+
LOG_ERR("Async task failed: %d", status);
3636
return;
3737
}
3838
}

src/app_state.c

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ uint32_t _example_int1 = 1;
2424
static struct golioth_client *client;
2525

2626
static void async_handler(struct golioth_client *client,
27-
const struct golioth_response *response,
28-
const char *path,
29-
void *arg)
27+
enum golioth_status status,
28+
const struct golioth_coap_rsp_code *coap_rsp_code,
29+
const char *path,
30+
void *arg)
3031
{
31-
if (response->status != GOLIOTH_OK) {
32-
LOG_WRN("Failed to set state: %d", response->status);
32+
if (status != GOLIOTH_OK) {
33+
LOG_WRN("Failed to set state: %d", status);
3334
return;
3435
}
3536

@@ -81,20 +82,16 @@ int app_state_update_actual(void)
8182
return err;
8283
}
8384

84-
static void app_state_desired_handler(struct golioth_client *client,
85-
const struct golioth_response *response,
86-
const char *path,
87-
const uint8_t *payload,
88-
size_t payload_size,
85+
static void app_state_desired_handler(struct golioth_client *client, enum golioth_status status,
86+
const struct golioth_coap_rsp_code *coap_rsp_code,
87+
const char *path, const uint8_t *payload, size_t payload_size,
8988
void *arg)
9089
{
9190
int err = 0;
9291
int ret;
9392

94-
if (response->status != GOLIOTH_OK) {
95-
LOG_ERR("Failed to receive '%s' endpoint: %d",
96-
APP_STATE_DESIRED_ENDP,
97-
response->status);
93+
if (status != GOLIOTH_OK) {
94+
LOG_ERR("Failed to receive '%s' endpoint: %d", APP_STATE_DESIRED_ENDP, status);
9895
return;
9996
}
10097

src/battery_monitor/battery.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ void log_battery_data(void)
310310
LOG_INF("Battery measurement: voltage=%s, level=%s", get_batt_v_str(), get_batt_lvl_str());
311311
}
312312

313-
static void async_error_handler(struct golioth_client *client,
314-
const struct golioth_response *response, const char *path,
313+
static void async_error_handler(struct golioth_client *client, enum golioth_status status,
314+
const struct golioth_coap_rsp_code *coap_rsp_code, const char *path,
315315
void *arg)
316316
{
317-
if (response->status != GOLIOTH_OK) {
318-
LOG_ERR("Failed to stream battery data: %d", response->status);
317+
if (status != GOLIOTH_OK) {
318+
LOG_ERR("Failed to stream battery data: %d", status);
319319
return;
320320
}
321321
}

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manifest:
77
projects:
88
- name: golioth
99
path: modules/lib/golioth-firmware-sdk
10-
revision: v0.15.0
10+
revision: v0.16.0
1111
url: https://github.com/golioth/golioth-firmware-sdk.git
1212
west-commands: scripts/west-commands.yml
1313
submodules: true

0 commit comments

Comments
 (0)