private async void CommandChannelHandler(byte[] command) { try { Console.WriteLine("Received command {0}", ASCIIEncoding.ASCII.GetString(command)); Console.WriteLine(Microcontroller.WasOpened()); await InputEmulator.SendCTP_CommandAsync(JsonSerializer.Deserialize <CTP_packet>(command)); } catch (Exception e) { Console.WriteLine(e.Message); } }