How to receive and show text/ASCII with BLE

Hi guys, I’m having trouble getting ASCII characters.
Essentially the app should receive and display ASCII characters when the letter “s” is transmitted.
With MITApp I had no problems, but having to do the same application for Iphone I find myself in difficulty.
Thanks to anyone who will help me!

Edit: I’m starting to think it’s a ThunkableX reception blocking issue.
With a BLE terminal sending “S” I receive the information, the same thing done with ThunkableX does not lead to anything.
Can some staff member please answer me so I understand whether to waste time or not with this platform?

UP for visibility

1 Like

Hi,

Try sending a number to start with. If the number is passed in Thukable X, then you are all good. If Thunkable X doesn’t even pass numbers, that’s bad enough.

Hi actech, thank you for your answer.
These are the instructions

I tried in every way but it doesn’t complete the command (it doesn’t vibrate).


In this block If I put a text or a number instead of “data”, it shows it correctly but I don’t need it.
The application only needs to switch on, off and request the status from an alarm control panel.
It performs the first 2 functions, the third does not.
I add by saying that I made the same app for Android with MitAppInventor and it works perfectly.

If I understand you correctly, then only the vibration signal block does not work in your blocks, and the data is perfectly transmitted? In this case, there is a problem with the vibroblock and you need to change the topic title.

No, I do not receive the vibration feedback but it does not even correctly read the ASCII characters sent to me by the device with which it is associated.
I don’t care about the vibration, even if I remove it from the block it does not read / receive the data correctly.
How would you build it?

How did you manage to remove these outputs? It shouldn’t be possible to have empty sockets here.

I pressed the delete button and it got up.
Even with the “error” and “data” blocks present I do not read / receive data.
I only get one question mark in a rhombus.

I’m lost :frowning:

OK, can you send the number 1 and say what you get?

Send number 1 from my app to the alarm?

Sure, but where is the data coming from then if you’ve deleted the output blocks?

Send 1 from BLE device to Thunkable X app

Thank you Domhnall for your answers.

Here some data:

  1. The “data” block is removed simply by selecting it and pressing “Del”.
  2. Its presence or not does not change the “answer” that I get from the application, in any case I receive a question mark inside a rhombus.
  3. Here are the slightest differences between the blocks written with your platform and with MitAppInventor.

  1. I think the “receive” block doesn’t work, I’m not the only one to say it and I would like you to be honest as both my client and I can waste time.
    If your platform has these problems to encourage you to buy the PRO version, it’s ok for me but the important thing is to admit that my problem is not on the programmer side.

How would you have built it? I think it is well written on a logical level.

I tried to get “1” sent but the situation doesn’t change, I keep getting the question mark in the rhombus as an answer.
If I use any bluetooth terminal I get the data I need.

Now I understand. This is a problem. I don’t have a solution for this situation.

1 Like

Thanks for helping me as long as you could, I really appreciate it!

Hi all,

comparing with Thunkable (classic) there is a significant difference:

  • Receiving data from a BLE-device should be an event (a block with “golden” color, not purple).

That way it could be possible to write the following blocks, for example to receive data from a BLE device without waiting for it:

  • when Button1.click: do “BluetoothBLE call Transmit” etc. (to Thunkable: do not forget to implement the serviceUUID)
  • when BlueToothBLE receive: do “from Label1 set Text to receivedData” etc.

I think I will create an issue on github.

Greetings, Michael

I strongly agree to your statement. I fact, I have the same problem and I always get an error form the receive function when I notify form ESP32 (‘Operation was rejected’). The receive function should be definitely an event, anyway. I approached Thunkable because I need e wid a way to implement a BLE dialogue in a timely manner. I found the platform very clever, nonetheless it lacks exactly the feature I need. Hope to get it solved soon.
Regards
Stefano

They don’t care about this problem, I suggest you to go with MIT App inventor, it’s more complete.

Hello, i solved the problem.
My english isn’t so good, sorry, i am from Argentina.
The thing is that you are using a Characteristic on de BLE that isn’t READ. Most of the BLE modules have a Characteristic that NOTIFY when the register change.
I use a ESP32 with Arduino
Fist, i was having the error “operation was rejected” because I created a Characteristic as NOTIFY
I make it work when i defined the Characteristic as READ.
i hope it helps you because i lost several hours with this.

2 Likes