A exception with a null response was thrown sending an HTTP request to the remote WebDriver server

Hi all,
I am trying to use Appium Webdriver for C# to automate the native camera. I currently have a problem that I am not able to resolve. I am getting below error,

OpenQA.Selenium.WebDriverException: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://127.0.0.1:5555/wd/hub/session. The status of the exception was ReceiveFailure, and the message was: The underlying connection was closed: An unexpected error occurred on a receive.

Below is the code for reference,

AppiumOptions = new AppiumOptions();
//set the emulator
AppiumOptions.AddAdditionalCapability(“platformName”, “Android”);
AppiumOptions.AddAdditionalCapability(“device”, “Android”);
AppiumOptions.AddAdditionalCapability(“appPackage”, “com.sec.android.app.camera”);
AppiumOptions.AddAdditionalCapability(“appActivity”, “com.sec.android.app.camera.Camera”);
AndroidDriver = new AndroidDriver(new Uri(“http://127.0.0.1:5555/wd/hub”), AppiumOptions);
AndroidDriver.PressKeyCode(AndroidKeyCode.Keycode_CAMERA);

Appium WebDriver Version: 4.1.1
.Net framework: 4.8

How can I resolve this?

Can you please share any sample code if you feel any other approach would work other than this? Any guidance would be very much appreciated.

Attached Appium logs for your reference

Thanks
Appium_logs.txt (2.1 KB)