From ab20cf786782e9d526f69f3c146a50732a00168f Mon Sep 17 00:00:00 2001 From: awardjr Date: Sun, 31 May 2026 14:37:02 -0400 Subject: [PATCH 1/2] If SNI mapping_detect isn't implemented and we recieve a strucutred unimplemented status, assume the device is connected. --- EmoTracker/Providers/SNI/SniDevice.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/EmoTracker/Providers/SNI/SniDevice.cs b/EmoTracker/Providers/SNI/SniDevice.cs index 3f408cf..7093150 100644 --- a/EmoTracker/Providers/SNI/SniDevice.cs +++ b/EmoTracker/Providers/SNI/SniDevice.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Grpc.Core; namespace EmoTracker.Providers.SNI { @@ -80,7 +81,18 @@ public override async Task ConnectAsync() }).ConfigureAwait(false); mDetectedMapping = detectResponse.MemoryMapping; - Log.Debug("[SNI] Connected to {DisplayName}, detected mapping: {Mapping}", mDisplayName, mDetectedMapping); + Log.Debug("[SNI] Connected to {DisplayName}, detected mapping: {Mapping}", mDisplayName, + mDetectedMapping); + mConnected = true; + ConnectionStatusChanged?.Invoke(this, true); + } + catch (RpcException ex) + { + //SNI Memory Mapping Detection isn't implemented for these devices, but we are connected if we're getting this response + if(ex.StatusCode == StatusCode.Unimplemented) + Log.Debug("[SNI] Device does not implement mapping_detect however we are connected as we " + + "explicitly received the Unimplemented status {DisplayName}: {Message}", + mDisplayName, ex.Message); mConnected = true; ConnectionStatusChanged?.Invoke(this, true); } From 2513c7192bdb88a9ed6593235f772c24d100eb07 Mon Sep 17 00:00:00 2001 From: awardjr Date: Sun, 31 May 2026 14:47:04 -0400 Subject: [PATCH 2/2] Revert my editor's line length opinion --- EmoTracker/Providers/SNI/SniDevice.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/EmoTracker/Providers/SNI/SniDevice.cs b/EmoTracker/Providers/SNI/SniDevice.cs index 7093150..9bc0635 100644 --- a/EmoTracker/Providers/SNI/SniDevice.cs +++ b/EmoTracker/Providers/SNI/SniDevice.cs @@ -81,8 +81,7 @@ public override async Task ConnectAsync() }).ConfigureAwait(false); mDetectedMapping = detectResponse.MemoryMapping; - Log.Debug("[SNI] Connected to {DisplayName}, detected mapping: {Mapping}", mDisplayName, - mDetectedMapping); + Log.Debug("[SNI] Connected to {DisplayName}, detected mapping: {Mapping}", mDisplayName, mDetectedMapping); mConnected = true; ConnectionStatusChanged?.Invoke(this, true); }