Skip to content

Sync to ArduinoBLE master #74

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

Merged
merged 155 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
155 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
grobwrk 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
de0bcbb
Fix functionality on Giga CM4 core
facchinm Oct 26, 2023
5ba3bda
Merge pull request #331 from facchinm/giga_m4
aentinger Feb 16, 2024
93802d0
Bump actions/download-artifact from 3 to 4 (#336)
dependabot[bot] Feb 16, 2024
416506e
Bump actions/upload-artifact from 3 to 4 (#337)
dependabot[bot] Feb 16, 2024
37337ad
Bump geekyeggo/delete-artifact from 2 to 4 (#340)
dependabot[bot] Feb 16, 2024
99159f0
Portenta_H7_M4: provide the correct define
facchinm Feb 21, 2024
d965fa2
Merge pull request #353 from facchinm/portenta_h7_m4_defines
facchinm Mar 5, 2024
4a85fec
CI: Add arduino/report-size-deltas action. (#354)
aentinger Mar 19, 2024
98ff550
Bump geekyeggo/delete-artifact from 4 to 5 (#356)
dependabot[bot] Mar 19, 2024
93315a9
add support for silabs core
leonardocavagnis Jun 7, 2024
0241703
Merge pull request #363 from leonardocavagnis/ble_hci_silabs
leonardocavagnis Aug 1, 2024
29bef40
Publish 1.3.7
leonardocavagnis Aug 1, 2024
910dd44
clear advertising data when BLE end is called
fabik111 Sep 4, 2024
30e2cac
Merge pull request #373 from fabik111/fix-local-name-end
facchinm Oct 25, 2024
5a53135
Modernize spell checking infrastructure
per1234 Feb 5, 2025
0178fdf
Fix typos
per1234 Feb 5, 2025
baa1370
Merge pull request #382 from per1234/update-spell-check
per1234 Feb 5, 2025
eef16ce
fix crashes on M0 board when assigning the BLE handle from the receiv…
fabik111 Oct 3, 2024
9e523b5
Merge pull request #370 from fabik111/fix-m0-handle-assignment
andreagilardoni Mar 26, 2025
64a9bbc
Merge branch 'main'
fpistm Mar 27, 2025
3fd5a50
feat: add HCISpiTransport
cparata Sep 19, 2019
f5e86b9
chore: moved to STM32duinoBLE
fpistm Mar 26, 2025
197b2a5
feat: ability to define HCI SPI transport configuration
fpistm Mar 18, 2025
5c49886
chore(ci): add build-for-stm32 step
fpistm Feb 17, 2020
94ab67e
feat: add editor config
fpistm Mar 18, 2025
dd9eaa9
feat: add HCISharedMemTransport
FRASTM Mar 18, 2025
93a2652
feat: add the STM32Cube_FW to support stm32wb
FRASTM Mar 18, 2025
5293858
feat: add patch files to be applied on stm32wb Cube update
ABOSTM Mar 18, 2025
0f5ca9f
chore: update with stm32wb
fpistm Mar 26, 2025
da833f6
feat: add possibility to choose the ownAddressType in the Arduino stack
cparata Feb 9, 2021
622497c
fix: HCI only Firmware not supporting ACI_GAP_INIT ACI_GATT_INIT
ABOSTM Oct 24, 2022
a44c940
feat: add API to get random address
Mar 14, 2023
107c7c9
chore(GAP): improve scan
cparata Feb 7, 2020
e24f12c
chore(examples): enhance button support
fpistm Mar 20, 2025
7d735c7
chore(examples): enhance scan management
fpistm Mar 20, 2025
ae6881e
fix(HCI): SetAdvertise only if enabled
cparata Mar 19, 2025
c8997be
fix: for pairing with Static Random Address
AresMaster Mar 18, 2025
33348de
fix(HCI): missing LE_Event_Mask
fpistm Mar 20, 2025
348dc55
fix: wrong Le Event Mask set
fpistm Mar 20, 2025
a35e40b
Reset scan filters when stopScan is called [Fixes #350]
andrewchilds Feb 5, 2024
e76c7d9
Fix for issue #245 - ATT_OP_FIND_INFO_RESP incorrect processing durin…
carterd Sep 25, 2022
45c96af
fix: keywords.txt
fpistm Mar 18, 2025
1a2c1ae
fix: compilation error when using _BLE_TRACE
FidelSch Feb 19, 2025
f892330
fix: signed and init field warnings
fpistm Mar 5, 2025
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
64 changes: 64 additions & 0 deletions src/BLEDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,70 @@ String BLEDevice::advertisedServiceUuid(int index) const
return serviceUuid;
}

bool BLEDevice::hasAdvertisementData() const
{
return (_eirDataLength > 0);
}

int BLEDevice::advertisementDataLength() const
{
return _eirDataLength;
}

int BLEDevice::advertisementData(uint8_t value[], int length) const
{
if (length > _eirDataLength) length = _eirDataLength;

if (length) {
memcpy(value, _eirData, length);
}

return length;
}

bool BLEDevice::hasManufacturerData() const
{
return (manufacturerDataLength() > 0);
}

int BLEDevice::manufacturerDataLength() const
{
int length = 0;

for (int i = 0; i < _eirDataLength;) {
int eirLength = _eirData[i++];
int eirType = _eirData[i++];

if (eirType == 0xFF) {
length = (eirLength - 1);
break;
}

i += (eirLength - 1);
}

return length;
}

int BLEDevice::manufacturerData(uint8_t value[], int length) const
{
for (int i = 0; i < _eirDataLength;) {
int eirLength = _eirData[i++];
int eirType = _eirData[i++];

if (eirType == 0xFF) {
if (length > (eirLength - 1)) length = (eirLength - 1);

memcpy(value, &_eirData[i], length);
break;
}

i += (eirLength - 1);
}

return length;
}

int BLEDevice::rssi()
{
uint16_t handle = ATT.connectionHandle(_addressType, _address);
Expand Down
8 changes: 8 additions & 0 deletions src/BLEDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ class BLEDevice {
String advertisedServiceUuid() const;
String advertisedServiceUuid(int index) const;

bool hasAdvertisementData() const;
int advertisementDataLength() const;
int advertisementData(uint8_t value[], int length) const;

bool hasManufacturerData() const;
int manufacturerDataLength() const;
int manufacturerData(uint8_t value[], int length) const;

virtual int rssi();

bool connect();
Expand Down