Skip to content

Commit 7706ced

Browse files
committed
Merge branch 'feat/add_bthome_components_and_example' into 'master'
feat(ble): add bthome components and example See merge request ae_group/esp-iot-solution!1280
2 parents 0d76d55 + dc06462 commit 7706ced

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2449
-86
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ test_multi_heap_host
8484
# VS Code Settings
8585
.vscode/
8686

87+
# Cursor Settings
88+
.cursor/
89+
8790
# VIM files
8891
*.swp
8992
*.swo

.gitlab/ci/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,12 +1066,18 @@ build_components_bluetooth_ble_hci_test_apps:
10661066
extends:
10671067
- .build_examples_template
10681068
- .rules:build:components_bluetooth_ble_hci_test_apps
1069-
parallel:
1070-
matrix:
1071-
- IMAGE: espressif/idf:release-v5.2
1069+
- .build_idf_version_greater_equal_v5_0
10721070
variables:
10731071
EXAMPLE_DIR: components/bluetooth/ble_hci/test_apps
10741072

1073+
build_components_bluetooth_ble_adv_bthome_test_apps:
1074+
extends:
1075+
- .build_examples_template
1076+
- .rules:build:components_bluetooth_ble_adv_bthome_test_apps
1077+
- .build_idf_version_greater_equal_v5_0
1078+
variables:
1079+
EXAMPLE_DIR: components/bluetooth/ble_adv/bthome/test_apps
1080+
10751081
build_components_button_test_apps:
10761082
extends:
10771083
- .build_examples_template

.gitlab/ci/rules.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
- "components/bluetooth/ble_hci/**/*"
5353
- "tools/cmake_utilities/package_manager.cmake"
5454

55+
.patterns-components_bluetooth_ble_adv_bthome: &patterns-components_bluetooth_ble_adv_bthome
56+
- "components/bluetooth/ble_adv/bthome/**/*"
57+
- "tools/cmake_utilities/package_manager.cmake"
58+
5559
.patterns-components_bootloader_support_plus: &patterns-components_bootloader_support_plus
5660
- "components/bootloader_support_plus/**/*"
5761
- "components/utilities/xz/**/*"
@@ -1867,6 +1871,17 @@
18671871
- <<: *if-dev-push
18681872
changes: *patterns-components_bluetooth_ble_hci
18691873

1874+
.rules:build:components_bluetooth_ble_adv_bthome_test_apps:
1875+
rules:
1876+
- <<: *if-protected
1877+
- <<: *if-label-build
1878+
- <<: *if-label-target_test
1879+
- <<: *if-trigger-job
1880+
- <<: *if-dev-push
1881+
changes: *patterns-build_system
1882+
- <<: *if-dev-push
1883+
changes: *patterns-components_bluetooth_ble_adv_bthome
1884+
18701885
.rules:build:component_bus_test:
18711886
rules:
18721887
- <<: *if-protected

components/.build-rules.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,8 @@ components/sensors/power_monitor/ina236/test_apps:
231231

232232
components/bluetooth/ble_hci/test_apps:
233233
enable:
234-
- if: IDF_TARGET in ["esp32","esp32c3","esp32s3"]
234+
- if: IDF_TARGET in ["esp32","esp32c3","esp32s3"] and IDF_VERSION_MAJOR >= 5
235+
236+
components/bluetooth/ble_adv/bthome/test_apps:
237+
enable:
238+
- if: IDF_TARGET in ["esp32","esp32c3","esp32h2","esp32s3","esp32c2","esp32c6"] and IDF_VERSION_MAJOR >= 5
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# ChangeLog
2+
3+
## v0.1.0 - 2025/04/29
4+
5+
This is the first version for BTHome component in Espressif Component Registry.
6+
7+
Features:
8+
- Support BTHome V2 protocol
9+
- Support encrypted and non-encrypted modes
10+
- Support the following features:
11+
- Sensor data reporting
12+
- Binary sensor data reporting
13+
- Event data reporting
14+
- Button event handling
15+
- Dimmer event handling
16+
- Support NVS storage configuration
17+
- Support custom callbacks
18+
- Provide example code:
19+
- Bulb example
20+
- Dimmer example
21+
22+
Bug Fixes:
23+
- Fixed memory leak issues
24+
- Fixed bugs in encryption/decryption process
25+
- Fixed logical errors in event handling
26+
27+
Optimizations:
28+
- Optimized code structure
29+
- Optimized memory usage
30+
- Optimized error handling
31+
- Added detailed comments
32+
- Improved log output
33+
34+
Known Issues:
35+
- None
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
idf_component_register(SRCS "bthome_v2.c"
2+
INCLUDE_DIRS "include"
3+
REQUIRES mbedtls)

0 commit comments

Comments
 (0)