I made a simple program that is reading a scale, I have connected it to a serial to bluetooth converter.
It connects and works fine. But there are situations that the connection drop, or someone turn off the equipment and turn on, then the connection is lost.
I am using Serial and AsyncStreams to talks with the bluetooth.
I want to know how to detect that there is not bluetooth connection anymore and how to restore it.
It connects and works fine. But there are situations that the connection drop, or someone turn off the equipment and turn on, then the connection is lost.
I am using Serial and AsyncStreams to talks with the bluetooth.
I want to know how to detect that there is not bluetooth connection anymore and how to restore it.