Dear Maggie,
I've just developed a couple of days ago, an app that behaves like a BT gateway between a smartphone and an Arduino, which is equipped with a HC06.
In attachment you can find the .aia, the Arduino code (in txt format) and a document that explains all the HW and the SW (at least in my thought
).
It operates on the basis of a watchdog (more or less). In few words: the Arduino board sends an "alive" character to the app every two seconds. If the app does not receive the "alive" character, it tries to reconnect the Arduino. Of course if Arduino is "dead" the app hangs in trying to reconnect it. If you want that after a certain number of retries it sends out a notifier you have just to modify the app in that sense.
I hope it helps.
Cheers, Ugo.
SMS_BT_IOT_ino.txt (8.6 KB)
IOT_SMS-docx.pdf (351.2 KB)
SMS_BT_Gateway.aia (1.7 MB)