# \[Solved\] Can I use BLE on iOS?

**URL:** <https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [July 5, 2019, 11:45am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834 "2019-07-05T11:45:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)\
**Post date:** [July 5, 2019, 11:45am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/1 "2019-07-05T11:45:02Z")

</div>

I would like to use BLE extension, because I can’t make the current one work on the iPhone:(

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 5, 2019, 12:07pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/2 "2019-07-05T12:07:41Z")

</div>

Hi @neuheisser, I’ve created a new topic for this as I assume you’re using #thunkable-cross?

Can you tell us a bit more about:

1. The BLE device you’re trying to connect to
2. The Blocks you are currently using
3. What you’re trying to do with your app

Thanks!

---

<div class="post-metadata">

**Author:** ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)\
**Post date:** [July 5, 2019, 12:15pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/3 "2019-07-05T12:15:12Z")

</div>

Thanks for your quick response!  
I’m trying to connect to ESP32, I have already uploaded the code (using Arduino IDE) that works with eBeacon app. I learned that iPhone cannot see BLE devices native, rather it needs an app for it.  
eBeacon can see it, connect, and send some text that I see in Serial monitor of Arduino IDE, so I’m sure that my device is OK.  
I’m actually trying to achieve this:

> **[Bluetooth controlled Relay using ESP32 - OpenLabPro.com](https://openlabpro.com/guide/bluetooth-controlled-relay-using-esp32/)**
>
> Bluetooth controlled Relay using ESP32

There you can see blocks that aren’t available with built-in BLE extension.

I’m trying to scan, or to transmit to UUID without scanning, nothing works.  
I’m on iPhone 7.  
That’s it, thank you 🙂

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 5, 2019, 12:26pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/4 "2019-07-05T12:26:45Z")

</div>

Thanks! Can you send a screenshot of the blocks you are using to connect and transmit data?

---

<div class="post-metadata">

**Author:** ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)\
**Post date:** [July 5, 2019, 12:38pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/6 "2019-07-05T12:38:25Z")

</div>

Something like this.

 ![35%20PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/8/b8aff9de5d5f861552df506b190aa4413737b525.png)

Tried also to Scan first, but nothing comes out.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 5, 2019, 1:51pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/7 "2019-07-05T13:51:32Z")

</div>

Thanks for sharing!

I don’t have an ESP32 to hand @neuheisser so debugging will probably be tricky, but a couple of things jump out from your screenshot.

When you connect to `MyDevice` can you use the join block to make the text on Button2 say “Connected to {{Device Id}}”

When you transmit, it looks like your UUID has a lot of trailing spaces, can you try remove those?

---

<div class="post-metadata">

**Author:** ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)\
**Post date:** [July 5, 2019, 1:57pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/9 "2019-07-05T13:57:51Z")

</div>

Tried, nothing happens.  
There were spaces (you rock!), but they don’t seem to make any influence.  
Still no connection ☹

The code actually responds whenever I connect with that other app.  
I couldn’t make it react with this one.

---

<div class="post-metadata">

**Author:** ![jw01563daqgz](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jw01563daqgz](https://community.thunkable.com/u/jw01563daqgz)\
**Post date:** [July 5, 2019, 8:06pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/10 "2019-07-05T20:06:45Z")

</div>

interested in this as well, haven’t got BLE to work either.

---

<div class="post-metadata">

**Author:** ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)\
**Post date:** [July 6, 2019, 12:26am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/11 "2019-07-06T00:26:39Z")

</div>

OK - I found out what’s wrong.  
It is Thunkable Live app for iOS, it cannot connect to BLE.  
Android Live app works great, it connects immediately, sends messages etc.  
iOS app luckily works when you compile it, send via mail and install, but no live preview…  
So that’s it, you have to fix BLE in iOS Live app…

Otherwise, these blocks work surprisingly good, really straightforward and simple. You just connect to device and send messages, nothing more… really cool. Disconnect is maybe missing and some more detailed stuff maybe, but for my purpose this can easily be enough.

![23%20AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/a/aa9ebdb71d07c1998ea5f33be7135057f8e8c8e8.png)

---

<div class="post-metadata">

**Author:** ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)\
**Post date:** [July 9, 2019, 10:56pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/12 "2019-07-09T22:56:15Z")

</div>

And here’s a final update:  
Live preview warns you that it’s not working on iOS, so it’s ok.  
I have coded using Android live prew, but compiled version stopped working on iOS after the app got more complicated, now it doesn’t work on Android too…  
SO… I think I have wasted my time, I will go back to Classic and make it only for Android… Classic has much more detailed and reliable BLE protocol, this one is much simpler, easy to use, but completely unreliable. I hope it might get improved soon.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 9, 2019, 11:24pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/13 "2019-07-09T23:24:31Z")

</div>

Thanks for the feedback @neuheisser - sorry to hear that this isn’t quite ready for you yet.

We are planning updates and improvements so hopefully your input can help with this.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [September 3, 2019, 5:09pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/14 "2019-09-03T17:09:08Z")

</div>

We recently had another user with a similar problem and their solution was to add the `READ` property to the TX characteristic in the UART service on their ESP32. Here’s their full message:

> I programmed my ESP-32 as a server with one Service (UART service) and two characteristics RX and TX. On my RX was allowed only the property of WRITE and on my TX was allowed only the property of NOTIFY (this is done on one of the defaults examples on the ESP-32’s libraries). For some reason, this configuration works well with the iOS App but my ANDROID App couldn’t receive data from the SERVER. So, to make it work on ANDROID and iOS I added the following properties on my characteristics RX and TX: READ, WRITE, NOTIFY, INDICATE  
> …  
> Actually, just adding the READ property on the TX characteristics of the the UART service is enough to solve this and make it work well.

Hope this helps.

-Mark

---

<div class="post-metadata">

**Author:** ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)\
**Post date:** [September 30, 2019, 10:45am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/15 "2019-09-30T10:45:32Z")

</div>

BLE preview doesn’t view with iOS and it is clearly stated if you press “Live Test” button.  
Everything is OK with BLE module, works great, but you have to compile the app for iOS!

---

<div class="post-metadata">

**Author:** ![Mauro\_Novello](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@Mauro\_Novello](https://community.thunkable.com/u/Mauro_Novello)\
**Post date:** [October 5, 2019, 11:41am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/16 "2019-10-05T11:41:36Z")

</div>

Hello. I have no problem sending data. I’m having trouble receiving data, the timer updates every 50 ms, but I don’t see any reception. in addition it is possible to disconnect the external device connected to the ble without closing the app? ![thun](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/b/cb22056baf42a582254d2d567eb4e280f12f3d9b.jpeg)

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [October 7, 2019, 5:22am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/17 "2019-10-07T05:22:45Z")

</div>

Hey

I’ve been trying to get the BLE receive to work for weeks now. I’ using a HM10 module and an Arduino to receive transmit the data.

I have come to conclude that the receive block is not functioning. Hopefully, that would be reviewed soon

---

<div class="post-metadata">

**Author:** ![kylizedewqc8z](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@kylizedewqc8z](https://community.thunkable.com/u/kylizedewqc8z)\
**Post date:** [October 7, 2019, 8:40am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/18 "2019-10-07T08:40:49Z")

</div>

I used Thinkable X BLE with Arduino Nano 33BLE. Both Sending and Receiving work ok. I verified just now. What I experienced:

1. Scan takes a very long time, it finally scans something after I waited like forever. So now I choose to Connect to Device Name directly.
2. Fro both Sending and Receiving, I use “String”. It is very difficult for me to figure out using specific data types, so in Arduino I used generic BLE characteristic.
3. I have to use timer to Receive from Arduino periodically. To avoid congestion I use 100ms loop. In Thunkable side better if we can have a WHEN Received block.
4. So far the apk works fine in Android, but not in iOS. In iOS it does not connect (like my BLE peripheral does not exist). I am still thinking what’s wrong with it. Perhaps build another simpler one to verify?

(Correction: BLE app works in iOS just now, but I am not sure of the thing that I changed. So for No 4 I will keep watching.)

---

<div class="post-metadata">

**Author:** ![kufirre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kufirre/32/45596_2.png) [@kufirre](https://community.thunkable.com/u/kufirre)\
**Post date:** [October 7, 2019, 9:58am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/19 "2019-10-07T09:58:26Z")

</div>

can you share your project here?

---

<div class="post-metadata">

**Author:** ![kylizedewqc8z](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@kylizedewqc8z](https://community.thunkable.com/u/kylizedewqc8z)\
**Post date:** [October 7, 2019, 11:38am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/20 "2019-10-07T11:38:40Z")

</div>

In Android I think it is possible to “Disconnect” without closing the App.

I simply “Connect to Device Name”, and if check if the returned “Device ID” is empty or not.  
It works ok with single button to turn it On and Off.  
However, it doesn’t look very good in iOS, I will check it more.

 ![33](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/2/f24f2247d67e0a9273da027c9c96ba72797c4426.png)

---

<div class="post-metadata">

**Author:** ![kylizedewqc8z](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@kylizedewqc8z](https://community.thunkable.com/u/kylizedewqc8z)\
**Post date:** [October 7, 2019, 11:51am UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/21 "2019-10-07T11:51:09Z")

</div>

kufirre I show you a portion of simple example: polling the XYZ data from Nano 33 BLE accelerator.  
A button is set to turn the polling on and off. When it is on, a timer is activated with a duration of 100ms. Each time the timer is fired, X, Y, Z data are read from the BLE device in respective characteristics:  
0000FFC1-0000-1000-8000-00805F9B34FB (X)  
0000FFC2-0000-1000-8000-00805F9B34FB (Y)  
0000FFC3-0000-1000-8000-00805F9B34FB (Z)

Like I said, I currently convert the float data into char array string in Arduino side so that those data can be read correctly. To give you part of the codes:

void ReadAccelerationSensorData() {  
float x, y, z;  
char buffer\_x[6], buffer\_y[6], buffer\_z[6];

if(IMU.accelerationAvailable()) {  
IMU.readAcceleration(x, y, z);

```
dtostrf(x, ACCE_XYZ_LEN, FLOAT_PREC_LEN, buffer_x);
dtostrf(y, ACCE_XYZ_LEN, FLOAT_PREC_LEN, buffer_y);
dtostrf(z, ACCE_XYZ_LEN, FLOAT_PREC_LEN, buffer_z);

characteristicAcceX.writeValue(buffer_x);
characteristicAcceY.writeValue(buffer_y);
characteristicAcceZ.writeValue(buffer_z);

```

}  
}

I did not try on HM-10 with Thinkable so I cannot identity the actual difference. Hope it helps.

 ![11](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ec7d4a9a401a1c130561c0cc031c59c7b3927c9c.png)

---

<div class="post-metadata">

**Author:** ![Mauro\_Novello](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@Mauro\_Novello](https://community.thunkable.com/u/Mauro_Novello)\
**Post date:** [October 7, 2019, 3:42pm UTC](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834/22 "2019-10-07T15:42:02Z")

</div>

to connect and disconnect the Android BLE system, with the same “connect” command, connect and disconnect the device, with IOS connect it and just do not disconnect even if you call the command.

To receive the HM-10 it appears to me that it uses the same “characteristic” for both receiving and sending

[Next page](https://community.thunkable.com/t/solved-can-i-use-ble-on-ios/132834.md?page=2)
