# Issues with BLE read/write byte array blocks

**URL:** <https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148>\
**Category:** BLE / BlueTooth\
**Tags:** bluetooth\
**Created:** [May 4, 2022, 8:33am UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148 "2022-05-04T08:33:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 4, 2022, 8:33am UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/1 "2022-05-04T08:33:25Z")

</div>

I’ve been testing an app with BLE send/receive and was working fine up until yesterday afternoon when all of a sudden every attempt to use any blocks with send or receive crashes the app.

I tried an old app that was working and it also crashed.

Could this be a new **bug**?

@domhnallohanlon  
@jared  
@cassandra

---

<div class="post-metadata">

**Author:** ![multitech-visions](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/multitech-visions/32/130537_2.png) [@multitech-visions](https://community.thunkable.com/u/multitech-visions)\
**Post date:** [May 4, 2022, 1:14pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/2 "2022-05-04T13:14:59Z")

</div>

_Thanks for reporting this @muneer_

* * *

Hey everyone,

My name is Matt; Muneer has been assisting me with prototyping an app-integration with a blood pressure cuff device a client of mine is wanting to integrate into our services.

So far it _seems_ like we’ll be able to use Thunkable for this integration, saving a lot of time and $$$ for my client, but as Muneer pointed out there’s some sort of bug with the BLE stuff.

* * *

### _Just to provide some background on the project:_

- My client is the director of operations for one of the largest hospital chains in New York
- One of the charity services offered is blood pressure monitoring, and early alerts, for fire fighters in the NYC area
- We’ve found a device that we can purchase a ton of, and distribute them to the guys
- We now need to build an app that can easily collect the info from the BP devices, and upload them to our cloud

I’d like to use Thunkable for this, as it seems to _really_ reduce the dev-time needed for such a project. _(Especially since it’s a charity thing, we’re trying to keep costs as low as possible)_

* * *

# Anyways…

- any updates on this functionality would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 4, 2022, 4:53pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/3 "2022-05-04T16:53:03Z")

</div>

what kind of device are you connecting to? the cuff mentioned below?

this is new to me, i haven’t heard other issues yet.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 4, 2022, 4:57pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/4 "2022-05-04T16:57:51Z")

</div>

I tested multiple devices. I have OBD2 for car service codes which was working fine but now every time I use the read block it crashes.

I tried connecting the mobile with the LED lamp at home which again a Bluetooth enables lamp but the same.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 4, 2022, 8:39pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/5 "2022-05-04T20:39:44Z")

</div>

any chance you can share a minimal example that would demonstrate this issue? would be great to iron out a lot of these bluetooth issues as soon as possible!

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 5, 2022, 5:36pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/6 "2022-05-05T17:36:36Z")

</div>

I must say that there is a lot of improvement today when I tested the BLE project and the app is not crashing when reading now but when sending byte array ( **transmit byte array** ) then it crashes.

Yesterday all functions were leading to app crash.

This is a demo project that works with my device  
[https://x.thunkable.com/projectPage/6273fcd731028c0012362a50](https://x.thunkable.com/projectPage/6273fcd731028c0012362a50)

**[Update]**  
I must add that the project I’m helping @multitech-visions requires transmit and receive **byte array** therefore this becomes a show stopper.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 5, 2022, 5:47pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/7 "2022-05-05T17:47:00Z")

</div>

have you connected with lightblue yet?

I saw something earlier where a device was sending notifications that are byte arrays but not sending a message

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 5, 2022, 5:49pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/8 "2022-05-05T17:49:17Z")

</div>

This should answer your inquiry

 ![IMG_20220505_204758](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/d/1d5c9c1bde96db8c30ee5ad666570ca8fc44a05a.jpeg)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 5, 2022, 5:51pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/9 "2022-05-05T17:51:14Z")

</div>

so you can’t receive anything from it, but you should be able to send a message?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 5, 2022, 5:51pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/10 "2022-05-05T17:51:46Z")

</div>

> [@jared](#):
>
> a device was sending notifications that are byte arrays but not sending a message

Yes this can happen because Thunkable does not actually read `notification` (which in BLE terms are `broadcast` messages).

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 5, 2022, 5:53pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/11 "2022-05-05T17:53:33Z")

</div>

> [@jared](#):
>
> should be able to send a message?

When I send the message as **text** I can see it in my BLE device but when I try to use **byte array** the app crashes. Trying to read **byte array** gives error too.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 5, 2022, 5:57pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/12 "2022-05-05T17:57:08Z")

</div>

I just ordered a arduino kit to try and help debug the BLE issues.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 5, 2022, 6:00pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/13 "2022-05-05T18:00:20Z")

</div>

> [@jared](#):
>
> device doesn’t transmit a readable byte array

I showed you the characteristic UUID for the port I am trying to **write** to. This is a programmable device so I’m happy to send you the setting of the other port for reading (transmitting from the BLE device to my app).

 ![Screenshot_2022-05-05-21-01-23-14_8150e79d448fb1416d0b84d84dff993c](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a6cca048191f218362e526e1ba268610e90def82.jpeg)

---

<div class="post-metadata">

**Author:** ![multitech-visions](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/multitech-visions/32/130537_2.png) [@multitech-visions](https://community.thunkable.com/u/multitech-visions)\
**Post date:** [May 5, 2022, 7:41pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/14 "2022-05-05T19:41:43Z")

</div>

Thank you all for the continued work to get the BLE integration working! Your efforts are much appreciated! (^\_^)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 5, 2022, 9:39pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/15 "2022-05-05T21:39:53Z")

</div>

It would seem there’s an error. I just bought an arduino to begin testing with this. Is there another device that would be relatively cheap that would suffice in your opinion?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 6, 2022, 4:29am UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/16 "2022-05-06T04:29:42Z")

</div>

> [@jared](#):
>
> Is there another device that would be relatively cheap that would suffice in your opinion?

I was thinking of a crazy idea but haven’t tested it yet.

In MIT App Inventor, you can choose between a Bluetooth client or a **server**. If you develop a Bluetooth server then you can actually have the app running in an Android device then you can connect to it from your Thunkable project while you can design the MIT project to display whatever received from your Thunkable project.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 6, 2022, 2:10pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/17 "2022-05-06T14:10:23Z")

</div>

wow. that’s so much simpler than I was planning! Would you want to connect via zoom and chat more about this. I’ve not used AI2, though i’m sure some of my coworkers have.

No pressure either way but would love to help get this all figured out as soon as possible.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 6, 2022, 2:33pm UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/18 "2022-05-06T14:33:22Z")

</div>

> [@jared](#):
>
> connect via zoom and chat more about this

Sure we can come to zoom. I’m with the family right now enjoying **Eid** holidays (It is the holiday after the whole fasting month of Ramadhan). But can plan for tomorrow or whenever convenient to you.

---

<div class="post-metadata">

**Author:** ![multitech-visions](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/multitech-visions/32/130537_2.png) [@multitech-visions](https://community.thunkable.com/u/multitech-visions)\
**Post date:** [May 12, 2022, 12:19am UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/19 "2022-05-12T00:19:43Z")

</div>

Any news or updates on this? My client is getting a little squirrely… 😂💪👍

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 12, 2022, 12:43am UTC](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148/20 "2022-05-12T00:43:06Z")

</div>

You should be able to read a byte array at least. Can you try that? It should be partially fixed, I believe. Not at a computer now but can check on the overal status of this in the morning.

[Next page](https://community.thunkable.com/t/issues-with-ble-read-write-byte-array-blocks/1861148.md?page=2)
