# Strange behaviour with BLE and HM-10

**URL:** <https://community.thunkable.com/t/strange-behaviour-with-ble-and-hm-10/641973>\
**Category:** BLE / BlueTooth\
**Tags:** serial, bluetooth\
**Created:** [June 28, 2020, 12:03pm UTC](https://community.thunkable.com/t/strange-behaviour-with-ble-and-hm-10/641973 "2020-06-28T12:03:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tponcota5ks](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@tponcota5ks](https://community.thunkable.com/u/tponcota5ks)\
**Post date:** [June 28, 2020, 12:03pm UTC](https://community.thunkable.com/t/strange-behaviour-with-ble-and-hm-10/641973/1 "2020-06-28T12:03:18Z")

</div>

Hi,

I’m experiencing an issue when trying to read the custom characteristic of an HM-10 bluetooth module with the BLE Component. Here are a few precisions:

- Writing data works as expected
- I can read and write data with the BLE Scanner app (haven’t try others)
- When writing with Thunkable or read/writing with BLE Scanner, everything works as expected with my serial monitor on Arduino Nano.
- The error flag of the Receive function does not fire. Instead, it seems the function is just returning “empty” data.
- An error is triggered when trying to receive a Byte Array instead of String.
- I can without problem read data from another characteristic (for example Device Name). It displays the string as expected.

Here are the blocks I am using. I have tried several things but I couldn’t make it work.

![thunk_2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/3/0346d59b6005268dc77617ba194463e52da2b30f.png)  
This works and Reception\_Label changes according to the name of the Device Name characteristic

![thunk_1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/4/a48cca653690a03058a2237528f5c536faf338ae.png)  
This doesn’t work. Reception\_Label remains empty (it is changing as it is not empty at first).

![thunk_3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/0/f0f44ed94c46416feed64b4e144667ff18000051.png)  
This triggers the following error : “n is not a function. (In ‘n(void 0,v.t0.message)’, ‘n’ is undefined)”

The blocks in charge of connecting to the device seem to work properly as I can Transmit data, and Receive data from another characteristic.

Also, the characteristic is set for Read, Write, Notify and others, as I can read/write without problem with BLE Scanner.

I have also tried different TYPE configuration (0,1,2,3) for the HM-10 without any success. Apart from this, I am using almost all the factory settings.

Does anybody have experienced this issue before ? I’ve seem other people having trouble with the BLE component and HM-10 but never this particular problem. Most of them would receive incoherent data but all of them receive at least something.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![tponcota5ks](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@tponcota5ks](https://community.thunkable.com/u/tponcota5ks)\
**Post date:** [June 28, 2020, 12:22pm UTC](https://community.thunkable.com/t/strange-behaviour-with-ble-and-hm-10/641973/2 "2020-06-28T12:22:17Z")

</div>

After further investigation, here is an aven weirder behaviour. When I Transmit data, it works (I get it on my Arduino’s Serial monitor. However, the function Transmit does not seem to return anything.

For example, with the following code, Send\_Label does not update at all (remains as initialized) and no vibration is trigerred at all.

![thunk_5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/0/90849dc1d7287362db78b71f8624e4566d54549f.png)

Again, the data is received by the HM-10 and is transferred to Arduino Nano via Serial.

Any idea of what’s happening here ?

---

<div class="post-metadata">

**Author:** ![mbnarciap9xb](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mbnarciap9xb](https://community.thunkable.com/u/mbnarciap9xb)\
**Post date:** [January 6, 2021, 8:35pm UTC](https://community.thunkable.com/t/strange-behaviour-with-ble-and-hm-10/641973/3 "2021-01-06T20:35:13Z")

</div>

Was this ever solved? I wasn’t able to figure it out either.

I believe is has something todo with the Data format or notification/indication characteristic.

---

<div class="post-metadata">

**Author:** ![andrew.wise](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@andrew.wise](https://community.thunkable.com/u/andrew.wise)\
**Post date:** [September 6, 2021, 8:38am UTC](https://community.thunkable.com/t/strange-behaviour-with-ble-and-hm-10/641973/4 "2021-09-06T08:38:46Z")

</div>

I’m having the same exact problem when I transmit, it does not execute the Then Do even though the value is received. Any update on this issue.

---

<div class="post-metadata">

**Author:** ![ioull](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioull/32/136117_2.png) [@ioull](https://community.thunkable.com/u/ioull)\
**Post date:** [July 19, 2022, 9:17am UTC](https://community.thunkable.com/t/strange-behaviour-with-ble-and-hm-10/641973/5 "2022-07-19T09:17:25Z")

</div>

I have exactly the same issue … And don’t find a workaround …  
After successfull transmit a message the ‘then do’ block is not called …  
If an error occur during transmit, then “then do” block is called.

I’m not using HM-10, but a nordic chip, and I run the app in the thunkable live android application

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:25am UTC](https://community.thunkable.com/t/strange-behaviour-with-ble-and-hm-10/641973/6 "2024-11-08T11:25:24Z")

</div>


