Getting UUID of a BLE device in thunkable

Hi

I’m a first time user of thunkable and want to make an app that connects to a bluetooth LE bicycle speed sensor.

There are some helpful youtube tutorials that show how to connect but they all seem to use a different program to find the UUID. Is there anyway that you can use thunkable to scan the device to find it’s UUID and then use this to input the UUID so that my app can receive data from the BLE device. I want to have the app work with different speed sensors, not just the one I have. So having this all done in app would mean others can use it without having to use something like Lightblue and having to type in their UUID.

Is there any way to do this?

Thanks,

Paul

1 Like

Welcome to Thunkable,

You are diving into a deep subject. BLE devices either has their own UUID supplied by the manufacturer or you would assume the generic or sometimes called base UUID which is
00000000-0000-1000-8000-00805f9b34fb

Note that the first block cannot be all zeros and you need to know what kind of service the device is providing to replace the last 4 zeros of it.

For example, heart rate monitors will have 180D and therefore the full UUID will be
0000180D-0000-1000-8000-00805f9b34fb

It does not stop here. Once the device is connected it should send Characteristic UUID which is different from the previous one. In the case of the hear rate monitors it will be
00002A37-0000-1000-8000-00805f9b34fb
Which you should monitor to get the heart rate update.

Of course different devices has different numbers.

Hope this helps.

1 Like

Thanks muneer. This is very useful to know. So for all heart rate monitors (as an example) they have the UUID 0000180D-0000-1000-8000-00805f9b34fb regardless of the brand?.

For some reason I was thinking that the UUID would be different for different brands of speed sensor, hence I would have to find out the UUID from the specific sensor being used. But if it is the same then that is great! I can use the UUID base and just replace those last 4 zeros with the speed sensor code (which I can look up). And hopefully that will allow me to connect with a speed sensor.

Then I will just need to find the characteristic UUID for the signal related to speed. Again, I can look this up. Hopefully this would then enable me to connect and get a readout from the speed signal from the sensor.

This would be a great start from which I can find out how to process this signal to actually read out speed and integrate into my app…

1 Like

Yes, as I explained, if the BLE device is not given its own UUID then you use the base UUID.

If the sensor is emulating a serial device then use 1101 if it emulates OBEX then use either 1105 or 1106.

If the device follows the new standards then it will send it’s characteristic UUID when connected.

Great thanks.
For devices that do follow the new standards and send their characteristic UUID when connected. Is this something that can be read using thunkable? The tutorials I have seen so far seem to indicate connecting only reveals the device name and id but not UUID, and that the UUID is needed before you are able to receive data from the device.

I’ve just used lightblue to find the UUID of my speed sensor, and it doesn’t seem to follow this naming convention as it gives UUID: DB1A7ADE-76B1-7C9E-082F-70A958DA2F93

It would be great if there was a way to list all devices for the user to choose from, then for my app to retrieve its UUID to input in the “call Bluetooth receive string” block, so it would work even if the speed sensor doesn’t follow the UUID naming convention.

1 Like

Once you are connected try reading these 3 service characteristics

00002a5b-0000-1000-8000-00805f9b34fb
00002a5c-0000-1000-8000-00805f9b34fb
00002a5d-0000-1000-8000-00805f9b34fb

The speed data will be sent through one of these UUID.

1 Like

Thank you.
I’ll try that this weekend.

1 Like

Thanks for this info. A little later that I hoped (work has been stopping me from doing anything fun), I’ve just had a go, but fallen at the first hurdle. I didn’t realize Bluetooth Low Energy components can only be previewed on Android devices. I have an Apple device, and was hoping to use this. Does anyone know if Thunkable has any plans to get the test feature working on Apple, or am I going to have to get an Android device or find a friend with one? Or is there another way I can test?

1 Like