Comments (8)
This is working fine for me using iOS nrf connect to android shiny gatt server running in the sample app. Was there an exception? Anything in the output window.
from shiny.
Please file a reproducible case where possible. This is still in beta, so I need help, not just issues. The GATT server is not completed fully yet obviously.
from shiny.
The best case possible is your own excellent Samples project:
In Sample.BlePeripherals.MainViewModel, there's
this.notifications = sb.AddCharacteristic
(
NotifyCharacteristicUuid,
cb => cb.SetNotification(cs =>
{
var subs = cs.Characteristic.SubscribedCentrals.Count;
var @event = cs.IsSubscribing ? "Subscribed" : "Unsubcribed";
this.Write($"Device {cs.Peripheral.Uuid} {@event}");
this.Write($"Charcteristic Subcribers: {subs}");
if (subs == 0)
this.StopTimer();
else
this.StartTimer();
})
);
Using the "Bluetooth LE Explorer" app from Windows Store I've managed to list the characteristic, it is correctly displayed as "notifiable", but attempting to subscribe to it fails. The code inside the "SetNotification" subscription handler is never called.
from shiny.
I also experienced this issue, but in my case it was incorrect configuration for device which advertise characteristic. Check is it everything OK with nrfConnect application(check it on iOS and Android store), and if even nrfConnect fail -something wrong with your BLE configuration
from shiny.
I have just tried the ACR Bluetooth LE app and the problem exists there too (other apps like BLE Sim work correctly).
Reading https://stackoverflow.com/questions/17910322/android-ble-api-gatt-notification-not-received
I've noticed this sentence:
"All of the writeGattDescriptors must come first and complete before you issue any readCharacteristic calls."
No idea, I thought this might help...
from shiny.
@ThumbGen Did you try anything from the link you provided?
from shiny.
Sorry for the delayed reply, indeed it was a problem on my side.
I had to add the CCCD flag with notifications on the subscriber side; now the notifications are working and are absolutely awesome!
Thank you!
from shiny.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from shiny.
Related Issues (20)
- [Bug]: IBleDelegate::OnAdapterStateChanged is not called HOT 1
- [Bug]: IPeripheral's connection state is not updated after .Scan() running again HOT 4
- [Bug]: App in background or not running. No any event fires under Android HOT 1
- net8.0 support for Maui HOT 5
- [Bug]: Location Permission Always Requester does not work (or appear) HOT 3
- [Bug]: Android does not throw a Disconnected into the BleDelegate HOT 1
- IBleManager.IsScanning is always False in Apple
- [Bug]: IPeripheral's connection state is not updated after .Scan() running again HOT 3
- [Bug]: Bug with NotifyCharacteristic Subscription HOT 1
- Cannot send local notification with a ScheduleDate set using 3.2.4 HOT 8
- [Feature Request]: Allow specifying user-agent header on NSURLSession Config HOT 1
- [Bug]: actionIdentifier not available in OnEntry delegate for Push Notifications HOT 1
- [Bug]: ServiceCollectionExtensions.AddBluetoothLE() throws "System.InvalidOperationException: This service descriptor is keyed. Your service provider may not support keyed services." HOT 2
- [Bug]: Shiny not working with Azure Notification Hub and FCM V1 HOT 3
- [Bug]: CharacteristicExtensions.GetAllCharacteristics returns only characteristics of the latest found service
- [Bug]: Setting up Shiny services for MAUI with .Net 8.0 support HOT 3
- [Bug]: await IBleManager.RequestAccessAsync() never returns a completed task the first time asking for permissions HOT 6
- [Bug]: Cannot use ScheduleDate and RepeatInterval at the same time HOT 1
- [Bug]: Connecting and disconnecting the connection does not work reliably HOT 3
- [Bug]: WriteCharacteristic is always timeout once "GATT is not connected" is thrown HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shiny.