[Solved] Can I use BLE on iOS?

Yes, I use the same “characteristic, but receive doesn’t work for iOS. There might be an issue with this block. I wish the Thunkable X team can look at this for iOS”

1 Like

In my case it’s not working: I receive “No device is connected” when I try to connect using Device Name.

Martin, are you sure you are using compiled app, not the preview?

1 Like

Sure! I enabled my app in Device Management, so it’s definately not the preview. BTW I can connect via Device UUID.
When I use Device name I receive “There is no device with name “MyDeviceName”. Please, try it again.”

Sometimes things got somehow “stuck”, and my app cannot communicate with the device. Check the connection to your device with eBeacon, find it on the AppStore. Connect with “Not JAALEE Beacon” option and see if you can see it. Also you have to have location enabled, did you do that?

1 Like

Yes, I can communicate to my BLE device via eBeacon - it works flawlessly

Fixed it. Extremely weird bug:

When Location is Disabled for iOS app I can’t connect to my BLE Device.

When Location is Enabled for iOS app I can connect to my BLE Device only when I close eBeacon or similar software.

But I can connect to BLE Device via UUID when Location is Disabled for iOS app or I have eBeacon or similar software running in background. :crazy_face:

1 Like

i am so terribly waiting for this , i am stuck with BLE receive as well

What’s wrong? This module really works good, it gets stuck only if you are changing boards using same code, etc… Nothing wrong with the module itself!

1 Like

BLE receive block is not working everything else works

You’re using iOS, is that correct @samjikassim?

Well, I have tried to use BLE receive too and I came to the same conclusion. I can transmit, but cannot receive. It happens both on Android and iOS.
I’m getting this error: “Can’t read the characteristic provided”.
When I try to read data with eBeacon, it works. I’m reading the message that I’m sending out of my MCU perfectly.
I’m using ESP32 and with these tutorials and library examples.

i created cross platform app, so it won’t work on android as well on iOS, i can only transmit ,

Receive block fails, when i try to capture and read the output error it says ‘operation is rejected’ , while output data is blank

@samjikassim are you using the location sensor in your app as well?

no i don’t

besides here is a link to the app

https://x.thunkable.com/projects/5c5db495970c04f5171fe126/Screen1/blocks

@samjikassim,

You need the use the location sensor (and have location turned on on your device) in order to get the BLE component working.
Hope that helps

This module is a mess.

When compared with the one provided in App Inventor2 is simply…discouraging.

List of defect (as seen on Android):

  1. the scan operation is slow and very unreliable
  2. if BT is turned off, an error is returned (instead of a popup to the user)
  3. no event management!
  4. no Disconnect method !
  5. no way to specify service_id
  6. no support for service advertisement
  7. no parameters configurable

again, take a look at the original MIT one, and you will see the difference.
Please, consider to improve it.

I was here for the iOS support, but the BLE support is too limited.

5 Likes

I wanted to avoid Blynk and try to control Arduino Nano with HC-06/05 and data-log. With BLE, you can’t send/receive long strings. It wasn’t meant for that. It was meant for some device to last a long time on a tiny button battery and send/receive short bursts. BT 4.0 sans BLE is a better option.

Quite honestly, Thunkable will have to rethink this whole thing. Connecting iOS or Andriod to remote micro-controllers is a big thing and getting bigger. Thunkable may be missing the boat soon.

2 Likes

Hi @ChicagoFred

I am limiting MTU to 20 bytes to remain compatible with older devices. I break my string up into packets. So far I am having no issues with strings of up to 10kb. I have set up handshaking and end to end encryption. My app is not public but I could post an excerpt of the BLE blocks if you need it. Haven’t tested on IOS yet.

Eddie, thanks for the replay. I was just going to play with Cayenne IoT when I read your post. It would be great is you could post it.

@ChicagoFred

https://x.thunkable.com/projectPage/5ecf47913ed5972f7f6ba1fb

I am definitely not an expert and welcome any improvements by thunker obeservers. This public app will be broken but I hope this helps. Try to understand the blocks rather than relying on copying what I have done. The two BLE functions should be self explanatory for segmenting the string and communication with your bespoke device. I have written the receiving BLE code in C for the esp32 (Arduino IDE) if that helps you. Happy to answer any questions but I don’t know if it is appropriate to hijack this thread. PM me if you prefer or open a new thread :slight_smile: