Bluetooth LE - What am i doing wrong here please?

Hello

I have a simple app that connects to a ble device connected to an arduino that reads sensor data.

What I want the app to do is this:

When it opens, scan for ble devices
If after 10 seconds it can’t find any, prompt to scan again or exit
If device found, connect with the specific address and start reading the values

But it seems to fall over when scanning for devices. As soon as the app opens it says “Runtime Error - Not connected to a Bluetooth low energy device.” with an “End Application” button.

I can’t see where this could be going wrong.

Some help would be very much appreciated.

Many thanks

Rich

Vanduino.aia (189.5 KB)

i m working on somthing like this but when u register for bytes u need to read it from the specific Uuid
i ll send u pic to understand


on this example i get the name of BLE coz i ve set the Uuid of device name
hope that helps u to undertand

Hi

Thanks, but getting the data isn’t the issue, that part works fine.

Here are the OP’s blocks, to save time for the BLE experts …

Thank you… :smile:

Managed to figure it out myself.

I ditched the scanning altogether as I only ever want to connect to a specific address and now it works as expected.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.