So I am using an API for communicating with a LEGO Mindstorms NXT brick called MonoBrick. In order for it to connect by Bluetooth, I give it the com port and it connect through that. When I tried to connect using any port, I get an UnauthorizedAccessException "Access to the port 'COM9' is denied." Is there some kind of permissions set-up I neglected to add?
Asked
Active
Viewed 692 times
0
-
According to [this](http://stackoverflow.com/questions/22399200/cannot-access-serial-port-during-debugging), it may be that you have something open on that com port already. – Nate Diamond May 14 '14 at 17:00
-
It is definitely not. I made sure of that. It is something to do with the app's permissions. – absorr May 14 '14 at 21:58
-
Something like [this](http://msdn.microsoft.com/en-us/library/windows/apps/dn263090.aspx)? – Nate Diamond May 14 '14 at 22:11
-
Yes! That is what I was looking for. Just added that in but though it still is giving me the same error. – absorr May 14 '14 at 22:45
-
What function type/id are you using? – Nate Diamond May 15 '14 at 02:21
-
According to the MonoBrick site, the device uses the HID API. According to the previously linked site, the HID service is not supported. All is not lost, but you'll have a not fun time ahead of you. What I believe you'll need to do is make a custom driver (or possibly firmware) which does not use HID, but instead Serial Port Profile (SPP). Either that, or try Wifi. I think you may just need a different driver though possibly (but you may need to make it yourself, so that it uses WinUSB). – Nate Diamond May 15 '14 at 02:32
-
Thanks! I'll just use the other means then. – absorr May 15 '14 at 15:21