BLE Bluetooth extension issue

hi guy i am trying to send a simple '0' and '1' to a BLE module and arduino

the problem is that when i click on the button to send 1 or the other button to send 0 the app closes by it self

i need your help ASAP cuz i have an exam :frowning:

See this thread

about what needs to be done

Taifun

Many thanks for your reply.

I added the permission block, but the fact is the app connects to the module normally it's just when i click to send any data the app closes by itself.

It's urgent for my exam if someone could help.

You forgot to provide an updated screenshot of your relevant blocks...

Did you also add a Bluetooth client component?

Use logcat to find out what is going on

Taifun

Dear @Talent_Tech,
probably you can find help in the following recent topic:

In that thread you will see that @Chris found the solution for the Arduino NANO33 (BLE) while I've added also the Arduino code working for an ESP32 (featuring a BLE comms as well).

Rgds.

Hello Talent Tech

Your Service and Characteristic UUIDs are identical - they cannot be.

Ensure your Sketch (.ino) is singing the same song as your App Code - same pair of UUIDs, expecting to receive the same data type.

I suggest using 'Write Shorts' instead of 'Write Bytes', we have enjoyed more success with Shorts.

Make sure you are using the latest MIT BLE Extension. You will find it on my website:
https://www.professorcad.co.uk/appinventortips#TipsBluetooth

In your Topic post, you say you are sending '1' and '0' but in your blocks it's '48' and '49'?

You need to have location switched on, it's a Google Security Measure.

Your Send buttons do not check for connection, which may have been lost - that would cause a crash that you describe.

2 Likes

HI All
I really appreciate your help but even i tried to adjust the code as you can see in the screenhot attached

the once i click the button to send data the app closes by itself i tried that using different android phones with different software versions

I think there is a global issue in mit in this library, i am using the last update as the link below

Hello Talent Tech

Unfortunately, that isn't the latest MIT BLE Extension - I already directed you to my site which correctly links to the latest. This isn't a problem with the Extension in this instance, hundreds of people are using it daily without issue, but you must use it correctly.

More speed less haste:

  1. Your Service UUID and Characteristic UUID are still the same when they must not be the same.

  2. You do not use a label in your App that tells you the process status, even though my example blocks show you how to.

  3. Have you switched location on (Smartphone)?

  4. What is the Make, Model, Android version and Bluetooth version of your phone?

  5. What is the make and model of your Bluetooth Module?

  6. What is the exact model of your Arduino?

  7. Upload your Arduino Sketch (.ino) as a file so we can take a look at that. As I said before, the App and the Arduino must be singing the same song.

  8. Take a photo of your Arduino that clearly shows the wiring.

1 Like

HI ChrisWard

It was my mistake that i didn't see that the UUID are the same.

The issue has been Resolved once the UUID is updated.

Thanks

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