diff --git a/CHANGELOG.md b/CHANGELOG.md index a94d72234..305a9b6d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed ### Changed +- Mesh: move GATT Services into src/mesh/gatt-service ## Release v1.5.4 diff --git a/example/Makefile.inc b/example/Makefile.inc index b994c75c4..c4b83b89a 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -4,6 +4,7 @@ VPATH += ${BTSTACK_ROOT}/src/ble VPATH += ${BTSTACK_ROOT}/src/ble/gatt-service VPATH += ${BTSTACK_ROOT}/src/classic VPATH += ${BTSTACK_ROOT}/src/mesh +VPATH += ${BTSTACK_ROOT}/src/mesh/gatt-service VPATH += ${BTSTACK_ROOT}/example VPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce VPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce diff --git a/port/libusb/CMakeLists.txt b/port/libusb/CMakeLists.txt index 094cbef07..c31cf0da2 100644 --- a/port/libusb/CMakeLists.txt +++ b/port/libusb/CMakeLists.txt @@ -78,7 +78,7 @@ file(GLOB SOURCES_SRC "../../src/*.c" "../../example/sco_demo_util.c") file(GLOB SOURCES_BLE "../../src/ble/*.c") file(GLOB SOURCES_GATT "../../src/ble/gatt-service/*.c") file(GLOB SOURCES_CLASSIC "../../src/classic/*.c") -file(GLOB SOURCES_MESH "../../src/mesh/*.c") +file(GLOB SOURCES_MESH "../../src/mesh/*.c" "../../src/mesh/gatt-service/*.c") file(GLOB SOURCES_BLUEDROID "../../3rd-party/bluedroid/encoder/srce/*.c" "../../3rd-party/bluedroid/decoder/srce/*.c") file(GLOB SOURCES_MD5 "../../3rd-party/md5/md5.c") file(GLOB SOURCES_UECC "../../3rd-party/micro-ecc/uECC.c") diff --git a/src/btstack.h b/src/btstack.h index c96cadd5c..b82e3f8cd 100644 --- a/src/btstack.h +++ b/src/btstack.h @@ -106,8 +106,8 @@ #include "ble/gatt-service/volume_control_service_server.h" #include "ble/gatt-service/volume_offset_control_service_server.h" #ifdef ENABLE_MESH -#include "ble/gatt-service/mesh_provisioning_service_server.h" -#include "ble/gatt-service/mesh_proxy_service_server.h" +#include "mesh/gatt-service/mesh_provisioning_service_server.h" +#include "mesh/gatt-service/mesh_proxy_service_server.h" #endif #include "ble/gatt_client.h" #include "ble/le_device_db.h" @@ -157,11 +157,11 @@ #endif #ifdef ENABLE_MESH -#include "ble/gatt-service/mesh_provisioning_service_server.h" -#include "ble/gatt-service/mesh_proxy_service_server.h" #include "mesh/adv_bearer.h" #include "mesh/beacon.h" #include "mesh/gatt_bearer.h" +#include "mesh/gatt-service/mesh_provisioning_service_server.h" +#include "mesh/gatt-service/mesh_proxy_service_server.h" #include "mesh/mesh.h" #include "mesh/mesh_access.h" #include "mesh/mesh_configuration_client.h" diff --git a/src/ble/gatt-service/mesh_provisioning_service.gatt b/src/mesh/gatt-service/mesh_provisioning_service.gatt similarity index 100% rename from src/ble/gatt-service/mesh_provisioning_service.gatt rename to src/mesh/gatt-service/mesh_provisioning_service.gatt diff --git a/src/ble/gatt-service/mesh_provisioning_service_server.c b/src/mesh/gatt-service/mesh_provisioning_service_server.c similarity index 99% rename from src/ble/gatt-service/mesh_provisioning_service_server.c rename to src/mesh/gatt-service/mesh_provisioning_service_server.c index df45cbf6b..10934e408 100644 --- a/src/ble/gatt-service/mesh_provisioning_service_server.c +++ b/src/mesh/gatt-service/mesh_provisioning_service_server.c @@ -37,7 +37,7 @@ #define BTSTACK_FILE__ "mesh_provisioning_service_server.c" -#include "ble/gatt-service/mesh_provisioning_service_server.h" +#include "mesh/gatt-service/mesh_provisioning_service_server.h" #include "ble/att_db.h" #include "ble/att_server.h" diff --git a/src/ble/gatt-service/mesh_provisioning_service_server.h b/src/mesh/gatt-service/mesh_provisioning_service_server.h similarity index 100% rename from src/ble/gatt-service/mesh_provisioning_service_server.h rename to src/mesh/gatt-service/mesh_provisioning_service_server.h diff --git a/src/ble/gatt-service/mesh_proxy_service.gatt b/src/mesh/gatt-service/mesh_proxy_service.gatt similarity index 100% rename from src/ble/gatt-service/mesh_proxy_service.gatt rename to src/mesh/gatt-service/mesh_proxy_service.gatt diff --git a/src/ble/gatt-service/mesh_proxy_service_server.c b/src/mesh/gatt-service/mesh_proxy_service_server.c similarity index 99% rename from src/ble/gatt-service/mesh_proxy_service_server.c rename to src/mesh/gatt-service/mesh_proxy_service_server.c index f00b73d05..27436f980 100644 --- a/src/ble/gatt-service/mesh_proxy_service_server.c +++ b/src/mesh/gatt-service/mesh_proxy_service_server.c @@ -37,7 +37,7 @@ #define BTSTACK_FILE__ "mesh_proxy_service_server.c" -#include "ble/gatt-service/mesh_proxy_service_server.h" +#include "mesh/gatt-service/mesh_proxy_service_server.h" #include "ble/att_db.h" #include "ble/att_server.h" diff --git a/src/ble/gatt-service/mesh_proxy_service_server.h b/src/mesh/gatt-service/mesh_proxy_service_server.h similarity index 100% rename from src/ble/gatt-service/mesh_proxy_service_server.h rename to src/mesh/gatt-service/mesh_proxy_service_server.h diff --git a/src/mesh/gatt_bearer.c b/src/mesh/gatt_bearer.c index 13b3766d7..df5c14106 100644 --- a/src/mesh/gatt_bearer.c +++ b/src/mesh/gatt_bearer.c @@ -39,19 +39,19 @@ #include -#include "ble/gatt-service/mesh_proxy_service_server.h" #include "ble/att_server.h" -#include "mesh/gatt_bearer.h" #include "ble/core.h" #include "bluetooth.h" #include "bluetooth_data_types.h" #include "bluetooth_gatt.h" #include "btstack_debug.h" -#include "btstack_util.h" +#include "btstack_event.h" +#include "btstack_event.h" #include "btstack_run_loop.h" -#include "btstack_event.h" +#include "btstack_util.h" #include "gap.h" -#include "btstack_event.h" +#include "mesh/gatt-service/mesh_proxy_service_server.h" +#include "mesh/gatt_bearer.h" #include "provisioning.h" #define NUM_TYPES 3 diff --git a/src/mesh/pb_gatt.c b/src/mesh/pb_gatt.c index aee149791..37d0e36bc 100644 --- a/src/mesh/pb_gatt.c +++ b/src/mesh/pb_gatt.c @@ -43,7 +43,7 @@ #include #include "ble/att_server.h" -#include "ble/gatt-service/mesh_provisioning_service_server.h" +#include "mesh/gatt-service/mesh_provisioning_service_server.h" #include "btstack_debug.h" #include "btstack_event.h" diff --git a/test/mesh/CMakeLists.txt b/test/mesh/CMakeLists.txt index 3746af29c..d7ddb637b 100644 --- a/test/mesh/CMakeLists.txt +++ b/test/mesh/CMakeLists.txt @@ -21,16 +21,17 @@ link_directories(${LIBUSB_LIBRARY_DIRS}) link_libraries(${LIBUSB_LIBRARIES}) include_directories(../../3rd-party/micro-ecc) +include_directories(../../3rd-party/rijndael) include_directories(../../3rd-party/tinydir) +include_directories(../../3rd-party/lc3-google/include/) include_directories(../../src) include_directories(../../platform/posix) -include_directories(../../3rd-party/rijndael) include_directories(.) file(GLOB SOURCES_SRC "../../src/*.c" "../../src/*.h" "../../example/sco_demo_util.c" "../../example/sco_demo_util.h") file(GLOB SOURCES_BLE "../../src/ble/*.c" "../../src/ble/*.h") file(GLOB SOURCES_GATT "../../src/ble/gatt-service/*.c" "../../src/ble/gatt-service/*.h") -file(GLOB SOURCES_MESH "../../src/mesh/*.c" "../../src/mesh/*.h" ) +file(GLOB SOURCES_MESH "../../src/mesh/*.c" "../../src/mesh/*.h" "../../src/mesh/gatt-service/*.c") file(GLOB SOURCES_UECC "../../3rd-party/micro-ecc/uECC.c" "../../3rd-party/micro-ecc/uECC.h") file(GLOB SOURCES_POSIX "../../platform/posix/*.c" "../../platform/posix/*.h") file(GLOB SOURCES_LIBUSB "../../platform/libusb/*.c" "../../platform/libusb/*.h") @@ -101,6 +102,7 @@ add_executable(mesh_message_test ../../src/btstack_crypto.c ../../src/btstack_linked_list.c ../../src/hci_dump.c +../../platform/posix/hci_dump_posix_fs.c ../../src/hci_cmd.c ../../3rd-party/micro-ecc/uECC.c ../../3rd-party/rijndael/rijndael.c @@ -122,6 +124,7 @@ mock.c ../../src/btstack_linked_list.c ../../src/hci_cmd.c ../../src/hci_dump.c +../../platform/posix/hci_dump_posix_fs.c ) message("example provisioning_provisioner_test") @@ -138,6 +141,7 @@ mock.c ../../src/btstack_linked_list.c ../../src/hci_cmd.c ../../src/hci_dump.c +../../platform/posix/hci_dump_posix_fs.c ) message("example mesh_configuration_composition_data_message_test") diff --git a/test/mesh/provisioning_device_test.cpp b/test/mesh/provisioning_device_test.cpp index 40d797385..c0f5f58f3 100644 --- a/test/mesh/provisioning_device_test.cpp +++ b/test/mesh/provisioning_device_test.cpp @@ -38,7 +38,7 @@ #include #include #include "btstack_memory.h" -#include "ble/gatt-service/mesh_provisioning_service_server.h" +#include "mesh/gatt-service/mesh_provisioning_service_server.h" #include "hci_dump.h" #include "hci_dump_posix_fs.h" #include "mesh/mesh_node.h" diff --git a/test/mesh/provisioning_provisioner_test.cpp b/test/mesh/provisioning_provisioner_test.cpp index cc369e50e..a54009b3f 100644 --- a/test/mesh/provisioning_provisioner_test.cpp +++ b/test/mesh/provisioning_provisioner_test.cpp @@ -41,7 +41,7 @@ #include #include "mesh/pb_adv.h" #include "mesh/pb_gatt.h" -#include "ble/gatt-service/mesh_provisioning_service_server.h" +#include "mesh/gatt-service/mesh_provisioning_service_server.h" #include "mesh/provisioning.h" #include "mesh/provisioning_provisioner.h" #include "hci_dump.h" diff --git a/tool/compile_gatt.py b/tool/compile_gatt.py index 01fc91730..167fb6701 100755 --- a/tool/compile_gatt.py +++ b/tool/compile_gatt.py @@ -1046,7 +1046,12 @@ def getFile( fileName ): btstack_root = os.path.abspath(os.path.dirname(sys.argv[0]) + '/..') -default_includes = [os.path.normpath(path) for path in [ btstack_root + '/src/', btstack_root + '/src/ble/gatt-service/']] +default_includes = [os.path.normpath(path) for path in [ + btstack_root + '/src/', + btstack_root + '/src/ble/gatt-service/', + btstack_root + '/src/le-audio/gatt-service/', + btstack_root + '/src/mesh/gatt-service/' +]] parser = argparse.ArgumentParser(description='BLE GATT configuration generator for use with BTstack')