Maui bluetooth characteristic notifications

...In a Maui project, I'm using the Shiny BLE library and everything works fine except I can't find how to be sent notifications from the device - - none of the documentation samples are correct.

Here is the code used to retrieve characteristic data after the device connection is complete:

public async Task ReadDataAsync(IPeripheral peripheral, string suuid, string cuuid)
{
// Discover the characteristic
var c = await peripheral.GetCharacteristic(suuid, cuuid);
if (c == null) { return; }
if (c.CanRead())
{
var reader = peripheral.ReadCharacteristic(c.Service.Uuid, c.Uuid)
.Subscribe(scanResult =>
{
// process scanResult.data
},
ex => Console.WriteLine("Error reading characteristic: {ex.Message}") ); } else if (c.CanNotifyOrIndicate()) { c . // How to tell device we want notifications? No examples I've found are syntactically correct! .Subscribe( result => { // process result.Data }, ex => Console.WriteLine("Error subscribing to notifications: {ex.Message}")
);
// turn of notifications
}

How do I tell the device we want to receive notifications when the state changes?

I am afraid you have come to the wrong forum; You are asking about a .NET framework.
This is the posit forum relating to posit products, the software technologies that are most relevant to this forum's users are R and Python. Posit created and maintain an R package called Shiny which is a way of creating web-apps. It has no connection to Bluetooth.