Skip to content

Commit

Permalink
Merge pull request #212 from sorru94/fwd-changes-from-v1.3
Browse files Browse the repository at this point in the history
Fwd port changes from v1.3
  • Loading branch information
harlem88 authored Sep 4, 2024
2 parents c280c0a + 3bdfadc commit c33262a
Show file tree
Hide file tree
Showing 33 changed files with 291 additions and 53 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# This file is part of Astarte.
#
# Copyright 2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0
#

name: ESP registry publish

on:
push:
tags:
- 'v*'

jobs:
publish:
name: Publish release to the ESP registry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Upload component to the component registry
uses: espressif/upload-components-ci-action@v1
with:
name: "astarte-device-sdk-esp32"
version: ${{ github.ref_name }}
namespace: "astarte-platform"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/reuse-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
uses: fsfe/reuse-action@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies.lock
managed_components
doc/out
.vscode
dist

# Files related to clang-tidy
warnings.txt
Expand Down
3 changes: 0 additions & 3 deletions .reuse/dep5

This file was deleted.

18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.3.3] - 2024-09-04
### Fixed
- Correctly calling the incoming data callback.

## [1.3.2] - 2024-09-04 [YANKED]
### Added
- Automated publishing on the
[ESP registry](https://components.espressif.com/components/astarte-platform/astarte-device-sdk-esp32).

### Fixed
- Early exit on reception when data callback is not set.

## [1.3.1] - 2024-01-18
### Fixed
- Version number in `idf_component.yml`.

## [1.3.0] - 2023-12-18
### Added
- `user_data` field is added to the `astarte_device_config_t` and `astarte_device_*_event_t`
structs. This field can be used to pass user data to callback functions.
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ Astarte ESP32 SDK lets you connect your ESP32 device to
The SDK simplifies all the low-level operations like credentials generation, pairing and so on, and
exposes a high-level API to publish data from your device.

Have a look at the [examples](examples/README.md) for a usage example showing how to send and
receive data.
Check out the examples on the right pane of the
[astarte-device-sdk-esp32](https://components.espressif.com/components/astarte-platform/astarte-device-sdk-esp32)
component page or on the
[GitHub repository](https://github.com/astarte-platform/astarte-device-sdk-esp32/tree/master/examples/README.md)
.

## Documentation

Expand Down
8 changes: 8 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# (C) Copyright 2024, SECO Mind Srl
#
# SPDX-License-Identifier: Apache-2.0

version = 1
SPDX-PackageName = "Astarte Device SDK ESP32"
SPDX-PackageDownloadLocation = "https://github.com/astarte-platform/astarte-device-sdk-esp32"
annotations = []
7 changes: 5 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@

| Version | Supported |
| ------- | ------------------ |
| 0.10.x | :x: |
| 1.3.x | :white_check_mark: |
| 1.2.x | :white_check_mark: |
| 1.1.x | :white_check_mark: |
| 1.0.x | :x: |
| 0.11.x | :x: |
| 1.0.x | :white_check_mark: |
| 0.10.x | :x: |

## Reporting a Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion doc/docmain.dox
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @mainpage Astarte Device SDK ESP32 Documentation

@version 1.2.99
@version 1.3.3

* The Astarte device SDK allows connecting an ESP32 device to Astarte.
*
Expand Down
2 changes: 0 additions & 2 deletions examples/aggregates/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/../..)

project(aggregates)
26 changes: 26 additions & 0 deletions examples/aggregates/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# This file is part of Astarte.
#
# Copyright 2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0
#

description: Example for transmission and reception of aggregated datastreams
dependencies:
idf: ">=4.4"
astarte-platform/astarte-device-sdk-esp32:
version: '1.3.3'
override_path: '../../../' # three levels up, pointing the directory with the component itself
2 changes: 1 addition & 1 deletion examples/aggregates/main/src/wifi_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void wifi_init(void)
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();

wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); // NOLINT
ESP_ERROR_CHECK(esp_wifi_init(&cfg));

esp_event_handler_instance_t instance_any_id = NULL;
Expand Down
2 changes: 0 additions & 2 deletions examples/datastreams/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/../..)

project(datastreams)
26 changes: 26 additions & 0 deletions examples/datastreams/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# This file is part of Astarte.
#
# Copyright 2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0
#

description: Example for transmission and reception of individual datastreams
dependencies:
idf: ">=4.4"
astarte-platform/astarte-device-sdk-esp32:
version: '1.3.3'
override_path: '../../../' # three levels up, pointing the directory with the component itself
2 changes: 1 addition & 1 deletion examples/datastreams/main/src/wifi_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void wifi_init(void)
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();

wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); // NOLINT
ESP_ERROR_CHECK(esp_wifi_init(&cfg));

esp_event_handler_instance_t instance_any_id = NULL;
Expand Down
2 changes: 0 additions & 2 deletions examples/encryption/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/../..)

project(encryption)
26 changes: 26 additions & 0 deletions examples/encryption/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# This file is part of Astarte.
#
# Copyright 2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0
#

description: Example for the use of the Astarte device SDK with encrypted flash partitions
dependencies:
idf: ">=4.4"
astarte-platform/astarte-device-sdk-esp32:
version: '1.3.3'
override_path: '../../../' # three levels up, pointing the directory with the component itself
2 changes: 1 addition & 1 deletion examples/encryption/main/src/wifi_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void wifi_init(void)
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();

wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); // NOLINT
ESP_ERROR_CHECK(esp_wifi_init(&cfg));

esp_event_handler_instance_t instance_any_id = NULL;
Expand Down
2 changes: 0 additions & 2 deletions examples/non_volatile_storage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/../..)

project(non-volatile-storage)
26 changes: 26 additions & 0 deletions examples/non_volatile_storage/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# This file is part of Astarte.
#
# Copyright 2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0
#

description: Example for the use of the Astarte device SDK with non volatile storage enabled
dependencies:
idf: ">=4.4"
astarte-platform/astarte-device-sdk-esp32:
version: '1.3.3'
override_path: '../../../' # three levels up, pointing the directory with the component itself
2 changes: 1 addition & 1 deletion examples/non_volatile_storage/main/src/wifi_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void wifi_init(void)
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();

wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); // NOLINT
ESP_ERROR_CHECK(esp_wifi_init(&cfg));

esp_event_handler_instance_t instance_any_id = NULL;
Expand Down
2 changes: 0 additions & 2 deletions examples/properties/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/../..)

project(properties)
26 changes: 26 additions & 0 deletions examples/properties/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# This file is part of Astarte.
#
# Copyright 2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0
#

description: Example for setting and unsetting individual properties
dependencies:
idf: ">=4.4"
astarte-platform/astarte-device-sdk-esp32:
version: '1.3.3'
override_path: '../../../' # three levels up, pointing the directory with the component itself
2 changes: 1 addition & 1 deletion examples/properties/main/src/wifi_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void wifi_init(void)
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();

wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); // NOLINT
ESP_ERROR_CHECK(esp_wifi_init(&cfg));

esp_event_handler_instance_t instance_any_id = NULL;
Expand Down
2 changes: 0 additions & 2 deletions examples/registration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/../..)

project(registration)
26 changes: 26 additions & 0 deletions examples/registration/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# This file is part of Astarte.
#
# Copyright 2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0
#

description: Example for on board registration using a JWT
dependencies:
idf: ">=4.4"
astarte-platform/astarte-device-sdk-esp32:
version: '1.3.3'
override_path: '../../../' # three levels up, pointing the directory with the component itself
2 changes: 1 addition & 1 deletion examples/registration/main/src/wifi_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void wifi_init(void)
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();

wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); // NOLINT
ESP_ERROR_CHECK(esp_wifi_init(&cfg));

esp_event_handler_instance_t instance_any_id = NULL;
Expand Down
2 changes: 0 additions & 2 deletions examples/toggle_led/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/../..)

project(toggle-led)
Loading

0 comments on commit c33262a

Please sign in to comment.