Hi,
I have an issue with sending information from my app over BLE to my Nano.
I have tried a few examples I have found online and getting same problem with all of them.
this post I found is almost a match to my issue:
i am using a Nano 33 BLE onto which I have a simple program to turn an LED on/off
I have tested the connection between my android phone and the nano using nRFConnect app and I can connect to the nano and send a 1 to turn the led and 0 to turn it off.
with the app (testing using AI compinion), I can connect to the nano (I get connection confirmation in serial monitor) but when I try to send a 0 or 1 nothing happens on the nano!
Could anyone advise what could be the issue here? LED_Control_BLE.aia (366.1 KB)
Please do not 'bump' your Topics - that will result in your Topic falling lower in the queue - there are thousands of App Inventor Users (Over 400,000 unique active users per month) and only a handful of Power Users here to help.
As you can see from the other Topic you found, at the time we could not connect to the Nano BLE. Nothing since has changed in the App Inventor BLE Extension and at the time I thought there might be a nuance with the Nano's BLE that was not covered by the Extension.
Which App Inventor Extension are you using?
What is the BLE version on your Nano?
What Android Device (phone?) are you using?
3a) Android Version?
3b) BLE Version?
@sherzaad_dinah excuse me, I don't have a solution but a workaround for your project could be use ESP32 Board instead a Nano. I used several times with App Inventor and BLE without problem.
Best Regards
Marco
As stated in my initial post, I could connect to the device with my phone through the app. so that should already confirm compatibility!
wat was NOT working is passing a 0 or 1 to it (still donno why!)
in the end I ditch MIT app inventor for android studio. was harder to build this simple app there but at least passing data to the device works! can now progress to the more complicated stuff...
Although you verified a connection was made via the Android Terminal, it seems that the App Inventor extension did not confirm a connection. Note that we could not help you more because you didn't give us the further details needed to investigate.
You did not show us the error message. You could have tried sending integers or text.
You also did not show us your Arduino Sketch, which might have been different to what App Inventor needs.
Well, that is a good thing Learning Java or Kotlin will serve you well if you wish to pursue a career in Computer Science.
..... It's important that the Android device has 'fine location' switched on. Some Apps are able to do this automatically, your Android Studio App should be able to do it.
For anyone wondering and wanting an fix to this problem, below is the answer with my problem.
I had the exact same problem, the connection is established(tested), the right UUIDs are in. Any other functionality works but when trying to change a characteristic value by sending a value it did not work. There was no error message, the Arduino sketch seemed correct based off prior tests.
The fix is to write to the Arduino with a response instead of doing the normal write int/byte/string(.writeintegersWithResponse).
Hello @Lambert_Brink could you elaborate a bit more on this please. I am having this issue and do not understand the solution. I apologize ahead of time, I am a student who is new to this software.