Skip to content

Commit 2c126c1

Browse files
authored
Update README.md (#21)
***NO_CI***
1 parent 41bdf58 commit 2c126c1

16 files changed

+415
-91
lines changed

.github/workflows/update-dependencies.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ name: Daily update dependencies
77

88
on:
99
schedule:
10-
# At 00:00 UTC every day.
11-
- cron: '00 00 * * *'
10+
# Update At 00:00 UTC on Tuesday and Friday
11+
- cron: '0 0 * * 2,5'
1212
repository_dispatch:
1313
types: update-dependencies
1414

@@ -17,36 +17,16 @@ defaults:
1717
shell: pwsh
1818

1919
jobs:
20-
update-dotnet-preview:
20+
update-nuget-dependencies:
2121
name: Update .NET nanoFramework dependencies
22-
timeout-minutes: 15
22+
timeout-minutes: 180 # Non default as IoT devices has lots of solutions to update!
2323
runs-on: windows-latest
24+
env:
25+
GITHUB_TOKEN: ${{ github.token }}
2426
steps:
2527
- name: Checkout
2628
uses: actions/checkout@v2
27-
with:
28-
path: main
29-
- name: Checkout tools repo
30-
uses: actions/checkout@v2
31-
with:
32-
repository: nanoframework/nf-tools
33-
path: tools
3429
- name: Update dependencies
35-
run: ./github-actions/update-nf-dependencies.ps1
36-
working-directory: tools
37-
- name: Create Pull Request
38-
uses: peter-evans/create-pull-request@v3
39-
if: env.CREATE_PR == 'true'
30+
uses: nanoframework/nanodu@v1
4031
with:
41-
title: '${{ env.PR_TITLE }}'
42-
body: |
43-
${{ env.PR_MESSAGE }}
44-
45-
[version update]
46-
47-
### :warning: This is an automated update. :warning:
48-
committer: 'nfbot <[email protected]>'
49-
branch: ${{ env.BRANCH_NAME }}
50-
path: main
51-
labels: |
52-
Type: dependencies
32+
solutionsToCheck: 'nanoFramework.Device.Bluetooth.sln'

CHANGELOG.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Changelog
2+
3+
## [**Changes available only in 'Preview' NuGet packages:**](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/HEAD)
4+
5+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.24...HEAD)
6+
7+
**Documentation and other chores:**
8+
9+
- Update 4 NuGet dependencies [\#20](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/20)
10+
11+
## [v1.0.0-preview.24](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.24) (2022-03-16)
12+
13+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.23...v1.0.0-preview.24)
14+
15+
**Implemented enhancements:**
16+
17+
- Update to allow adding of extra services [\#19](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/19)
18+
19+
## [v1.0.0-preview.23](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.23) (2022-03-14)
20+
21+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.21...v1.0.0-preview.23)
22+
23+
**Documentation and other chores:**
24+
25+
- Update 1 NuGet dependencies [\#18](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/18)
26+
- Update 1 NuGet dependencies [\#17](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/17)
27+
28+
## [v1.0.0-preview.21](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.21) (2022-03-14)
29+
30+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.18...v1.0.0-preview.21)
31+
32+
**Documentation and other chores:**
33+
34+
- Update 3 NuGet dependencies [\#15](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/15)
35+
- Update 1 NuGet dependencies [\#14](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/14)
36+
37+
## [v1.0.0-preview.18](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.18) (2022-02-17)
38+
39+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.17...v1.0.0-preview.18)
40+
41+
**Documentation and other chores:**
42+
43+
- Update 3 NuGet dependencies [\#13](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/13)
44+
45+
## [v1.0.0-preview.17](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.17) (2022-02-08)
46+
47+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.16...v1.0.0-preview.17)
48+
49+
**Documentation and other chores:**
50+
51+
- Update 1 NuGet dependencies [\#12](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/12)
52+
53+
## [v1.0.0-preview.16](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.16) (2022-02-04)
54+
55+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.15...v1.0.0-preview.16)
56+
57+
**Documentation and other chores:**
58+
59+
- Update 1 NuGet dependencies [\#11](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/11)
60+
61+
## [v1.0.0-preview.15](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.15) (2022-01-28)
62+
63+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.14...v1.0.0-preview.15)
64+
65+
**Documentation and other chores:**
66+
67+
- Update 1 NuGet dependencies [\#10](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/10)
68+
69+
## [v1.0.0-preview.14](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.14) (2022-01-28)
70+
71+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.13...v1.0.0-preview.14)
72+
73+
**Documentation and other chores:**
74+
75+
- Update 4 NuGet dependencies [\#9](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/9)
76+
77+
## [v1.0.0-preview.13](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.13) (2022-01-21)
78+
79+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.12...v1.0.0-preview.13)
80+
81+
**Documentation and other chores:**
82+
83+
- Update 1 NuGet dependencies [\#8](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/8)
84+
85+
## [v1.0.0-preview.12](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.12) (2022-01-21)
86+
87+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.11...v1.0.0-preview.12)
88+
89+
**Documentation and other chores:**
90+
91+
- Update 1 NuGet dependencies [\#7](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/7)
92+
93+
## [v1.0.0-preview.11](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.11) (2022-01-20)
94+
95+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.9...v1.0.0-preview.11)
96+
97+
**Documentation and other chores:**
98+
99+
- Update 3 NuGet dependencies [\#6](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/6)
100+
101+
## [v1.0.0-preview.9](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.9) (2022-01-04)
102+
103+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.8...v1.0.0-preview.9)
104+
105+
**Documentation and other chores:**
106+
107+
- Update 1 nuget dependencies [\#5](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/5)
108+
109+
## [v1.0.0-preview.8](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.8) (2021-12-28)
110+
111+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.6...v1.0.0-preview.8)
112+
113+
**Documentation and other chores:**
114+
115+
- Bumps nanoFramework.Runtime.Events from 1.9.2 to 1.10.0-preview.1 [\#4](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/4)
116+
117+
## [v1.0.0-preview.6](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.6) (2021-12-03)
118+
119+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/v1.0.0-preview.4...v1.0.0-preview.6)
120+
121+
**Documentation and other chores:**
122+
123+
- Update 4 nuget dependencies [\#3](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/3)
124+
125+
## [v1.0.0-preview.4](https://github.com/nanoframework/nanoframework.Device.Bluetooth/tree/v1.0.0-preview.4) (2021-12-03)
126+
127+
[Full Changelog](https://github.com/nanoframework/nanoframework.Device.Bluetooth/compare/132574ccaaaa8f9e99b0a27a3b6ec6a0a9709f29...v1.0.0-preview.4)
128+
129+
**Implemented enhancements:**
130+
131+
- Initial Bluetooth project [\#1](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/1)
132+
133+
**Documentation and other chores:**
134+
135+
- Update Readme.md [\#2](https://github.com/nanoframework/nanoFramework.Device.Bluetooth/pull/2)
136+
137+
138+
139+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

NFUnitTest1/NFUnitTest1.nfproj

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,21 @@
3131
<Compile Include="Properties\AssemblyInfo.cs" />
3232
</ItemGroup>
3333
<ItemGroup>
34-
<Reference Include="mscorlib, Version=1.10.5.4, Culture=neutral, PublicKeyToken=c07d481e9758c731">
35-
<HintPath>..\packages\nanoFramework.CoreLibrary.1.10.5\lib\mscorlib.dll</HintPath>
34+
<Reference Include="mscorlib, Version=1.12.0.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
35+
<HintPath>..\packages\nanoFramework.CoreLibrary.1.12.0-preview.19\lib\mscorlib.dll</HintPath>
3636
<Private>True</Private>
37-
<SpecificVersion>True</SpecificVersion>
3837
</Reference>
39-
<Reference Include="nanoFramework.System.Text, Version=1.1.1.3, Culture=neutral, PublicKeyToken=c07d481e9758c731">
40-
<HintPath>..\packages\nanoFramework.System.Text.1.1.1\lib\nanoFramework.System.Text.dll</HintPath>
38+
<Reference Include="nanoFramework.System.Text, Version=1.1.3.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
39+
<HintPath>..\packages\nanoFramework.System.Text.1.1.3-preview.24\lib\nanoFramework.System.Text.dll</HintPath>
4140
<Private>True</Private>
42-
<SpecificVersion>True</SpecificVersion>
4341
</Reference>
44-
<Reference Include="nanoFramework.TestFramework, Version=1.0.150.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
45-
<HintPath>..\packages\nanoFramework.TestFramework.1.0.150\lib\nanoFramework.TestFramework.dll</HintPath>
42+
<Reference Include="nanoFramework.TestFramework, Version=1.0.181.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
43+
<HintPath>..\packages\nanoFramework.TestFramework.1.0.181\lib\nanoFramework.TestFramework.dll</HintPath>
4644
<Private>True</Private>
47-
<SpecificVersion>True</SpecificVersion>
4845
</Reference>
4946
<Reference Include="nanoFramework.UnitTestLauncher, Version=0.0.0.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
50-
<HintPath>..\packages\nanoFramework.TestFramework.1.0.150\lib\nanoFramework.UnitTestLauncher.exe</HintPath>
47+
<HintPath>..\packages\nanoFramework.TestFramework.1.0.181\lib\nanoFramework.UnitTestLauncher.exe</HintPath>
5148
<Private>True</Private>
52-
<SpecificVersion>True</SpecificVersion>
5349
</Reference>
5450
</ItemGroup>
5551
<ItemGroup>
@@ -61,16 +57,16 @@
6157
</ItemGroup>
6258
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
6359
<!-- MANUAL UPDATE HERE -->
64-
<Import Project="..\packages\nanoFramework.TestFramework.1.0.150\build\nanoFramework.TestFramework.targets" Condition="Exists('..\packages\nanoFramework.TestFramework.1.0.150\build\nanoFramework.TestFramework.targets')" />
6560
<ProjectExtensions>
6661
<ProjectCapabilities>
6762
<ProjectConfigurationsDeclaredAsItems />
6863
</ProjectCapabilities>
6964
</ProjectExtensions>
65+
<Import Project="..\packages\nanoFramework.TestFramework.1.0.181\build\nanoFramework.TestFramework.targets" Condition="Exists('..\packages\nanoFramework.TestFramework.1.0.181\build\nanoFramework.TestFramework.targets')" />
7066
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
7167
<PropertyGroup>
72-
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
68+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
7369
</PropertyGroup>
74-
<Warning Condition="!Exists('..\packages\nanoFramework.TestFramework.1.0.150\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
70+
<Error Condition="!Exists('..\packages\nanoFramework.TestFramework.1.0.181\build\nanoFramework.TestFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\nanoFramework.TestFramework.1.0.181\build\nanoFramework.TestFramework.targets'))" />
7571
</Target>
7672
</Project>

NFUnitTest1/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="nanoFramework.CoreLibrary" version="1.10.5" targetFramework="netnanoframework10" />
4-
<package id="nanoFramework.System.Text" version="1.1.1" targetFramework="netnanoframework10" />
5-
<package id="nanoFramework.TestFramework" version="1.0.150" targetFramework="netnanoframework10" developmentDependency="true" />
3+
<package id="nanoFramework.CoreLibrary" version="1.12.0-preview.19" targetFramework="netnanoframework10" />
4+
<package id="nanoFramework.System.Text" version="1.1.3-preview.24" targetFramework="netnanoframework10" />
5+
<package id="nanoFramework.TestFramework" version="1.0.181" targetFramework="netnanoframework10" developmentDependency="true" />
66
</packages>

README.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,37 @@
1818
Bluetooth Low Energy library.
1919

2020
This library is based on the Windows.Devices.Bluetooth UWP class library but simplified and with all the async related calls removed.
21-
The original .Net assembly depended on Windows.Storage.Streams for DataReader & DataWriter; this library has simplified inbuilt versions. References to IBuffer in .Net UWP examples should now use Buffer instead.
21+
The original .Net assembly depended on Windows.Storage.Streams for DataReader & DataWriter; this library has simplified inbuilt versions.
22+
So references to IBuffer in .Net UWP examples should now use Buffer instead.
2223

23-
Currently only supported on ESP32 devices with following firmware.
24+
We have also added an extension to this assembly allowing extra services to be added with no restriction on type.
25+
26+
## Firmware versions
27+
28+
Bluetooth is currently only supported on ESP32 devices with following firmware.
2429

2530
- ESP32_BLE_REV0
2631
- ESP32_BLE_REV3
2732

2833
This restriction is due to IRAM memory space in the firmware image.
29-
With revision 1 ESP32 devices the PSRAM implementation requires PSRAM fixes which takes space
30-
in IRAM so PSRAM is currently disabled for ESP32_BLE_REV0. With the revision 3 devices the Bluetooth and
31-
PSRAM and are both available.
34+
With revision 1 of ESP32 devices, the PSRAM implementation requires a large number of PSRAM fixes which reduces the
35+
available space in the IRAM area so PSRAM is currently disabled for ESP32_BLE_REV0. With the revision 3 devices the Bluetooth and
36+
PSRAM are both available.
3237

3338
## Samples
3439

35-
A number of Bluetooth LE samples are available in the [nanoFramework samples repo](https://github.com/nanoframework/Samples)
40+
A number of Bluetooth LE samples are available in the [nanoFramework samples repo](https://github.com/nanoframework/Samples/)
3641

37-
- Nordic Spp Sample. (coming soon)
38-
- Environmental sensor sample. (coming soon)
42+
- [Bluetooth Low energy sample 1 (Basic Read/Write/Notify)](https://github.com/nanoframework/Samples/tree/main/samples/Bluetooth/BluetoothLESample1)
43+
- [Bluetooth Low energy sample 2 (Add Security)](https://github.com/nanoframework/Samples/tree/main/samples/Bluetooth/BluetoothLESample2)
44+
- [Bluetooth Low energy sample 3 (Show cases adding or replacing some standard services)](https://github.com/nanoframework/Samples/tree/main/samples/Bluetooth/BluetoothLESample3)
45+
- [Bluetooth Low energy serial (SPP)](https://github.com/nanoframework/Samples/tree/main/samples/Bluetooth/BluetoothLESerial)
3946

4047
## Usage
4148

4249
### Overview
4350

44-
The current implementation only supports the Gatt Server calls.
51+
The current implementation only supports the Gatt Server calls. A future version will include the Gatt Client.
4552

4653
Also as part of this assembly is the NordicSPP class which implements a Serial Protocol Profile based on
4754
the Nordic specification. This allows clients to easily connect via Bluetooth LE to send and receive messages via a
@@ -261,6 +268,33 @@ private static void _notifyCharacteristic_SubscribedClientsChanged(GattLocalChar
261268
}
262269
```
263270

271+
### Adding extra services
272+
You can add or replace existing services and there are no restrictions on which services you add.
273+
See the Bluetooth sample 3 for an example of adding the bluetooth standard
274+
services, Device Information, Current Time, Battery level and Environmental Sensor.
275+
276+
```csharp
277+
// Battery service exposes the current battery level percentage
278+
BatteryService BatService = new BatteryService(serviceProvider);
279+
280+
// Update the Battery service with the current battery level when ever it is read.
281+
BatService.BatteryLevel = 94;
282+
```
283+
284+
## Advertising your service
285+
286+
Once all the Characteristics have been created you need to advertise the Service so other devices can see it
287+
and/or connect to it. We also provide the device name seen on the disovery.
288+
289+
```csharp
290+
serviceProvider.StartAdvertising(new GattServiceProviderAdvertisingParameters()
291+
{
292+
DeviceName = "My Example Device",
293+
IsConnectable = true,
294+
IsDiscoverable = true
295+
});
296+
```
297+
264298
# Bluetooth Serial Port Profile(SPP)
265299

266300
This assembly has an implementation of the Nordic SPP which can easily be used to send messages between a Bluetooth client and the device

azure-pipelines.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1+
# Copyright (c) .NET Foundation and Contributors
2+
# See LICENSE file in the project root for full license information.
3+
14
trigger:
25
branches:
3-
include: [main, develop, "release-*" ]
6+
include:
7+
- main
8+
- develop
9+
- release-*
410
paths:
5-
exclude: [README.md, LICENSE.md, CHANGELOG.md, "*.md", NuGet.Config, .github_changelog_generator, .gitignore]
11+
exclude:
12+
- .github_changelog_generator
13+
- .gitignore
14+
- CHANGELOG.md
15+
- CODE_OF_CONDUCT.md
16+
- LICENSE.md
17+
- README.md
18+
- NuGet.Config
19+
- assets/*
20+
- config/*
21+
- .github/*
22+
623
tags:
7-
include: ["v*"]
24+
include:
25+
- v*
826

927
# PR always trigger build
1028
pr:
@@ -19,7 +37,7 @@ resources:
1937
endpoint: nanoframework
2038

2139
pool:
22-
vmImage: 'windows-2019'
40+
vmImage: 'windows-latest'
2341

2442
variables:
2543
DOTNET_NOLOGO: true

0 commit comments

Comments
 (0)