Skip to content

Commit a4e6e79

Browse files
committed
Update sdk version and example
Signed-off-by: Luca Arato <[email protected]>
1 parent a4d9393 commit a4e6e79

17 files changed

+378
-265
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,9 @@ doc/out
5151

5252
# VS code config
5353
.vscode/
54+
55+
# LSP cache
56+
.cache
57+
58+
# Private files
59+
*.priv

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
### Changed
9-
- Bump Astarte Device SDK to v1.2.0.
9+
- Bump Astarte Device SDK to v1.3.1.
1010

1111
## [0.7.1] - 2023-09-19
1212
### Changed

examples/edgehog_app/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@
2222
# CMakeLists in this exact order for cmake to work correctly
2323
cmake_minimum_required(VERSION 3.5)
2424

25+
# Get the absolute path of the current directory
26+
get_filename_component(CURRENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
27+
# Construct the absolute path to sdkconfig.priv
28+
set(SDKCONFIG_PRIV_PATH "${CURRENT_DIR}/sdkconfig.priv")
29+
# Construct the absolute path to sdkconfig.defaults
30+
set(SDKCONFIG_DEFAULTS_PATH "${CURRENT_DIR}/sdkconfig.defaults")
31+
# Check if sdkconfig.priv exists and add it to SDKCONFIG_DEFAULTS
32+
if(EXISTS "${SDKCONFIG_PRIV_PATH}")
33+
if(EXISTS "${SDKCONFIG_DEFAULTS_PATH}")
34+
set(SDKCONFIG_DEFAULTS "sdkconfig.defaults;sdkconfig.priv")
35+
else()
36+
set(SDKCONFIG_DEFAULTS "sdkconfig.priv")
37+
endif()
38+
endif()
39+
2540
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
2641

2742
set(PROJECT_VER "0.1.0")

examples/edgehog_app/Makefile

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/edgehog_app/edgehog_partition_example.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ phy_init, data, phy, 0xf000, 0x1000,
2727
factory, app, factory, , 0x12c000,
2828
ota_0, app, ota_0, , 0x12c000,
2929
ota_1, app, ota_1, , 0x12c000,
30+
astarte, data, nvs, , 200K,
31+
edgehog, data, nvs, , 200K,

examples/edgehog_app/main/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
# SPDX-License-Identifier: Apache-2.0
1919
#
2020

21-
idf_component_register(SRCS "main.c" "./src/wifi_cfg.c" "./src/example_task.c"
21+
idf_component_register(SRCS "main.c" "./src/wifi.c" "./src/example_task.c"
2222
INCLUDE_DIRS "./include"
2323
REQUIRES edgehog-esp32-device nvs_flash)

examples/edgehog_app/main/Kconfig.projbuild

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,92 @@
2020

2121
menu "Edgehog example"
2222

23-
config WIFI_SSID
24-
string "WiFi SSID"
25-
default "myssid"
23+
menu "Astarte device configuration"
24+
25+
config CREDENTIALS_SECRET
26+
string "Credentials secret"
27+
default ""
2628
help
27-
SSID (network name) for the example to connect to.
29+
Astarte device credential secret, generated when the device is added on an Astarte
30+
instance.
2831

29-
config WIFI_PASSWORD
30-
string "WiFi Password"
31-
default "mypassword"
32+
config DEVICE_ID
33+
string "Device hardware ID"
34+
default ""
3235
help
33-
WiFi password (WPA or WPA2) for the example to use.
36+
Astarte device hardware id, generated when the device is added on an Astarte instance.
37+
38+
endmenu
39+
40+
menu "WiFi configuration"
41+
42+
config WIFI_SSID
43+
string "WiFi SSID"
44+
default "myssid"
45+
help
46+
SSID (network name) for the demo to connect to.
47+
48+
config WIFI_PASSWORD
49+
string "WiFi Password"
50+
default "mypassword"
51+
help
52+
WiFi password (WPA or WPA2) for the demo to use.
53+
54+
choice WIFI_SAE_MODE
55+
prompt "WPA3 SAE mode selection"
56+
default ESP_WPA3_SAE_PWE_BOTH
57+
help
58+
Select mode for SAE as Hunt and Peck, H2E or both.
59+
config ESP_WPA3_SAE_PWE_HUNT_AND_PECK
60+
bool "HUNT AND PECK"
61+
config ESP_WPA3_SAE_PWE_HASH_TO_ELEMENT
62+
bool "H2E"
63+
config ESP_WPA3_SAE_PWE_BOTH
64+
bool "BOTH"
65+
endchoice
66+
67+
config WIFI_PW_ID
68+
string "PASSWORD IDENTIFIER"
69+
depends on ESP_WPA3_SAE_PWE_HASH_TO_ELEMENT|| ESP_WPA3_SAE_PWE_BOTH
70+
default ""
71+
help
72+
password identifier for SAE H2E
73+
74+
config ESP_MAXIMUM_RETRY
75+
int "Maximum retry"
76+
default 5
77+
help
78+
Set the Maximum retry to avoid station reconnecting to the AP unlimited when the AP
79+
is really inexistent.
80+
81+
choice WIFI_SCAN_AUTH_MODE_THRESHOLD
82+
prompt "WiFi Scan auth mode threshold"
83+
default WIFI_AUTH_WPA2_PSK
84+
help
85+
The weakest authmode to accept in the scan mode.
86+
This value defaults to WIFI_AUTH_WPA2_PSK incase password is present and
87+
WIFI_AUTH_OPEN is used.
88+
Please select WIFI_AUTH_WEP/WIFI_AUTH_WPA_PSK incase AP is operating in WEP/WPA
89+
mode.
90+
91+
config WIFI_AUTH_OPEN
92+
bool "OPEN"
93+
config WIFI_AUTH_WEP
94+
bool "WEP"
95+
config WIFI_AUTH_WPA_PSK
96+
bool "WPA PSK"
97+
config WIFI_AUTH_WPA2_PSK
98+
bool "WPA2 PSK"
99+
config WIFI_AUTH_WPA_WPA2_PSK
100+
bool "WPA/WPA2 PSK"
101+
config WIFI_AUTH_WPA3_PSK
102+
bool "WPA3 PSK"
103+
config WIFI_AUTH_WPA2_WPA3_PSK
104+
bool "WPA2/WPA3 PSK"
105+
config WIFI_AUTH_WAPI_PSK
106+
bool "WAPI PSK"
107+
endchoice
108+
109+
endmenu
110+
34111
endmenu

examples/edgehog_app/main/component.mk

Lines changed: 0 additions & 26 deletions
This file was deleted.

examples/edgehog_app/main/include/example_task.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
#ifndef EXAMPLE_TASK_H
2222
#define EXAMPLE_TASK_H
2323

24+
#define ASTARTE_PARTITION_NAME "astarte"
25+
#define EDGEHOG_PARTITION_NAME "edgehog"
26+
2427
/**
2528
* @brief Edgehog configuration task.
2629
*
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* (C) Copyright 2024, SECO Mind Srl
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef WIFI_H
8+
#define WIFI_H
9+
10+
void wifi_init_sta(void);
11+
12+
#endif /* WIFI_H */

0 commit comments

Comments
 (0)