The HoloLens 2 do not support the namespace, System.IO.Ports

I want to debug serial devices on HoloLens(Win on ARM64) via docking station, but when I use namespace System.IO.Ports in my Unity script(test0822) to implement serial port related functions and deploy to HoloLens, I get the following error:

System.NotSupportedException: System.IO.Ports.SerialPort::GetPortNames
  at System.IO.Ports.SerialPort.GetPortNames () [0x00000] in <00000000000000000000000000000000>:0 
  at test0822.ScanPorts () [0x00000] in <00000000000000000000000000000000>:0 
  at test0822.Start () [0x00000] in <00000000000000000000000000000000>:0 
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
my editor versions are VS2022 and Unity2022.3.3f1c1,
Api compatible level is. NET Framework, 
the script backend is IL2CPP, 
Target SDK version is 10.0.22621.0 (minimum version 10.0.18362.0).

Any help greatly appreciated!!

It is expected the the IL2CPP scripting backend, which is uses for Hololens, does not support the SerialPort API.

I’m curious though, is this API required for debugging on the Hololens?