I have partially solved the problem. The software had nothing wrong and after more 2-3 rebooting of both the phone and the IoT i was able to connect.
Note: when you reflash Rapid IoT always remove the device from the app before flashing! Otherwise it would be hard time to try to reconnect again.