Agraham, thank you. I agree with you that the connect event ist only fired when you are trying to connect with the rapi.connect method.
But now I am totally confused ... I try to connect periodically by a timer event ... now I get a connect event even when the device is physically disconnected

Please have a look at my attached example.
I am creating a file sync program, but this connect event is driving me nuts.
