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

67
Visualizações
Writing to a GATT Characteristic w/ a custom UUID using Web BLE API

I'm having some trouble finding the syntax on how to write to a custom characteristic. Here's my code. I have no idea what to do next. I'm trying to write to a0521000-2a63-479e-9d0a-09dfa7c8fd98 with the following command (in hex): 00 01 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 00 00 00

Thanks for any help.

<script>
  document.querySelector(".unlock").addEventListener("click", function () {
    navigator.bluetooth
      .requestDevice({
        filters: [{ name: "IL8A2" }],
        optionalServices: ["a0521000-2a63-479e-9d0a-09dfa7c8fd98"],
      })
      .then((device) => {
        console.log("> Name:             " + device.name);
        console.log("> Id:               " + device.id);
        console.log("> Connected:        " + device.gatt.connected);
      })
      .then((server) =>
        server.getPrimaryService("a0521000-2a63-479e-9d0a-09dfa7c8fd98")
      )

      .then((service) =>
        service.getCharacteristic("a0521001-2a63-479e-9d0a-09dfa7c8fd98")
      )

        NOW WHAT????
   
      })

      .catch((error) => {
        console.log("Argh! " + error);
      });
  });
</script>
about 4 years ago · Juan Pablo Isaza
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