Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,13 @@ jobs:
[env]
platform = espressif32
framework = arduino
build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1'

[env:esp32c3]
board = esp32-c3-devkitm-1
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'

[env:esp32s3]
board = esp32-s3-devkitc-1
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
EOF
cp ${{ matrix.example }}/* example/src/
platformio run -d example
Expand Down Expand Up @@ -160,22 +159,19 @@ jobs:
[env]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
framework = arduino
build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1'

[env:esp32c3]
board = esp32-c3-devkitm-1
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'

[env:esp32s3]
board = esp32-s3-devkitc-1
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'

[env:esp32c6]
board = esp32-c6-devkitc-1
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'

[env:esp32h2]
board = esp32-h2-devkitm-1
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
EOF
cp ${{ matrix.example }}/* example/src/
platformio run -d example
Expand All @@ -194,11 +190,11 @@ jobs:
- esp32s3
- esp32c6
- esp32h2
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Build arduino-esp32
uses: arduino/compile-sketches@v1.1.0
uses: arduino/compile-sketches@v1.1.4
with:
cli-version: latest
platforms: |
Expand All @@ -220,14 +216,14 @@ jobs:
- esp32s3
- esp32c6
- esp32h2
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set config for BT5
run: |
sed -i '0,/#include \"nimconfig_rename.h\"/a #define CONFIG_BT_NIMBLE_EXT_ADV 1' ./src/nimconfig.h
sed -i '0,/#include \"nimconfig_rename.h\"/a #define MYNEWT_VAL_BLE_EXT_ADV 1' ./src/nimconfig.h
- name: Build BT5 arduino-esp32
uses: arduino/compile-sketches@v1.1.0
uses: arduino/compile-sketches@v1.1.4
with:
cli-version: latest
platforms: |
Expand All @@ -249,11 +245,11 @@ jobs:
- Generic_nRF52832
- Generic_nRF52833
- Generic_nRF52840
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Build n-able Arduino
uses: arduino/compile-sketches@v1.1.0
uses: arduino/compile-sketches@v1.1.4
with:
cli-version: latest
platforms: |
Expand All @@ -272,14 +268,14 @@ jobs:
- "examples/Bluetooth_5/NimBLE_extended_server"
variant:
- Generic_nRF52840
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Set config for BT5
run: |
echo "-DCONFIG_BT_NIMBLE_EXT_ADV=1" > ${{ matrix.example }}/build_opt.h
- name: Build BT5 n-able Arduino
uses: arduino/compile-sketches@v1.1.0
uses: arduino/compile-sketches@v1.1.4
with:
cli-version: latest
platforms: |
Expand Down
3 changes: 3 additions & 0 deletions src/NimBLEDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@

# if defined(ESP_PLATFORM) && defined(CONFIG_ENABLE_ARDUINO_DEPENDS)
# include "esp32-hal-bt.h"
bool bleInUse(void) {
return true;
}
# if __has_include("esp32-hal-bt-mem.h")
# include "esp32-hal-bt-mem.h"
# endif
Expand Down
16 changes: 7 additions & 9 deletions src/nimble/esp_port/port/include/esp_nimble_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@
#endif
#endif

#ifndef CONFIG_BT_NIMBLE_EXT_ADV
#ifndef MYNEWT_VAL_BLE_EXT_ADV
#define MYNEWT_VAL_BLE_EXT_ADV (0)
#else
#define MYNEWT_VAL_BLE_EXT_ADV (CONFIG_BT_NIMBLE_EXT_ADV)
#endif

#ifndef CONFIG_BT_NIMBLE_EXT_ADV_MAX_SIZE
Expand Down Expand Up @@ -174,7 +172,7 @@
#ifndef CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV
#define MYNEWT_VAL_BLE_PERIODIC_ADV (0)
#else
#define MYNEWT_VAL_BLE_PERIODIC_ADV (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV)
#define MYNEWT_VAL_BLE_PERIODIC_ADV (0)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
#endif

#ifndef CONFIG_NIMBLE_MAX_CONNECTIONS
Expand Down Expand Up @@ -392,25 +390,25 @@

/* Value copied from BLE_PERIODIC_ADV */
#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV)
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV (0)
#endif

/* Value copied from BLE_MAX_PERIODIC_SYNCS */
#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_CNT
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_CNT (MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS)
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_CNT (0)
#endif


#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_LIST_CNT (MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS)
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_LIST_CNT (0)

#ifndef CONFIG_BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER
#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0)
#else
#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (CONFIG_BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER)
#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0)
#endif

/* Value copied from BLE_PERIODIC_ADV_SYNC_TRANSFER */
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER (CONFIG_BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER)
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER (0)


#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PRIVACY
Expand Down
9 changes: 5 additions & 4 deletions src/nimconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

#ifdef ESP_PLATFORM
#include "sdkconfig.h"
#undef CONFIG_BT_NIMBLE_EXT_ADV
#ifdef MYNEWT_VAL_BLE_EXT_ADV
#define CONFIG_BT_NIMBLE_EXT_ADV MYNEWT_VAL_BLE_EXT_ADV
#endif
#undef CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE // fix warning on arduino core 4.x
#else
#include "ext_nimble_config.h"
/* Clear redefinition warnings */
Expand Down Expand Up @@ -381,10 +386,6 @@ defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)

#endif // ESP_PLATFORM

#if CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV && !CONFIG_BT_NIMBLE_EXT_ADV
# error Extended advertising must be enabled to use periodic advertising.
#endif

/* Must have max instances and data length set if extended advertising is enabled */
#if CONFIG_BT_NIMBLE_EXT_ADV
# if !defined(CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES)
Expand Down
Loading