Skip to content

Commit

Permalink
post merge cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Puric <marko@golioth.io>
  • Loading branch information
MarkoPura committed May 23, 2024
1 parent 5cb168c commit 94e010f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 34 deletions.
10 changes: 0 additions & 10 deletions boards/adafruit_feather_nrf52840.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ CONFIG_MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

# Golioth-specific configuration
CONFIG_GOLIOTH=y
CONFIG_GOLIOTH_SYSTEM_CLIENT=y

CONFIG_LOG_BACKEND_GOLIOTH=y
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048

#Increase TLS message size
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=1400

CONFIG_THREAD_NAME=y
CONFIG_SCHED_CPU_MASK=y
CONFIG_THREAD_ANALYZER=y
Expand Down
12 changes: 1 addition & 11 deletions boards/nrf52840dk_nrf52840.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024 Golioth, Inc.
# Copyright (c) 2024 Golioth, Inc.
# SPDX-License-Identifier: Apache-2.0

CONFIG_LOG=y
Expand Down Expand Up @@ -26,16 +26,6 @@ CONFIG_MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

# Golioth-specific configuration
CONFIG_GOLIOTH=y
CONFIG_GOLIOTH_SYSTEM_CLIENT=y

CONFIG_LOG_BACKEND_GOLIOTH=y
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048

#Increase TLS message size
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=1400

CONFIG_THREAD_NAME=y
CONFIG_SCHED_CPU_MASK=y
CONFIG_THREAD_ANALYZER=y
Expand Down
5 changes: 2 additions & 3 deletions prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CONFIG_GOLIOTH_SAMPLE_COMMON=y

# Configure Golioth SDK dependencies
CONFIG_EVENTFD_MAX=14
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1536
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=10240
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=2048
Expand Down Expand Up @@ -51,15 +51,14 @@ CONFIG_GOLIOTH_SAMPLE_SETTINGS_SHELL=y

# Misc.
CONFIG_JSON_LIBRARY=y
CONFIG_NETWORK_INFO=y
# Longer response length needed for network info
CONFIG_GOLIOTH_RPC_MAX_RESPONSE_LEN=512

# Generate MCUboot compatible images
CONFIG_BOOTLOADER_MCUBOOT=y

# Firmware version used in DFU process
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="2.1.0"
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="1.0.0"

# IMPORTANT: Change the Thread network credentials to match your Thread network setup
CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y
Expand Down
10 changes: 1 addition & 9 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ static const struct gpio_dt_spec golioth_led = GPIO_DT_SPEC_GET(DT_ALIAS(golioth
static const struct gpio_dt_spec user_btn = GPIO_DT_SPEC_GET(DT_ALIAS(user_btn), gpios);
#endif /* DT_NODE_EXISTS(DT_ALIAS(golioth_led)) */

static const struct gpio_dt_spec user_btn = GPIO_DT_SPEC_GET(DT_ALIAS(user_btn), gpios);
static struct gpio_callback button_cb_data;

static struct k_work on_connect_work;
Expand Down Expand Up @@ -107,6 +106,7 @@ static void start_golioth_client(void)
/* Register RPC service */
app_rpc_register(client);
}

static void on_thread_state_changed(otChangedFlags flags, struct openthread_context *ot_context,
void *user_data)
{
Expand All @@ -129,7 +129,6 @@ static void on_thread_state_changed(otChangedFlags flags, struct openthread_cont

if (flags == OT_CHANGED_IP6_ADDRESS_ADDED) {
start_golioth_client();

}
}

Expand Down Expand Up @@ -186,13 +185,6 @@ int main(void)
}
#endif /* #if DT_NODE_EXISTS(DT_ALIAS(golioth_led)) */

/* If nRF9160 is not used, start the Golioth Client and block until connected */

/* Run WiFi/DHCP if necessary */
if (IS_ENABLED(CONFIG_GOLIOTH_SAMPLE_COMMON)) {
net_connect();
}

/* Set up user button */
err = gpio_pin_configure_dt(&user_btn, GPIO_INPUT);
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ manifest:
projects:
- name: golioth
path: modules/lib/golioth-firmware-sdk
revision: v0.12.2
revision: e4a30b70d64d311c50e3e0a82d4f83d3921e5d2d
url: https://github.com/golioth/golioth-firmware-sdk.git
west-commands: scripts/west-commands.yml
submodules: true
Expand Down

0 comments on commit 94e010f

Please sign in to comment.