SPCmeter (1).aia (1.7 MB)
This should be
Notice how I dropped that trailing '|' and
changed the last print() to a println() to add a Line Feed at the end of the message.
Also change
to
in order to turn on end of line sensing, then change
to
(3 corrections)
- bytes available
- bytes requested
- if/then list length check
my app does not show any data
even though i followed the steps correctly
Does your app connect?
(Canned Response ABG - Bluetooth non-BLE SCAN Permission Blocks)
The easiest solution, for immediate relief
(from @Barry_Meaker) ...
I had the same issue. The problem is your app does not have permission to see nearby devices. The solution is to give your app permission on your phone (no code changes in your app).
on your phone,
- goto settings
- search for your app
- in App Info for your app select Permissions
- change Nearby Devices from Not Allowed to Allowed
- Done
By the way, the very first time you run the app, Android will ask if you want to grant the app this permission. If you say no, or ignore the pop-up, the permission will be set as Denied. Android will not ask again.
A more complex approach, for professional app development:
See Bluetooth liste of devices deosn't work anymore - #7 by Anke
Special note for Xiaomi devices:
I have an error with bluetooth on android 12, Xiaomi Poco X3 NFC - #20 by Patryk_F
...
Can you connect and receive data using a general purpose BlueTooth terminal app from the Play Store?
that doesn't seem to be the case
every time the app is downloaded permission is always changed
What I mean is the app has permission to see nearby devices
Don't forget to test the sketch with a third party BlueTooth terminal app, to avoid wild goose chases on the app side.
Be sure the sketch is actually sending data.
Try communicating using this app:
I also tried but it seems like the data is not received ,there is no data
If you are not receiving any data on a BlueTooth terminal app, the problem is not with your AI2 app, but with your sketch or your hardware.
I'm not a hardware guy (@Chrisward, @uskiara, @Ghica , ...)
Check for crossed tx and rx wires and wrong voltages.
Post your hardware and wiring setup here.
Dear @REXEL_CAMPOMANES,
as @ABG has said, please check the connection between Arduino board and shield (don't care if in the annexed image you find a NANO and a HC06. the same applies to UNO and HC05.
Just take care to cross the wires. The other hint @ABG ha already given you, that is to use Serial Bluetooth Terminal free app, is important to discriminate whether your Arduino side is working (transmitting) properly or not.
HC06 Connection_3_3VDC.pdf (714.6 KB)
In the meanwhile I try to find another topic where I had annexed a complete working package (App and ino codes) so you can give it a try.
Cheers
EDIT: I've found the old topic:
Please have a look to my answer #25
Thank you very much
you were right the fault lies in the wires
Dear @REXEL_CAMPOMANES,
many thanks for your feedback.
I've set therefore @ABG's response as the solution
Cheers.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.