I have an unity/c# app which utilizes com ports to comunicate with a custom bluetooth device. The connection with serial ports works fine when using a stock/inbilt/OE bluetooth device in any computer I tested. When using a usb bluetooth adapter(BT dongle you plug into a usb port), I get an UnauthorizedAccessException when calling serialPort.Open().
The dongle finds my bluetooth device in win , I can see the outgoing serial port name. Have tryed making a plain WindowsFormsApp to figure out timings and delays but it is the same. No matter what I do there is the same exception on .Open() method. The simplified code would goes like:
SerialPort serialPort = new SerialPort(@"\\.\COM3" , 9600);
serialPort.Open();
I have seen and am not dupicating: why is access to com port denied? Access to the port is denied with USB Bluetooth adapter It's just that they dont solve anything.