BLE Characteristic UUID issues

I created an app: Thunkable

This app is using BLE to talk to an HM-10 module on arduino. When I scan, I find my device. When I connect, it reports that it is connected. When I try to send a string I get the error: “Can’t write the characteristic provided”.

I attached screen shots of my block, lightblue screen shot, error message.

I used lightblue to find the Advertised Service UUIDs. Is that the correct ID?SurfBleBlock

I Have the same issue using IOs and hm-10…

You need to ensure the device has READ, WRITE characteristics, and possibly NOTIFY and INDICATE.
You normally have separate UUID characteristics for TX and RX.

In you first UUID I assume that is the service UUID, you may also need additional ones so add TX and RX characteristic ids as below, I’ve indicated the first block, keep the rest the same.

0000ffe1- etc
and
0000ffe2- etc

HTH

1 Like

Over the weekend, I was playing around with the UUID and found that I needed to use 0000ffe1-… instead of 0000ffe0…

I am now able to send the commands, and the Arduino with HM-10 module is receiving the message and doing its work as expected.

marothwell,

ISSUE:
I can’t get any value in the label except a simple comma from Device Names when I do a device scan

BACKGROUND
I have a design that I implemented in AI2 and Android Studio but there are many features that ThX has that would expedite my schedule. So, I made the transition.

I’m using a ESP32 with BLE.

The issue that I’ve had for the last 2 days is that I can’t get past the initial scan…possibly you could lead me in the right direction.

I’ve created a very small test program. The Design is a scan button and a label, that’s it. The blocks section is basically what you have in your design, that is:

image

That’s all there is to the test app, there is no more.

Question
when you do a scan with the above block do you see device names in the lbl_BlueToothCon?

Any input would be appreciated.

Use a list to hold the returned devices, a list will be populated with BLE as text, some empty entries I assume are standard Bluetooth.
I am currently working on a controller that I have produced for Android, much simpler and better handling, there is no disconnect, which means that the device you are connecting to has to be reset to clear the connection. Big omission in my opinion, you should be able to gracefully disconnect for any device.

From [device names] (a list viewer) set text to [Device Names]
This issue was causing me so much grief, it would be great if they explained that the returned values could be directly input to a list viewer.
And they’d like me to spend $200 for a limited program generator. Maybe if they fixed these basic options, or at least give a time line for such.
I can connect, but cannot send data as it refuses to accept the Characteristic ID

Yes, I do get a list of device names in my label. It does take a few seconds, so you have to wait.

It takes 10 seconds, but parsing a string is also difficult and does a lovely white screen.

With a list picker at least you can select your preferred device with a touch and connect to it by item.

ejones - could you show my your block for the list picker? I have tried a couple things, but not had success.

image

Ive added a text to speech to give audible feed back, you can ignore those.
The important line is in the then do last line to populate the device_list text items.
place a list viewer on the screen first, then in blocks you can populate it.

HTH

My connect is as follows

You need the pick list to obtain the text to enter in the connect option.

Thank you so very much,

I just could not get it to work until I replaced that 0 with a 1 and… voila.

All my coding club students need BT remote control for there robots. Now i can Thunk instead of AI2ing…and IOS can join the party too.

UR Genius.

just so you know @iainmorris111649l , @ejones.uk was last seen Mar 24, 2020