From b96bc7cc425f32f42ff80d8d5c54b32a7043e29e Mon Sep 17 00:00:00 2001 From: dominsch Date: Sun, 18 Apr 2021 20:40:57 +0200 Subject: [PATCH 01/18] add esp32 support --- library.properties | 2 +- src/utility/HCIUartTransport.cpp | 2 +- src/utility/HCIVirtualTransport.cpp | 147 ++++++++++++++++++++++++++++ src/utility/HCIVirtualTransport.h | 50 ++++++++++ 4 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 src/utility/HCIVirtualTransport.cpp create mode 100644 src/utility/HCIVirtualTransport.h diff --git a/library.properties b/library.properties index 77c7013e..c54f984d 100644 --- a/library.properties +++ b/library.properties @@ -6,5 +6,5 @@ sentence=Enables BLE connectivity on the Arduino MKR WiFi 1010, Arduino UNO WiFi paragraph=This library supports creating a BLE peripheral and BLE central mode. category=Communication url=https://www.arduino.cc/en/Reference/ArduinoBLE -architectures=samd,megaavr,mbed,apollo3,mbed_nano,mbed_portenta +architectures=samd,megaavr,mbed,apollo3,mbed_nano,mbed_portenta,esp32 includes=ArduinoBLE.h diff --git a/src/utility/HCIUartTransport.cpp b/src/utility/HCIUartTransport.cpp index 67bc173f..d23a3d3f 100644 --- a/src/utility/HCIUartTransport.cpp +++ b/src/utility/HCIUartTransport.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined(ARDUINO_ARCH_MBED) || defined(TARGET_NANO_RP2040_CONNECT) +#if !defined(ARDUINO_ARCH_MBED) && !defined(ESP32) || defined(TARGET_NANO_RP2040_CONNECT) #include "HCIUartTransport.h" diff --git a/src/utility/HCIVirtualTransport.cpp b/src/utility/HCIVirtualTransport.cpp new file mode 100644 index 00000000..9b1cd653 --- /dev/null +++ b/src/utility/HCIVirtualTransport.cpp @@ -0,0 +1,147 @@ +/* + This file is part of the ArduinoBLE library. + Copyright (c) 2018 Arduino SA. All rights reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#if defined(ESP32) + +#include "HCIVirtualTransport.h" + +StreamBufferHandle_t rec_buffer; +StreamBufferHandle_t send_buffer; + + +static void notify_host_send_available(void) +{ +} + +static int notify_host_recv(uint8_t *data, uint16_t length) +{ + for (uint8_t i = 0; i < length; i++) { + char b = data[i]; + } + xStreamBufferSend(rec_buffer,data,length,portMAX_DELAY); // !!!potentially waiting forever + return 0; +} + +static esp_vhci_host_callback_t vhci_host_cb = { + notify_host_send_available, + notify_host_recv +}; + +void bleTask(void *pvParameters) +{ + esp_vhci_host_register_callback(&vhci_host_cb); + size_t length; + uint8_t mybuf[256]; + + while(true){ + length = xStreamBufferReceive(send_buffer,mybuf,256,portMAX_DELAY); + while (!esp_vhci_host_check_send_available()) {} + for (uint8_t i = 0; i < length; i++) { + char b = mybuf[i]; + } + esp_vhci_host_send_packet(mybuf, length); + } +} + + +HCIVirtualTransportClass::HCIVirtualTransportClass() +{ +} + +HCIVirtualTransportClass::~HCIVirtualTransportClass() +{ +} + +int HCIVirtualTransportClass::begin() +{ + btStarted(); // this somehow stops the arduino ide from initializing bluedroid + + rec_buffer = xStreamBufferCreate(258, 1); + send_buffer = xStreamBufferCreate(258, 1); + + esp_err_t ret = nvs_flash_init(); + if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { + ESP_ERROR_CHECK(nvs_flash_erase()); + ret = nvs_flash_init(); + } + ESP_ERROR_CHECK( ret ); + esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); + bt_cfg.mode = ESP_BT_MODE_BLE; + ret = esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); + if (ret) { + return 0; + } + if ((ret = esp_bt_controller_init(&bt_cfg)) != ESP_OK) { + return 0; + } + if ((ret = esp_bt_controller_enable(ESP_BT_MODE_BLE)) != ESP_OK) { + return 0; + } + xTaskCreatePinnedToCore(&bleTask, "bleTask", 2048, NULL, 5, NULL, 0); + return 1; +} + +void HCIVirtualTransportClass::end() +{ + vStreamBufferDelete(rec_buffer); + vStreamBufferDelete(send_buffer); + esp_bt_controller_deinit(); +} + +void HCIVirtualTransportClass::wait(unsigned long timeout) +{ + for (unsigned long start = (esp_timer_get_time() / 1000ULL); ((esp_timer_get_time() / 1000ULL) - start) < timeout;) { + if (available()) { + break; + } + } +} + +int HCIVirtualTransportClass::available() +{ + size_t bytes = xStreamBufferBytesAvailable(rec_buffer); + return bytes; +} + +// never called +int HCIVirtualTransportClass::peek() +{ + return -1; +} + +int HCIVirtualTransportClass::read() +{ + uint8_t c; + if(xStreamBufferReceive(rec_buffer, &c, 1, portMAX_DELAY)) { + return c; + } + return -1; +} + +size_t HCIVirtualTransportClass::write(const uint8_t* data, size_t length) +{ + size_t result = xStreamBufferSend(send_buffer,data,length,portMAX_DELAY); + return result; +} + +HCIVirtualTransportClass HCIVirtualTransport; + +HCITransportInterface& HCITransport = HCIVirtualTransport; + +#endif diff --git a/src/utility/HCIVirtualTransport.h b/src/utility/HCIVirtualTransport.h new file mode 100644 index 00000000..0da43cac --- /dev/null +++ b/src/utility/HCIVirtualTransport.h @@ -0,0 +1,50 @@ +/* + This file is part of the ArduinoBLE library. + Copyright (c) 2018 Arduino SA. All rights reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "HCITransport.h" +#include +#include +#include + +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/stream_buffer.h" + +#include "esp_bt.h" +#include "nvs_flash.h" + +#include "esp32-hal-bt.h" // this is needed to disable bluedroid + + +class HCIVirtualTransportClass : public HCITransportInterface { +public: + HCIVirtualTransportClass(); + virtual ~HCIVirtualTransportClass(); + + virtual int begin(); + virtual void end(); + + virtual void wait(unsigned long timeout); + + virtual int available(); + virtual int peek(); + virtual int read(); + + virtual size_t write(const uint8_t* data, size_t length); +}; \ No newline at end of file From d8ce372ef6e55fb45bb24ae080d6aa47b3e2da1c Mon Sep 17 00:00:00 2001 From: dominsch Date: Sun, 18 Apr 2021 21:00:33 +0200 Subject: [PATCH 02/18] Update HCIVirtualTransport.cpp --- src/utility/HCIVirtualTransport.cpp | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/utility/HCIVirtualTransport.cpp b/src/utility/HCIVirtualTransport.cpp index 9b1cd653..00749fb0 100644 --- a/src/utility/HCIVirtualTransport.cpp +++ b/src/utility/HCIVirtualTransport.cpp @@ -34,7 +34,7 @@ static int notify_host_recv(uint8_t *data, uint16_t length) for (uint8_t i = 0; i < length; i++) { char b = data[i]; } - xStreamBufferSend(rec_buffer,data,length,portMAX_DELAY); // !!!potentially waiting forever + xStreamBufferSend(rec_buffer,data,length,portMAX_DELAY); // !!!potentially waiting forever return 0; } @@ -46,12 +46,12 @@ static esp_vhci_host_callback_t vhci_host_cb = { void bleTask(void *pvParameters) { esp_vhci_host_register_callback(&vhci_host_cb); - size_t length; - uint8_t mybuf[256]; + size_t length; + uint8_t mybuf[256]; while(true){ - length = xStreamBufferReceive(send_buffer,mybuf,256,portMAX_DELAY); - while (!esp_vhci_host_check_send_available()) {} + length = xStreamBufferReceive(send_buffer,mybuf,256,portMAX_DELAY); + while (!esp_vhci_host_check_send_available()) {} for (uint8_t i = 0; i < length; i++) { char b = mybuf[i]; } @@ -70,28 +70,28 @@ HCIVirtualTransportClass::~HCIVirtualTransportClass() int HCIVirtualTransportClass::begin() { - btStarted(); // this somehow stops the arduino ide from initializing bluedroid + btStarted(); // this somehow stops the arduino ide from initializing bluedroid - rec_buffer = xStreamBufferCreate(258, 1); + rec_buffer = xStreamBufferCreate(258, 1); send_buffer = xStreamBufferCreate(258, 1); esp_err_t ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { - ESP_ERROR_CHECK(nvs_flash_erase()); - ret = nvs_flash_init(); + ESP_ERROR_CHECK(nvs_flash_erase()); + ret = nvs_flash_init(); } ESP_ERROR_CHECK( ret ); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); - bt_cfg.mode = ESP_BT_MODE_BLE; + bt_cfg.mode = ESP_BT_MODE_BLE; ret = esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); if (ret) { - return 0; + return 0; } if ((ret = esp_bt_controller_init(&bt_cfg)) != ESP_OK) { - return 0; + return 0; } if ((ret = esp_bt_controller_enable(ESP_BT_MODE_BLE)) != ESP_OK) { - return 0; + return 0; } xTaskCreatePinnedToCore(&bleTask, "bleTask", 2048, NULL, 5, NULL, 0); return 1; @@ -99,7 +99,7 @@ int HCIVirtualTransportClass::begin() void HCIVirtualTransportClass::end() { - vStreamBufferDelete(rec_buffer); + vStreamBufferDelete(rec_buffer); vStreamBufferDelete(send_buffer); esp_bt_controller_deinit(); } @@ -127,8 +127,8 @@ int HCIVirtualTransportClass::peek() int HCIVirtualTransportClass::read() { - uint8_t c; - if(xStreamBufferReceive(rec_buffer, &c, 1, portMAX_DELAY)) { + uint8_t c; + if(xStreamBufferReceive(rec_buffer, &c, 1, portMAX_DELAY)) { return c; } return -1; @@ -136,7 +136,7 @@ int HCIVirtualTransportClass::read() size_t HCIVirtualTransportClass::write(const uint8_t* data, size_t length) { - size_t result = xStreamBufferSend(send_buffer,data,length,portMAX_DELAY); + size_t result = xStreamBufferSend(send_buffer,data,length,portMAX_DELAY); return result; } From 9af9bea9beb9bc63f9aab68893d414b9a22dacd6 Mon Sep 17 00:00:00 2001 From: dominsch Date: Thu, 22 Apr 2021 18:39:19 +0200 Subject: [PATCH 03/18] Update HCIVirtualTransport.cpp add ESP32-C3 support --- src/utility/HCIVirtualTransport.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utility/HCIVirtualTransport.cpp b/src/utility/HCIVirtualTransport.cpp index 9b1cd653..ccf7ee00 100644 --- a/src/utility/HCIVirtualTransport.cpp +++ b/src/utility/HCIVirtualTransport.cpp @@ -82,7 +82,11 @@ int HCIVirtualTransportClass::begin() } ESP_ERROR_CHECK( ret ); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); +#if CONFIG_IDF_TARGET_ESP32C3 + bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE; +#else bt_cfg.mode = ESP_BT_MODE_BLE; +#endif ret = esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); if (ret) { return 0; From 2a5f3417f4c0525d09f9b1c7a2d2db3c9ec4a3b9 Mon Sep 17 00:00:00 2001 From: dominsch Date: Thu, 22 Apr 2021 18:46:39 +0200 Subject: [PATCH 04/18] Revert "Update HCIVirtualTransport.cpp" This reverts commit 9af9bea9beb9bc63f9aab68893d414b9a22dacd6. --- src/utility/HCIVirtualTransport.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/utility/HCIVirtualTransport.cpp b/src/utility/HCIVirtualTransport.cpp index ccf7ee00..9b1cd653 100644 --- a/src/utility/HCIVirtualTransport.cpp +++ b/src/utility/HCIVirtualTransport.cpp @@ -82,11 +82,7 @@ int HCIVirtualTransportClass::begin() } ESP_ERROR_CHECK( ret ); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); -#if CONFIG_IDF_TARGET_ESP32C3 - bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE; -#else bt_cfg.mode = ESP_BT_MODE_BLE; -#endif ret = esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); if (ret) { return 0; From 8f1d5c2248ab40ef25782820e4ecf5582d27e452 Mon Sep 17 00:00:00 2001 From: dominsch Date: Thu, 22 Apr 2021 18:49:38 +0200 Subject: [PATCH 05/18] Update HCIVirtualTransport.cpp --- src/utility/HCIVirtualTransport.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utility/HCIVirtualTransport.cpp b/src/utility/HCIVirtualTransport.cpp index 00749fb0..85f75ca2 100644 --- a/src/utility/HCIVirtualTransport.cpp +++ b/src/utility/HCIVirtualTransport.cpp @@ -82,7 +82,11 @@ int HCIVirtualTransportClass::begin() } ESP_ERROR_CHECK( ret ); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); +#if CONFIG_IDF_TARGET_ESP32C3 + bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE; +#else bt_cfg.mode = ESP_BT_MODE_BLE; +#endif ret = esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); if (ret) { return 0; From d56786eb27c7c97b40238d077cf975b06e90cb56 Mon Sep 17 00:00:00 2001 From: dominsch Date: Mon, 8 Aug 2022 09:03:42 -0300 Subject: [PATCH 06/18] Update library.properties --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index e2a3f15f..467d9eaf 100644 --- a/library.properties +++ b/library.properties @@ -6,5 +6,5 @@ sentence=Enables Bluetooth® Low Energy connectivity on the Arduino MKR WiFi 101 paragraph=This library supports creating a Bluetooth® Low Energy peripheral & central mode. category=Communication url=https://www.arduino.cc/en/Reference/ArduinoBLE -architectures=samd,megaavr,mbed,apollo3,mbed_nano,mbed_portenta,mbed_nicla +architectures=samd,megaavr,mbed,apollo3,mbed_nano,mbed_portenta,mbed_nicla,esp32 includes=ArduinoBLE.h From a98b645d464301b1b981c5fce8b51df4214100ca Mon Sep 17 00:00:00 2001 From: dominsch Date: Thu, 18 Aug 2022 13:31:44 -0300 Subject: [PATCH 07/18] fix crash on restart --- src/utility/HCIVirtualTransport.cpp | 31 ++++++++++------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/src/utility/HCIVirtualTransport.cpp b/src/utility/HCIVirtualTransport.cpp index 85f75ca2..696d8ffb 100644 --- a/src/utility/HCIVirtualTransport.cpp +++ b/src/utility/HCIVirtualTransport.cpp @@ -23,6 +23,7 @@ StreamBufferHandle_t rec_buffer; StreamBufferHandle_t send_buffer; +TaskHandle_t bleHandle; static void notify_host_send_available(void) @@ -31,9 +32,6 @@ static void notify_host_send_available(void) static int notify_host_recv(uint8_t *data, uint16_t length) { - for (uint8_t i = 0; i < length; i++) { - char b = data[i]; - } xStreamBufferSend(rec_buffer,data,length,portMAX_DELAY); // !!!potentially waiting forever return 0; } @@ -47,14 +45,11 @@ void bleTask(void *pvParameters) { esp_vhci_host_register_callback(&vhci_host_cb); size_t length; - uint8_t mybuf[256]; + uint8_t mybuf[258]; while(true){ - length = xStreamBufferReceive(send_buffer,mybuf,256,portMAX_DELAY); + length = xStreamBufferReceive(send_buffer,mybuf,258,portMAX_DELAY); while (!esp_vhci_host_check_send_available()) {} - for (uint8_t i = 0; i < length; i++) { - char b = mybuf[i]; - } esp_vhci_host_send_packet(mybuf, length); } } @@ -80,24 +75,18 @@ int HCIVirtualTransportClass::begin() ESP_ERROR_CHECK(nvs_flash_erase()); ret = nvs_flash_init(); } - ESP_ERROR_CHECK( ret ); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); + #if CONFIG_IDF_TARGET_ESP32C3 bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE; #else bt_cfg.mode = ESP_BT_MODE_BLE; #endif - ret = esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); - if (ret) { - return 0; - } - if ((ret = esp_bt_controller_init(&bt_cfg)) != ESP_OK) { - return 0; - } - if ((ret = esp_bt_controller_enable(ESP_BT_MODE_BLE)) != ESP_OK) { - return 0; - } - xTaskCreatePinnedToCore(&bleTask, "bleTask", 2048, NULL, 5, NULL, 0); + + esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); + esp_bt_controller_init(&bt_cfg); + esp_bt_controller_enable(ESP_BT_MODE_BLE); + xTaskCreatePinnedToCore(&bleTask, "bleTask", 2048, NULL, 5, &bleHandle, 0); return 1; } @@ -105,7 +94,9 @@ void HCIVirtualTransportClass::end() { vStreamBufferDelete(rec_buffer); vStreamBufferDelete(send_buffer); + esp_bt_controller_disable(); esp_bt_controller_deinit(); + vTaskDelete(bleHandle); } void HCIVirtualTransportClass::wait(unsigned long timeout) From 96e74734d6faceacd0d1dd579282d45d405dff0d Mon Sep 17 00:00:00 2001 From: dominsch Date: Thu, 18 Aug 2022 14:01:14 -0300 Subject: [PATCH 08/18] Update ATT.cpp spelling --- src/utility/ATT.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utility/ATT.cpp b/src/utility/ATT.cpp index 439b88e8..acdf5a9f 100644 --- a/src/utility/ATT.cpp +++ b/src/utility/ATT.cpp @@ -1272,7 +1272,7 @@ void ATTClass::writeReqOrCmd(uint16_t connectionHandle, uint16_t mtu, uint8_t op } return; } - // Check permssion + // Check permission if((characteristic->permissions() &( BLEPermission::BLEEncryption >> 8)) > 0 && (getPeerEncryption(connectionHandle) & PEER_ENCRYPTION::ENCRYPTED_AES) == 0){ holdResponse = true; @@ -1941,4 +1941,4 @@ int ATTClass::getPeerResolvedAddress(uint16_t connectionHandle, uint8_t resolved #if !defined(FAKE_ATT) ATTClass ATTObj; ATTClass& ATT = ATTObj; -#endif \ No newline at end of file +#endif From b684d3669591c1ef6d8938c73fa7222fee6d6255 Mon Sep 17 00:00:00 2001 From: dominsch Date: Fri, 19 Aug 2022 18:27:06 -0300 Subject: [PATCH 09/18] support more espressif chips --- src/utility/HCIVirtualTransport.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utility/HCIVirtualTransport.cpp b/src/utility/HCIVirtualTransport.cpp index 696d8ffb..046a0e72 100644 --- a/src/utility/HCIVirtualTransport.cpp +++ b/src/utility/HCIVirtualTransport.cpp @@ -77,10 +77,10 @@ int HCIVirtualTransportClass::begin() } esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); -#if CONFIG_IDF_TARGET_ESP32C3 - bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE; +#if CONFIG_IDF_TARGET_ESP32 + bt_cfg.mode = ESP_BT_MODE_BLE; //original esp32 chip #else - bt_cfg.mode = ESP_BT_MODE_BLE; + bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE; //different api for newer models #endif esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); From f9ac56ce5267c5aa41030bf3f09e139392de1e44 Mon Sep 17 00:00:00 2001 From: dominsch Date: Fri, 19 Aug 2022 19:15:22 -0300 Subject: [PATCH 10/18] Create compile-for-esp.yaml don't know what I'm doing --- .github/workflows/compile-for-esp.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/compile-for-esp.yaml diff --git a/.github/workflows/compile-for-esp.yaml b/.github/workflows/compile-for-esp.yaml new file mode 100644 index 00000000..8908012c --- /dev/null +++ b/.github/workflows/compile-for-esp.yaml @@ -0,0 +1,18 @@ +name: Compile Examples ESP32 +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fqbn: esp32:esp32:esp32 + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json From b054c2f8363010077eb6f50e68df7812e6ea5fbd Mon Sep 17 00:00:00 2001 From: dominsch Date: Fri, 19 Aug 2022 19:35:50 -0300 Subject: [PATCH 11/18] skip failing examples --- .github/workflows/compile-for-esp.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/compile-for-esp.yaml b/.github/workflows/compile-for-esp.yaml index 8908012c..21ecd4c0 100644 --- a/.github/workflows/compile-for-esp.yaml +++ b/.github/workflows/compile-for-esp.yaml @@ -16,3 +16,5 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + sketch-paths: | + - examples/Central/Scan From f22e6cc39c5a39e2d101d5cd9fc4b0f03cbe64dc Mon Sep 17 00:00:00 2001 From: dominsch Date: Fri, 19 Aug 2022 20:00:56 -0300 Subject: [PATCH 12/18] Update compile-for-esp.yaml --- .github/workflows/compile-for-esp.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-for-esp.yaml b/.github/workflows/compile-for-esp.yaml index 21ecd4c0..6479e058 100644 --- a/.github/workflows/compile-for-esp.yaml +++ b/.github/workflows/compile-for-esp.yaml @@ -6,13 +6,21 @@ on: jobs: build: runs-on: ubuntu-latest + + strategy: + matrix: + fqbn: + - esp32:esp32:esp32 + - esp32:esp32:esp32-c2 + - esp32:esp32:esp32-c3 + - esp32:esp32:esp32-S3 steps: - uses: actions/checkout@v3 - uses: arduino/compile-sketches@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} - fqbn: esp32:esp32:esp32 + fqbn: ${{ matrix.fqbn }} platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json From 749882ea4d70abc3b6f96dad7547f20b16e5dab0 Mon Sep 17 00:00:00 2001 From: dominsch Date: Fri, 19 Aug 2022 20:23:25 -0300 Subject: [PATCH 13/18] Update compile-for-esp.yaml --- .github/workflows/compile-for-esp.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile-for-esp.yaml b/.github/workflows/compile-for-esp.yaml index 6479e058..18ec7e72 100644 --- a/.github/workflows/compile-for-esp.yaml +++ b/.github/workflows/compile-for-esp.yaml @@ -11,9 +11,9 @@ jobs: matrix: fqbn: - esp32:esp32:esp32 - - esp32:esp32:esp32-c2 - - esp32:esp32:esp32-c3 - - esp32:esp32:esp32-S3 + #- esp32:esp32:esp32-c2 + #- esp32:esp32:esp32-c3_dev_module? board? who knows + #- esp32:esp32:esp32-S3 steps: - uses: actions/checkout@v3 From d334bdc16186d78aec41dce45352ebff27c0dfb4 Mon Sep 17 00:00:00 2001 From: dominsch Date: Fri, 19 Aug 2022 20:58:56 -0300 Subject: [PATCH 14/18] Update compile-for-esp.yaml --- .github/workflows/compile-for-esp.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile-for-esp.yaml b/.github/workflows/compile-for-esp.yaml index 18ec7e72..e43b082b 100644 --- a/.github/workflows/compile-for-esp.yaml +++ b/.github/workflows/compile-for-esp.yaml @@ -11,9 +11,9 @@ jobs: matrix: fqbn: - esp32:esp32:esp32 - #- esp32:esp32:esp32-c2 - #- esp32:esp32:esp32-c3_dev_module? board? who knows - #- esp32:esp32:esp32-S3 + #- esp32:esp32:esp32c2 + - esp32:esp32:esp32c3 + - esp32:esp32:esp32s3 steps: - uses: actions/checkout@v3 From 02180eb9424d7f66b0b48acf928683b567122f4a Mon Sep 17 00:00:00 2001 From: dominsch Date: Sat, 20 Aug 2022 09:10:12 -0300 Subject: [PATCH 15/18] Update compile-for-esp.yaml --- .github/workflows/compile-for-esp.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile-for-esp.yaml b/.github/workflows/compile-for-esp.yaml index e43b082b..a42fe906 100644 --- a/.github/workflows/compile-for-esp.yaml +++ b/.github/workflows/compile-for-esp.yaml @@ -11,9 +11,12 @@ jobs: matrix: fqbn: - esp32:esp32:esp32 - #- esp32:esp32:esp32c2 - - esp32:esp32:esp32c3 - esp32:esp32:esp32s3 + - esp32:esp32:esp32c3 + # future bluetooth chips + #- esp32:esp32:esp32c2 + #- esp32:esp32:esp32c6 + #- esp32:esp32:esp32h2 steps: - uses: actions/checkout@v3 @@ -26,3 +29,5 @@ jobs: source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json sketch-paths: | - examples/Central/Scan + cli-compile-flags: | + - --warnings="none" From 8271dcac1119d99cf08cc4cedf77b8e504cf4d1d Mon Sep 17 00:00:00 2001 From: dominsch Date: Sat, 20 Aug 2022 09:21:11 -0300 Subject: [PATCH 16/18] Update compile-for-esp.yaml --- .github/workflows/compile-for-esp.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/compile-for-esp.yaml b/.github/workflows/compile-for-esp.yaml index a42fe906..75885882 100644 --- a/.github/workflows/compile-for-esp.yaml +++ b/.github/workflows/compile-for-esp.yaml @@ -29,5 +29,10 @@ jobs: source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json sketch-paths: | - examples/Central/Scan + - examples/Central/PeripheralExplorer + - examples/Central/ScanCallback + - examples/Central/SensorTagButton + - examples/Peripheral/Advertising/EnhancedAdvertising + - examples/Peripheral/Advertising/RawDataAdvertising cli-compile-flags: | - --warnings="none" From 8367e5f52e76e3bfc0aff164bb25722b622c1255 Mon Sep 17 00:00:00 2001 From: dominsch Date: Sat, 20 Aug 2022 09:34:19 -0300 Subject: [PATCH 17/18] Update compile-examples.yml --- .github/workflows/compile-examples.yml | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index a1faf997..b33d6c75 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -22,3 +22,36 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} fqbn: ${{ matrix.fqbn }} + + build-for-esp32: + runs-on: ubuntu-latest + + strategy: + matrix: + fqbn: + - esp32:esp32:esp32 + - esp32:esp32:esp32s3 + - esp32:esp32:esp32c3 + # future bluetooth chips + #- esp32:esp32:esp32c2 + #- esp32:esp32:esp32c6 + #- esp32:esp32:esp32h2 + + steps: + - uses: actions/checkout@v3 + - uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fqbn: ${{ matrix.fqbn }} + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + sketch-paths: | + - examples/Central/Scan + - examples/Central/PeripheralExplorer + - examples/Central/ScanCallback + - examples/Central/SensorTagButton + - examples/Peripheral/Advertising/EnhancedAdvertising + - examples/Peripheral/Advertising/RawDataAdvertising + cli-compile-flags: | + - --warnings="none" From 0a290bcf8b4bdc0888ba277da0a09885208c91b0 Mon Sep 17 00:00:00 2001 From: dominsch Date: Sat, 20 Aug 2022 09:35:56 -0300 Subject: [PATCH 18/18] Delete compile-for-esp.yaml --- .github/workflows/compile-for-esp.yaml | 38 -------------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/compile-for-esp.yaml diff --git a/.github/workflows/compile-for-esp.yaml b/.github/workflows/compile-for-esp.yaml deleted file mode 100644 index 75885882..00000000 --- a/.github/workflows/compile-for-esp.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Compile Examples ESP32 -on: - - push - - pull_request - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - fqbn: - - esp32:esp32:esp32 - - esp32:esp32:esp32s3 - - esp32:esp32:esp32c3 - # future bluetooth chips - #- esp32:esp32:esp32c2 - #- esp32:esp32:esp32c6 - #- esp32:esp32:esp32h2 - - steps: - - uses: actions/checkout@v3 - - uses: arduino/compile-sketches@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - fqbn: ${{ matrix.fqbn }} - platforms: | - - name: esp32:esp32 - source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - sketch-paths: | - - examples/Central/Scan - - examples/Central/PeripheralExplorer - - examples/Central/ScanCallback - - examples/Central/SensorTagButton - - examples/Peripheral/Advertising/EnhancedAdvertising - - examples/Peripheral/Advertising/RawDataAdvertising - cli-compile-flags: | - - --warnings="none" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy