Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

102
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!