[Solved] Bluetooth LE Transmit Byte Array

A few questions about the “data (byte array)” option of the BLE transmit block:

1: What data type does it actually take (i.e. list, number, string, etc.)?
2: Why does it just instantly crash the Thunkable Live app whenever I attempt to transmit with it? Bearing in mind that the transmit string option works just fine.
3: Is the inability to transmit purely an issue with the Thunkable Live app (i.e. if I was to download and install the app on my phone, would it then work successfully)?

If it helps anyone, the phone I’m using is a Xiaomi Mi 9t Pro (Android) and my desired application is to send literally a single-byte value to a BLE module (again, if it helps, a RN4871 by Microchip). Ideally, I would want this value to be produced by a slider but honestly, I’ll take something that will actually work for now.

Thanks in advance for any input on this topic.

EDIT: It’s not just the Thunkable Live app.

Hey @abrotzman4598f5a4 - welcome to the community!

  1. My assumption was a string, but I can follow up with the team an get a confirmation for you.
  2. Hard to say for sure without testing it out.
  3. I’d recommend doing this as a first step - can you try installing your app and let us know if that makes any difference.

Thanks.

First off, downloading and installing the compiled app made no difference to crashing.

I did, however, find a workaround for TRANSMITTING RAW HEX DATA. If you use the ‘transmit data (string)’ block but feed it a list with n items, setting each of these items to a number between 0 and 255 inclusive, you can send n bytes (or octets if you prefer) of raw hex data. This skirts the limitation of ASCII characters only covering 7 bits.

EDIT: In this example, this would send a single byte of value 0x03

hopefully, this can be of use to people in the future.

1 Like