Strange behaviour with BLE and HM-10

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
This works and Reception_Label changes according to the name of the Device Name characteristic

thunk_1
This doesn’t work. Reception_Label remains empty (it is changing as it is not empty at first).

thunk_3
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.

1 Like

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

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

Any idea of what’s happening here ?

1 Like

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.

1 Like

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.

1 Like