├── BlazorBluetooth.png ├── BlazorBluetoothUA.png ├── SampleClientSide ├── Pages │ └── BleTester.razor ├── wwwroot │ ├── favicon.png │ ├── BlazorBluetoothUA.png │ ├── service-worker.js │ ├── manifest.webmanifest │ ├── index.html │ ├── service-worker.published.js │ └── css │ │ └── app.css ├── Layout │ ├── MainLayout.razor │ └── MainLayout.razor.css ├── _Imports.razor ├── App.razor ├── Program.cs ├── SampleClientSide.csproj └── Properties │ └── launchSettings.json ├── SampleServerSide ├── Pages │ ├── BleTester.razor │ ├── _Host.cshtml │ └── _Layout.cshtml ├── wwwroot │ ├── favicon.ico │ └── css │ │ ├── open-iconic │ │ ├── font │ │ │ ├── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── FONT-LICENSE │ │ └── site.css ├── appsettings.json ├── appsettings.Development.json ├── Layout │ ├── MainLayout.razor │ └── MainLayout.razor.css ├── SampleServerSide.csproj ├── _Imports.razor ├── App.razor ├── Program.cs └── Properties │ └── launchSettings.json ├── Blazor.Bluetooth ├── BlazorBluetoothUA.png ├── BluetoothServiceDataMap.cs ├── BluetoothManufacturerDataMap.cs ├── IBluetoothServiceDataMap.cs ├── IBluetoothManufacturerDataMap.cs ├── BluetoothNotSupportedException.cs ├── ScriptNotFoundException.cs ├── DeviceDisconnectHandler.cs ├── RequestDeviceCancelledException.cs ├── BluetoothAvailabilityHandler.cs ├── AdvertisementsUnavailableException.cs ├── ServiceExtensions.cs ├── AdvertisementReceivedHandler.cs ├── CharacteristicEventArgs.cs ├── CharacteristicValueHandler.cs ├── IBluetoothAdvertisingEvent.cs ├── ServiceData.cs ├── Filter.cs ├── BluetoothAdvertisingEvent.cs ├── BluetoothCharacteristicProperties.cs ├── ManufacturerData.cs ├── IDevice.cs ├── IBluetoothRemoteGATTDescriptor.cs ├── BluetoothRemoteGATTDescriptor.cs ├── IBluetoothCharacteristicProperties.cs ├── IBluetoothRemoteGATTService.cs ├── IBluetoothRemoteGATTServer.cs ├── BluetoothRemoteGATTService.cs ├── RequestDeviceOptions.cs ├── Blazor.Bluetooth.csproj ├── BluetoothRemoteGATTServer.cs ├── BluetoothUUID.cs ├── IBluetoothNavigator.cs ├── Device.cs ├── IBluetoothRemoteGATTCharacteristic.cs ├── BluetoothNavigator.cs ├── BluetoothRemoteGATTCharacteristic.cs └── wwwroot │ └── JSInterop.js ├── SampleShared ├── Components │ ├── InputTextToByteArrayComponent.razor │ ├── AddServicesComponent.razor │ ├── ShowConnectedDeviceComponent.razor │ ├── ShowDescriptorComponent.razor │ ├── BluetoothUuidsComponent.razor │ ├── AddFilterComponent.razor.cs │ ├── ShowServiceComponent.razor │ ├── AddManufacturerDataComponent.razor.cs │ ├── DeviceComponent.razor │ ├── AddServicesComponent.razor.cs │ ├── AddManufacturerDataComponent.razor │ ├── DeviceRequestComponent.razor.cs │ ├── ShowDescriptorComponent.razor.cs │ ├── AddFilterComponent.razor │ ├── DeviceRequestComponent.razor │ ├── BluetoothUuidsComponent.razor.cs │ ├── DeviceComponent.razor.cs │ ├── InputTextToByteArrayComponent.razor.cs │ ├── AdvComponent.razor │ ├── AdvComponent.razor.cs │ ├── ShowConnectedDeviceComponent.razor.cs │ ├── BleTesterPageComponent.razor │ ├── ShowServiceComponent.razor.cs │ ├── BleTesterPageComponent.razor.cs │ ├── ShowCharacteristicComponent.razor │ └── ShowCharacteristicComponent.razor.cs ├── SampleShared.csproj └── BindableBase.cs ├── .gitattributes ├── Blazor.Bluetooth.sln ├── README.md └── .gitignore /BlazorBluetooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valerii-sovytskyi/Blazor.Bluetooth/HEAD/BlazorBluetooth.png -------------------------------------------------------------------------------- /BlazorBluetoothUA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valerii-sovytskyi/Blazor.Bluetooth/HEAD/BlazorBluetoothUA.png -------------------------------------------------------------------------------- /SampleClientSide/Pages/BleTester.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |
Byte array is invalid format, input bytes with a space separation, with values 0-255, for ex "12 53 124 255 0"
6 | } 7 |Sorry, there's nothing at this address.
10 |Sorry, there's nothing at this address.
10 |No services here.
21 | } 22 |Properties:
5 |Value: @Descriptor.Value
6 |CharacteristicUuid: @Descriptor.CharacteristicUuid
7 |DeviceUuid: @Descriptor.DeviceUuid
8 |ServiceUuid: @Descriptor.ServiceUuid
9 |Uuid: @Descriptor.Uuid
10 |Methods:
13 |Value: @ValueRead
14 | 15 |UUID is: @UUID
11 | 12 |Properties:
5 |DeviceUuid: @Service.DeviceUuid
6 |IsPrimary: @Service.IsPrimary
7 |Uuid: @Service.Uuid
8 |Methods:
9 | 13 | 14 | 15 | 16 | 17 | @if (Characteristics.Any()) 18 | { 19 | @foreach (var characteristic in Characteristics) 20 | { 21 |No characteristics here.
27 | } 28 |Device info:
11 |Name: @Device.Name
12 |Id: @Device.Id
13 |Gatt.DeviceUuid: @Device.Gatt.DeviceUuid
14 |Gatt.Connected: @Device.Gatt.Connected
15 | 16 |25 | 26 | @if (!Device.Gatt.Connected) 27 | { 28 | 29 | } 30 | else 31 | { 32 | 33 | } 34 | 35 | 36 |
37 |Services
32 |ManufacturerData
39 |Filters
28 |Exclusive Filters
37 |Optional Services
46 |Optional Manufacturer data
55 |Please make sure to enable "Web BLE new permissions backend" feature for bluetooth to have advertisements!
7 |(Copy ref to search field)
8 |about:flags/#enable-web-bluetooth-new-permissions-backend
9 | } 10 | 11 |Advertisements scanning....
19 | } 20 |Apperience: @BluetoothAdvertisingEvent.Appearance
26 |Name: @BluetoothAdvertisingEvent.Name
27 |Rssi: @BluetoothAdvertisingEvent.Rssi
28 |Tx_power: @BluetoothAdvertisingEvent.TxPower
29 |ManufacturerData:
30 | @if (BluetoothAdvertisingEvent.ManufacturerData != null) 31 | { 32 | @foreach (var item in BluetoothAdvertisingEvent.ManufacturerData) 33 | { 34 |- Key: @item.Key, Value: @item.Value
35 | } 36 | } 37 |ServiceData:
38 | @if (BluetoothAdvertisingEvent.ServiceData != null) 39 | { 40 | @foreach (var item in BluetoothAdvertisingEvent.ServiceData) 41 | { 42 |- Key: @item.Key, Value: @item.Value
43 | } 44 | } 45 |UUIDs:
46 | @if (BluetoothAdvertisingEvent.Uuids != null) 47 | { 48 | @foreach (var item in BluetoothAdvertisingEvent.Uuids) 49 | { 50 |- item
51 | } 52 | } 53 | } 54 |15 | 16 | 17 |
18 | 19 |No devices got yet
42 | } 43 | 44 |Logs:
51 | @if (Logs != null && Logs.Any()) 52 | { 53 |@Logs[i - 1]
60 |@Logs[i - 1]
66 | } 67 | } 68 |