Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes with ArduinoBLE #62

Open
wants to merge 122 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
2986119
Add enhanced advertising examples
polldo Nov 2, 2020
c663798
Initial - encrypted read
Jan 1, 2021
9cde1de
Merged master
Jan 1, 2021
e5ccd3b
Merge pull request #1 from unknownconstant/pairing
Jan 1, 2021
97571e3
With write encryptionn requirement
Jan 1, 2021
f364628
Merge pull request #2 from unknownconstant/pairing
Jan 1, 2021
fa42bb2
Write encryption & visible LTK / IRK
Jan 2, 2021
065fc1d
Merge pull request #3 from unknownconstant/pairing
Jan 2, 2021
1431f3d
Fixed packet fragmentation
Jan 2, 2021
6b56e82
Merge pull request #4 from unknownconstant/pairing
Jan 2, 2021
6ef59a5
Android bugfix
Jan 3, 2021
7ecf299
Merge pull request #5 from unknownconstant/pairing
Jan 3, 2021
0aa2e87
Handle remote DHKey confirmation before own DHKey
eltos Jan 3, 2021
750b7f1
Actually check remote DHKey
eltos Jan 3, 2021
915e914
Move LTK signaling and confirm to separate method
eltos Jan 4, 2021
f54e7a2
Add method to control and query pairing
eltos Jan 4, 2021
283038f
Merge pull request #6 from eltos/master
Jan 4, 2021
d9fb4bc
Secure random & reject unknown LTK
Jan 4, 2021
fb2b817
Merge branch 'master' into secure-random
Jan 4, 2021
83d11ed
Merge pull request #16 from unknownconstant/secure-random
Jan 4, 2021
e2868a7
Pairing code & binary confirm callbacks
Jan 7, 2021
6b08d21
Updated example sketch
Jan 7, 2021
a429760
Merge pull request #17 from unknownconstant/pairing-code
Jan 7, 2021
3dd53d1
Spellcheck fixes
Jan 24, 2021
55d5bf2
add access to raw advertisement data
tlossen Dec 26, 2020
a9550cf
Saturate length of retrieved advertisement data
polldo Apr 20, 2021
bd492be
Add advertisement data auxiliary functions
polldo Apr 20, 2021
b5d1b73
Add Nano RP2040 Connect to "smoke test" examples compilation CI workflow
per1234 Apr 28, 2021
e080601
Add retrieval of manufacturer data
polldo Apr 20, 2021
3e0cae6
Merge pull request #177 from per1234/ci
per1234 Jun 20, 2021
e1b0d81
moved BLE library to markdown
LiamAljundi Aug 6, 2021
ceb3932
updated content
LiamAljundi Aug 23, 2021
21a332f
fixed suggestions from Karl's review
LiamAljundi Aug 24, 2021
7ed640c
Merge pull request #200 from LiamAljundi/liamAljundi/ble-library-migr…
karlsoderby Aug 24, 2021
236aeda
updated library properties and readme
akash73 Aug 30, 2021
b155246
fix of bad indexing in ATTClass::handleNotifyOrInd which affected BLE…
Lukas-kV Dec 8, 2021
f6b7952
Merge pull request #211 from Lukas-kV/master
facchinm Dec 9, 2021
c8de775
Replace boolean with standard bool (#42)
fpistm Dec 14, 2021
14596d4
Adding sync-labels workflow for sharing one set of labels across all …
aentinger Dec 14, 2021
af4d848
Use major version ref of `carlosperate/download-file-action` (#215)
per1234 Dec 20, 2021
95b2449
Configure Dependabot to check for outdated actions used in workflows …
per1234 Dec 20, 2021
8d4d1dc
fix potential arrary overflow problem of _recvBuffer (#214)
bigbearishappy Dec 22, 2021
ed61a17
Bluetooth trademark fix
karlsoderby Feb 23, 2022
38fe924
Merge pull request #221 from arduino-libraries/karlsoderby/bluetooth-…
karlsoderby Feb 23, 2022
57ce514
Bump actions/checkout from 2 to 3
dependabot[bot] Mar 2, 2022
ca92e1b
Merge pull request #224 from arduino-libraries/dependabot/github_acti…
per1234 Mar 2, 2022
c9bfd21
Update readme.md
bboyho Mar 19, 2022
c925d82
Add compatibility with Nicla Vision
giulcioffi Mar 24, 2022
c12774c
Release 1.2.2
giulcioffi Mar 24, 2022
bfc3202
Update api.md
jacobhylen Mar 31, 2022
b146def
Merge pull request #225 from bboyho/master
karlsoderby Apr 1, 2022
5d5aaaa
Merge pull request #228 from jacobhylen/jacobhylen/change-links
karlsoderby Apr 1, 2022
4cf376e
Unification of documentation
mklemarczyk Apr 7, 2022
da1da57
Merge pull request #231 from mklemarczyk/hotfix/docs-api-fix
facchinm Apr 11, 2022
6438f81
Bump actions/download-artifact from 2 to 3
dependabot[bot] Apr 11, 2022
785ef5c
Bump actions/upload-artifact from 2 to 3
dependabot[bot] Apr 11, 2022
130af4e
Merge pull request #234 from arduino-libraries/dependabot/github_acti…
per1234 Apr 11, 2022
7dc1f79
Merge pull request #233 from arduino-libraries/dependabot/github_acti…
per1234 Apr 11, 2022
b94ff5f
Update api.md
jacobhylen Apr 29, 2022
ad8b870
Merge pull request #235 from jacobhylen/jacobhylen/docs-maintenance
karlsoderby Apr 29, 2022
b39ac7e
Add support for NICLA VISION
giulcioffi Sep 21, 2021
8f9e785
Merge pull request #156 from unknownconstant/master
facchinm May 13, 2022
f107880
Merge pull request #183 from polldo/adv-data-retrieve
facchinm May 13, 2022
f2f73e8
Merge pull request #134 from polldo/example-enhanced-advertising
facchinm May 13, 2022
58136fc
Bugfix: memory leak caused by variables not being deleted in end(). #192
alranel May 12, 2022
3c6a53a
Respect refcounting before freeing dynamically allocated variables
alranel May 12, 2022
1223199
Call end() upon destruction
alranel May 12, 2022
f24ba26
Prevent double object deletion
alranel May 12, 2022
2b72c94
Don't double-free characteristics
facchinm May 23, 2022
afccc49
Don't terminate CordioHCIHook::getDriver() on end() for Murata chips
facchinm May 23, 2022
3003f12
Merge pull request #237 from alranel/bugfix/192-leak
facchinm May 30, 2022
f074724
Release 1.3.0
facchinm May 30, 2022
d5bc5b8
Prepend 'BLE_GATT_' to READ and WRITE enums to avoid clashes with Ard…
giulcioffi May 31, 2022
f24f335
Publish 1.3.1
facchinm May 31, 2022
9bf21b7
Fix Long Term Key Request Negative Reply Command
laviator98 Jun 9, 2022
fae1e36
Change non returning functions to void + spelling (#251)
dominsch Aug 23, 2022
991f076
Support esp32, esp32-C3, esp32-S3 (#252)
dominsch Aug 23, 2022
cd9cbad
Fix hard fault when str is NULL
grobx Aug 30, 2022
6e97bf2
Fix memory leak on end() -> begin() -> end()
facchinm Aug 31, 2022
2a1cf72
Merge pull request #259 from grobx/arduino/master
facchinm Aug 31, 2022
b5fc368
fix the potential overflow problem of leAdvertisingReport->eirData
bigbearishappy Aug 31, 2022
5954d96
Merge pull request #260 from facchinm/fix_end_hang
facchinm Sep 5, 2022
dd56eb7
Release 1.3.2
facchinm Sep 5, 2022
07d249a
Fix BLE scanning block after few minutes
sallasia Oct 3, 2022
c928892
Update GAP.cpp
sallasia Oct 3, 2022
ccdca60
Merge pull request #264 from sallasia/steve_allasia
facchinm Oct 10, 2022
1ec7d00
Bump geekyeggo/delete-artifact from 1 to 2
dependabot[bot] Oct 13, 2022
46985b0
Merge pull request #267 from arduino-libraries/dependabot/github_acti…
per1234 Oct 13, 2022
8ae816c
Bump carlosperate/download-file-action from 1 to 2
dependabot[bot] Oct 25, 2022
b40f618
Merge pull request #270 from arduino-libraries/dependabot/github_acti…
per1234 Oct 25, 2022
f852716
Add compatibility with Giga
facchinm Mar 10, 2023
289d3d6
Publish version 1.3.3
facchinm Mar 10, 2023
a263bc7
Restore logic for end() on STM32H7 boards (1DX module)
facchinm Mar 27, 2023
55e7bb6
Publish 1.3.4
facchinm Mar 27, 2023
9aa695e
Fix warnings:
roleroz May 29, 2023
1dfbf62
Remove another unused variable
roleroz May 29, 2023
0ad2d7d
Support C33
facchinm Apr 4, 2023
7e0c757
Merge pull request #303 from facchinm/c33
facchinm Jun 22, 2023
0753ec0
Fix broken image embed in documentation
per1234 Jul 2, 2023
a29f1aa
Fix broken link in documentation
per1234 Jul 2, 2023
726a6c8
Merge pull request #304 from per1234/fix-link
per1234 Jul 2, 2023
8ca5415
Update library.properties
facchinm Jul 11, 2023
675fc91
Merge pull request #302 from roleroz/master
facchinm Aug 4, 2023
c0cd781
Add support for OPTA
manchoz Aug 24, 2023
54d6317
Merge pull request #319 from manchoz/add_opta_support
facchinm Aug 25, 2023
2a35e72
wip: add support for UNO R4 WiFi
facchinm Jul 3, 2023
742ba78
unor4wifi: fix metadata and gh action
facchinm Jul 11, 2023
c05459e
Merge pull request #305 from facchinm/uno_r4_wifi
facchinm Aug 30, 2023
56dbfb3
Publish 1.3.6
facchinm Aug 30, 2023
3043861
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 5, 2023
dff9e41
Merge pull request #323 from arduino-libraries/dependabot/github_acti…
per1234 Sep 5, 2023
d49c7f3
Squashed commit of the following:
AresMaster Oct 17, 2023
3f8c27a
Merge branch 'pr/1'
AresMaster Oct 17, 2023
63b1e88
Small fixes and changes
AresMaster Oct 17, 2023
fe46ea8
Example fixes
AresMaster Oct 17, 2023
12d92e3
Fixes, update masks, static mac address
AresMaster Oct 18, 2023
04e0204
Temporary fix for device pairing
AresMaster Oct 18, 2023
ea20081
Fixes for pairing with Static Random Address
AresMaster Oct 19, 2023
4fd8381
Merge branch 'main' of https://github.com/AresMaster/STM32duinoBLE
AresMaster Oct 19, 2023
2019736
Revert change in default address type
AresMaster Oct 19, 2023
81dd688
Deletion of unnecessary files
AresMaster Oct 31, 2023
578fdb6
Merge branch 'main' of https://github.com/AresMaster/STM32duinoBLE
AresMaster Oct 31, 2023
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
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See: https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#about-the-dependabotyml-file
version: 2

updates:
# Configure check for outdated GitHub Actions actions in workflows.
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/dependabot/README.md
# See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-actions-up-to-date-with-dependabot
- package-ecosystem: github-actions
directory: / # Check the repository's workflows under /.github/workflows/
schedule:
interval: daily
labels:
- "topic: infrastructure"
2 changes: 1 addition & 1 deletion .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- STMicroelectronics:stm32:Nucleo_64:pnum=P_NUCLEO_WB55RG

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
138 changes: 138 additions & 0 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels.md
name: Sync Labels

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/sync-labels.ya?ml"
- ".github/label-configuration-files/*.ya?ml"
pull_request:
paths:
- ".github/workflows/sync-labels.ya?ml"
- ".github/label-configuration-files/*.ya?ml"
schedule:
# Run daily at 8 AM UTC to sync with changes to shared label configurations.
- cron: "0 8 * * *"
workflow_dispatch:
repository_dispatch:

env:
CONFIGURATIONS_FOLDER: .github/label-configuration-files
CONFIGURATIONS_ARTIFACT: label-configuration-files

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download JSON schema for labels configuration file
id: download-schema
uses: carlosperate/download-file-action@v2
with:
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json
location: ${{ runner.temp }}/label-configuration-schema

- name: Install JSON schema validator
run: |
sudo npm install \
--global \
ajv-cli \
ajv-formats

- name: Validate local labels configuration
run: |
# See: https://github.com/ajv-validator/ajv-cli#readme
ajv validate \
--all-errors \
-c ajv-formats \
-s "${{ steps.download-schema.outputs.file-path }}" \
-d "${{ env.CONFIGURATIONS_FOLDER }}/*.{yml,yaml}"

download:
needs: check
runs-on: ubuntu-latest

strategy:
matrix:
filename:
# Filenames of the shared configurations to apply to the repository in addition to the local configuration.
# https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/sync-labels
- universal.yml

steps:
- name: Download
uses: carlosperate/download-file-action@v2
with:
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}

- name: Pass configuration files to next job via workflow artifact
uses: actions/upload-artifact@v3
with:
path: |
*.yaml
*.yml
if-no-files-found: error
name: ${{ env.CONFIGURATIONS_ARTIFACT }}

sync:
needs: download
runs-on: ubuntu-latest

steps:
- name: Set environment variables
run: |
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
echo "MERGED_CONFIGURATION_PATH=${{ runner.temp }}/labels.yml" >> "$GITHUB_ENV"

- name: Determine whether to dry run
id: dry-run
if: >
github.event_name == 'pull_request' ||
(
(
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch'
) &&
github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
)
run: |
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
# configuration.
echo "::set-output name=flag::--dry-run"

- name: Checkout repository
uses: actions/checkout@v4

- name: Download configuration files artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
path: ${{ env.CONFIGURATIONS_FOLDER }}

- name: Remove unneeded artifact
uses: geekyeggo/delete-artifact@v2
with:
name: ${{ env.CONFIGURATIONS_ARTIFACT }}

- name: Merge label configuration files
run: |
# Merge all configuration files
shopt -s extglob
cat "${{ env.CONFIGURATIONS_FOLDER }}"/*.@(yml|yaml) > "${{ env.MERGED_CONFIGURATION_PATH }}"

- name: Install github-label-sync
run: sudo npm install --global github-label-sync

- name: Sync labels
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# See: https://github.com/Financial-Times/github-label-sync
github-label-sync \
--labels "${{ env.MERGED_CONFIGURATION_PATH }}" \
${{ steps.dry-run.outputs.flag }} \
${{ github.repository }}
8 changes: 4 additions & 4 deletions examples/Central/LedControl/LedControl.ino
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
LED Control

This example scans for BLE peripherals until one with the advertised service
This example scans for Bluetooth® Low Energy peripherals until one with the advertised service
"19b10000-e8f2-537e-4f6c-d104768a1214" UUID is found. Once discovered and connected,
it will remotely control the BLE Peripheral's LED, when the button is pressed or released.
it will remotely control the Bluetooth® Low Energy peripheral's LED, when the button is pressed or released.

The circuit:
- Boards with integrated BLE or Nucleo board plus one of BLE X-Nucleo shield::
Expand Down Expand Up @@ -119,14 +119,14 @@ void setup() {
// configure the button pin as input
pinMode(buttonPin, INPUT_PULLUP);

// initialize the BLE hardware
// initialize the Bluetooth® Low Energy hardware
BLE.begin();

// Get initial button state
initialButtonState = digitalRead(buttonPin);
oldButtonState = initialButtonState;

Serial.println("BLE Central - LED control");
Serial.println("Bluetooth® Low Energy Central - LED control");

// start scanning for peripherals
int ret = 1;
Expand Down
6 changes: 3 additions & 3 deletions examples/Central/PeripheralExplorer/PeripheralExplorer.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Peripheral Explorer

This example scans for BLE peripherals until one with a particular name ("LED")
This example scans for Bluetooth® Low Energy peripherals until one with a particular name ("LED")
is found. Then connects, and discovers + prints all the peripheral's attributes.

The circuit:
Expand Down Expand Up @@ -108,12 +108,12 @@ void setup() {

// begin initialization
if (!BLE.begin()) {
Serial.println("starting BLE failed!");
Serial.println("starting Bluetooth® Low Energy module failed!");

while (1);
}

Serial.println("BLE Central - Peripheral Explorer");
Serial.println("Bluetooth® Low Energy Central - Peripheral Explorer");

// start scanning for peripherals
int ret = 1;
Expand Down
6 changes: 3 additions & 3 deletions examples/Central/Scan/Scan.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Scan

This example scans for BLE peripherals and prints out their advertising details:
This example scans for Bluetooth® Low Energy peripherals and prints out their advertising details:
address, local name, advertised service UUID's.

The circuit:
Expand Down Expand Up @@ -104,12 +104,12 @@ void setup() {

// begin initialization
if (!BLE.begin()) {
Serial.println("starting BLE failed!");
Serial.println("starting Bluetooth® Low Energy module failed!");

while (1);
}

Serial.println("BLE Central scan");
Serial.println("Bluetooth® Low Energy Central scan");

// start scanning for peripherals
int ret = 1;
Expand Down
6 changes: 3 additions & 3 deletions examples/Central/ScanCallback/ScanCallback.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Scan Callback

This example scans for BLE peripherals and prints out their advertising details:
This example scans for Bluetooth® Low Energy peripherals and prints out their advertising details:
address, local name, advertised service UUIDs. Unlike the Scan example, it uses
the callback style APIs and disables filtering so the peripheral discovery is
reported for every single advertisement it makes.
Expand Down Expand Up @@ -106,12 +106,12 @@ void setup() {

// begin initialization
if (!BLE.begin()) {
Serial.println("starting BLE failed!");
Serial.println("starting Bluetooth® Low Energy module failed!");

while (1);
}

Serial.println("BLE Central scan callback");
Serial.println("Bluetooth® Low Energy Central scan callback");

// set the discovered event handle
BLE.setEventHandler(BLEDiscovered, bleCentralDiscoverHandler);
Expand Down
6 changes: 3 additions & 3 deletions examples/Central/SensorTagButton/SensorTagButton.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
SensorTag Button

This example scans for BLE peripherals until a TI SensorTag is discovered.
This example scans for Bluetooth® Low Energy peripherals until a TI SensorTag is discovered.
It then connects to it, discovers the attributes of the 0xffe0 service,
subscribes to the Simple Key Characteristic (UUID 0xffe1). When a button is
pressed on the SensorTag a notification is received and the button state is
Expand Down Expand Up @@ -108,12 +108,12 @@ void setup() {

// begin initialization
if (!BLE.begin()) {
Serial.println("starting BLE failed!");
Serial.println("starting Bluetooth® Low Energy module failed!");

while (1);
}

Serial.println("BLE Central - SensorTag button");
Serial.println("Bluetooth® Low Energy Central - SensorTag button");
Serial.println("Make sure to turn on the device.");

// start scanning for peripherals
Expand Down
Loading