Sending Bluetooth text of byte isn't working Android=>HC06=>arduino Mega

Hello all,
i have a problem with sending messages from APP to arduino trough bluetooth.

Sending from arduino is working and bluetooth connection also.
used a osciloscope to see anything is sending and no signal is coming from the app.
tried Dabble app and then sending functions works. so not a hardware fault or connection problem to my point of view
using the Serial from IDE also that is working.
tried to look at all which was already posted on this and all advice i could find or change i think i already did.
smartphone has android 13 version one ui 5.0
if i missed anything please ask
or did something wrong
if any advice is possible please help
my files are here posted :

buildup_KH_MEASURE-DOSE .TXT.ino (17.5 KB)
KHSMARTDOSER.aia (17.8 KB)

Dear @KIHON ,
I've downloaded your .aia, and it works on my Lenovo Pad Android 9.
I've used Teraterm to check if the app is sending out some data and what I see is the annexed picture.
I don't know whether it is a problem of Android level (for sure in release 9 there is no need to ask for BT permission).
So, I suggest you to verify with a simple "terminal application" on your PC to verify if the app is really sending data or not (of course the PC and your Android device shall be BT visible and connected themselves, before).
Hoping this can give you some idea.

Ciao, Ugo.

Hello Kihon

Make a test App that only sends, not receives. If that fails, come back to us with accurate details of the devices in your Project - ensure they all have the same type of Bluetooth (Classic or BLE) - see the charts on my website:

https://www.professorcad.co.uk/appinventortips#TipsBluetooth

1 Like

Thx for your time and advice!
I do my best and Come back.

just for completing this, because is didn't work at all.

I didn't gave up and in the end the problem was not the programing of mit but. the Softwareserial!!! it messed up the mega 2560
when i got rit of this lib and used one of the extra serial interfaces of the mega (serial1 serial2 en serial3) it worked just fine.

so just in case anyone came with a serial which is not working but you can actualy measure the pulsed - uart code with an oscilloscope but it does not work in any way if you are using softwareserial.h => use the extra serials on the mega!!

Thanks for your feedback @KIHON.
One thing that I can add is: beware of the delay() function on Mega, because it blocks the serial communication (it disables the interrupts).
Cheers.