shinyorg / shiny

.NET Framework for Backgrounding & Device Hardware Services (iOS, Android, & Catalyst)
https://shinylib.net
MIT License
1.43k stars 227 forks source link

[Bug]: CharacteristicExtensions.GetAllCharacteristics returns only characteristics of the latest found service #1420

Closed RobinNunkesser closed 6 months ago

RobinNunkesser commented 6 months ago

Component/Nuget

BluetoothLE Client (Shiny.BluetoothLE)

What operating system(s) are effected?

Version(s) of Operation Systems

macOS 14.2.1 iOS 17.2 Should also not work on Android

Hosting Model

Steps To Reproduce

  1. Search for characteristics on a BLE device with more than one service

Expected Behavior

All characteristics should be delivered

Actual Behavior

Only the characteristics of the last found service will be delivered.

Problem should be solved when the .Switch() in CharacteristicExtensions.GetAllCharacteristics is replaced by .Concat() The Problem is also connected with the method AsyncExtensions.GetCharacteristicsAsync which does not do what the signature suggests (serviceUuid is not used.)

Exception or Log output

No response

Code Sample

This bug also occurs in the shiny samples if a BLE device with more than one service is used.

Code of Conduct