This is exactly the idea I had about keeping the mode in a variable
Though I am not sure if it's required in my case. Yes, you are right arduino resets when pairing but only once so it's not a huge deal at least for now.
I was able to get serial output as well ( it was an issue with my code). The only problem now is that the baud rate of arduino needs to be set to 57600 to match bt module. A high baud rate is not very reliable with bt modules especially over longer distances. Any thoughts on this?
With 9600 baud rate it seems I was able to get about 7meters range with a couple of walls in between but could not connect again at that distance so range is a bit of an issue here... Higher baud rate may make it more unreliable due to corruption.
In any case would love to see your setup whenever you can share it. I wouldn't want to use a timer as that's just an extra component but if I can fix the resetting issue with just a cap that would be great!