Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

107
Vistas
How to write a hex array to the device

Because the device's document just let me know how to send byte-by-byte to communicate with the BLE Device. Example: When turn on the light, the command will be

Byte 0: 0x01, Byte 1: 0x32, Byte 2: 0x5A, Byte 3-4: 0x042A, Byte 5-18: 0x0024....2A, Byte 19-20: 0xB21F. I saw a lot of Bluetooth API document and example. When sending a value to device, we need to use

await characteristic.writeValue(Uint8Array.from(data))

But when I try to put a long hex buffer array like this [0x32,0x5A,0x04,0x2A,0x00,0x24,...,0x2A,0xB2,0x1F] into "data" I got an error like this:

NotSupportedError: GATT Error Unknown

But when I try a shorter command for changing some setting ([0x01,0x2a,0x58,0xab,0x00,0x1b,0xbf]) this error disappear.

So can I send a long Hex array to BLE device by Javascript code?

Sorry my English is not good and this is my first time asking in StackOverflow

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda