We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11899bf commit e90eeb9Copy full SHA for e90eeb9
1 file changed
LighthouseV2PowerControl/Program.cs
@@ -141,7 +141,13 @@ private static async Task GetGattCharacteristicsAsync()
141
for (int i = 0; i < serviceList.Count; ++i)
142
{
143
if (serviceList[i].Uuid != service) continue;
144
- GattCharacteristicsResult gattRes = await serviceList[i].GetCharacteristicsForUuidAsync(characteristic);
+ GattCharacteristicsResult gattRes;
145
+ do
146
+ {
147
+ gattRes = await serviceList[i].GetCharacteristicsForUuidAsync(characteristic);
148
+ }
149
+ while (gattRes.Status == GattCommunicationStatus.AccessDenied);
150
+
151
if (gattRes.Status == GattCommunicationStatus.Success)
152
153
var openStatus = await serviceList[i].OpenAsync(GattSharingMode.SharedReadAndWrite);
0 commit comments