Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

102
Visualizações
WebUSB : DOMException Acces denied

I am trying to connect to Android phone using WebUSB with USB debugging OFF. But It return an error DOMException Acces denied. Basically, I want my PC to connect as USB client (like Keyboard or any usb device) to Android phone.

However, Other USB devices (like USB audio device) are not giving any error. I recieve access error on device.open()

  let device = null
  let configValue = 0
  let interfaceValue = 0

  

    const connect = async() => {
        try {
          device = await navigator.usb.requestDevice({
            filters : [{}]
          });
          await device.open()
          // if(device.configurations.length > 0){
          //   configValue = device.configuration.configurationValue
          //   interfaceValue = device.configuration.interfaces[0].interfaceNumber
          //   await device.selectConfiguration(configValue)
          //   await device.claimInterface(interfaceValue)
          // }
          console.log(device);
        } catch (error) {
          console.log(error);
        }
      }
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

When an Android device does not have USB debugging enabled it does not provide a USB interface that Windows will allow a user-space application such as your web browser to claim. This is why you get the "Access denied" error.

It sounds like what you are trying to do is have your computer act as a USB peripheral so that the phone connects to it as the USB host. This is not supported by most desktop USB controllers and this mode is not supported by the WebUSB API.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda