From e514a7f533c205a9d9a793ff09d181fcea9ebd1a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sat, 20 Jul 2019 09:32:04 +0200 Subject: [PATCH] port: configure desktop ports (libusb,posix,windows) for mesh --- .../btstack/include/btstack_config.h | 11 +++++----- port/libusb-intel/btstack_config.h | 16 ++++++++++++++ port/libusb/btstack_config.h | 21 +++++++++---------- port/posix-h4-atwilc3000/btstack_config.h | 17 +++++++++++++++ port/posix-h4-da14581/btstack_config.h | 16 ++++++++++++++ port/posix-h4-da14585/btstack_config.h | 17 +++++++++++++++ port/posix-h4-zephyr/btstack_config.h | 16 ++++++++++++++ port/posix-h4/btstack_config.h | 17 +++++++++++++++ port/posix-h5-bcm/btstack_config.h | 17 +++++++++++++++ port/posix-h5/btstack_config.h | 17 +++++++++++++++ port/raspi/btstack_config.h | 16 ++++++++++++++ port/windows-h4-zephyr/btstack_config.h | 17 +++++++++++++++ port/windows-h4/btstack_config.h | 18 ++++++++++++++++ port/windows-winusb-intel/btstack_config.h | 17 +++++++++++++++ port/windows-winusb/btstack_config.h | 17 +++++++++++++++ 15 files changed, 234 insertions(+), 16 deletions(-) diff --git a/port/esp32/components/btstack/include/btstack_config.h b/port/esp32/components/btstack/include/btstack_config.h index 6aa10370d..6854b7161 100644 --- a/port/esp32/components/btstack/include/btstack_config.h +++ b/port/esp32/components/btstack/include/btstack_config.h @@ -39,20 +39,19 @@ #define HCI_HOST_ACL_PACKET_LEN 1024 #define HCI_HOST_SCO_PACKET_NUM 10 #define HCI_HOST_SCO_PACKET_LEN 60 -#endif // Link Key DB and LE Device DB using TLV on top of Flash Sector interface #define NVM_NUM_LINK_KEYS 16 #define NVM_NUM_DEVICE_DB_ENTRIES 16 -// Mesh Config + +// Mesh Configuration +#define ENABLE_MESH #define ENABLE_MESH_ADV_BEARER #define ENABLE_MESH_GATT_BEARER -// #define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_ADV #define ENABLE_MESH_PB_GATT #define ENABLE_MESH_PROXY_SERVER - -#define ENABLE_MESH #define ENABLE_MESH_PROVISIONER #define MAX_NR_MESH_TRANSPORT_KEYS 16 @@ -61,3 +60,5 @@ // allow for one NetKey update #define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + +#endif diff --git a/port/libusb-intel/btstack_config.h b/port/libusb-intel/btstack_config.h index 66d77ad64..eaf5e4a49 100644 --- a/port/libusb-intel/btstack_config.h +++ b/port/libusb-intel/btstack_config.h @@ -33,4 +33,20 @@ #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/libusb/btstack_config.h b/port/libusb/btstack_config.h index 9d916bb75..be90d576f 100644 --- a/port/libusb/btstack_config.h +++ b/port/libusb/btstack_config.h @@ -26,24 +26,23 @@ #define ENABLE_LOG_INFO #define ENABLE_SCO_OVER_HCI #define ENABLE_SDP_DES_DUMP - #define ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE -// Mesh Config -#define ENABLE_MESH_ADV_BEARER -#define ENABLE_MESH_GATT_BEARER -// #define ENABLE_MESH_PB_ADV -#define ENABLE_MESH_PB_GATT -#define ENABLE_MESH_PROXY_SERVER - -#define ENABLE_MESH -#define ENABLE_MESH_PROVISIONER - // BTstack configuration. buffers, sizes, ... #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy #define MAX_NR_LE_DEVICE_DB_ENTRIES 4 + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + #define MAX_NR_MESH_TRANSPORT_KEYS 16 #define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 #define MAX_NR_MESH_SUBNETS 2 diff --git a/port/posix-h4-atwilc3000/btstack_config.h b/port/posix-h4-atwilc3000/btstack_config.h index a7f655737..810846bee 100644 --- a/port/posix-h4-atwilc3000/btstack_config.h +++ b/port/posix-h4-atwilc3000/btstack_config.h @@ -32,5 +32,22 @@ #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/posix-h4-da14581/btstack_config.h b/port/posix-h4-da14581/btstack_config.h index b4e6b9a41..4fa82fe9f 100644 --- a/port/posix-h4-da14581/btstack_config.h +++ b/port/posix-h4-da14581/btstack_config.h @@ -31,5 +31,21 @@ #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/posix-h4-da14585/btstack_config.h b/port/posix-h4-da14585/btstack_config.h index b4e6b9a41..62c383773 100644 --- a/port/posix-h4-da14585/btstack_config.h +++ b/port/posix-h4-da14585/btstack_config.h @@ -31,5 +31,22 @@ #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/posix-h4-zephyr/btstack_config.h b/port/posix-h4-zephyr/btstack_config.h index b4e6b9a41..4fa82fe9f 100644 --- a/port/posix-h4-zephyr/btstack_config.h +++ b/port/posix-h4-zephyr/btstack_config.h @@ -31,5 +31,21 @@ #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/posix-h4/btstack_config.h b/port/posix-h4/btstack_config.h index a405db158..bb39bb925 100644 --- a/port/posix-h4/btstack_config.h +++ b/port/posix-h4/btstack_config.h @@ -34,5 +34,22 @@ #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/posix-h5-bcm/btstack_config.h b/port/posix-h5-bcm/btstack_config.h index b837bbb59..c018a78b5 100644 --- a/port/posix-h5-bcm/btstack_config.h +++ b/port/posix-h5-bcm/btstack_config.h @@ -31,5 +31,22 @@ #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/posix-h5/btstack_config.h b/port/posix-h5/btstack_config.h index b837bbb59..c018a78b5 100644 --- a/port/posix-h5/btstack_config.h +++ b/port/posix-h5/btstack_config.h @@ -31,5 +31,22 @@ #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/raspi/btstack_config.h b/port/raspi/btstack_config.h index b837bbb59..e07c463b3 100644 --- a/port/raspi/btstack_config.h +++ b/port/raspi/btstack_config.h @@ -31,5 +31,21 @@ #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/windows-h4-zephyr/btstack_config.h b/port/windows-h4-zephyr/btstack_config.h index b319840a8..e094ab529 100644 --- a/port/windows-h4-zephyr/btstack_config.h +++ b/port/windows-h4-zephyr/btstack_config.h @@ -30,4 +30,21 @@ #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/windows-h4/btstack_config.h b/port/windows-h4/btstack_config.h index e18875f2f..8d180eca4 100644 --- a/port/windows-h4/btstack_config.h +++ b/port/windows-h4/btstack_config.h @@ -31,4 +31,22 @@ #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + + #endif diff --git a/port/windows-winusb-intel/btstack_config.h b/port/windows-winusb-intel/btstack_config.h index e7fcdb4cc..f66fa2910 100644 --- a/port/windows-winusb-intel/btstack_config.h +++ b/port/windows-winusb-intel/btstack_config.h @@ -30,4 +30,21 @@ #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif diff --git a/port/windows-winusb/btstack_config.h b/port/windows-winusb/btstack_config.h index 6f53f41dc..3be741097 100644 --- a/port/windows-winusb/btstack_config.h +++ b/port/windows-winusb/btstack_config.h @@ -31,4 +31,21 @@ #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy + +// Mesh Configuration +#define ENABLE_MESH +#define ENABLE_MESH_ADV_BEARER +#define ENABLE_MESH_GATT_BEARER +#define ENABLE_MESH_PB_ADV +#define ENABLE_MESH_PB_GATT +#define ENABLE_MESH_PROXY_SERVER +#define ENABLE_MESH_PROVISIONER + +#define MAX_NR_MESH_TRANSPORT_KEYS 16 +#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16 +#define MAX_NR_MESH_SUBNETS 2 + +// allow for one NetKey update +#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1) + #endif