USB access denied

Hi everyone, previously when I plugged in my mbed into my laptop it worked fine. But after a few times of using it, the sentence “usbConnect error: Failed to execute ‘open’ on ‘USBDevice’: Access denied.” appeared on the screen. I’ve tried plugging it into another laptop and it works just fine. I’ve also tried to check in the device manager section but there wasn’t any problems shown there. Does anyone here know what the issue may be?


usually is good share more context

  • your board and info about your debugger
  • System on PC
  • from where this error come from (what app)

check what a driver is used on both laptops - same or not

BR, Jan

I am experiencing a similar issue. My setup is as follows,

Operating System : Windows 10 / Ubuntu 20.04 (I am using a dual booted PC and am experiencing this issue independent of which OS I am on)

Device : mbed NXP LPC1768

IDE : Keil Studio Cloud

When I attempt to build and run my program I am prompted with the error “usbConnect error: Failed to execute ‘open’ on ‘USBDevice’: Access denied.” The flashing process then hangs indefinitely. Any help or potential directions to trouble shoot would be much appreciated.

Edit : Given Keil Studio Cloud is a browser based IDE I should state the problem persists independent of browser, I have tried using google chrome as well as Edge


that makes more sense. Keil Studio Cloud uses the webUSB API and this must be supported by the hardware.
Please be so kind and take a look to this - New beta firmware for LPC1768 - Keil Studio - Arm Mbed OS support forum

BR, Jan

1 Like

Hello, I have the same problem,
I have Windows 11
Device: mbed FRDM-K64F

IDE: Keil Studio Cloud
When I try to compile and run my program, I get the error “USB connection error: Could not execute ‘open’ on ‘USB Device’: Access is denied.”
Previously, I did not have this problem.

A possible cause of this is if you have another program open that is claiming the USB device (e.g. like a desktop IDE). Could you check whether this is the case please?

1 Like