My project sometimes hang with the modem not connecting

Sure You do! But the default one is hardcoded into library, so try just simple

Blynk.config(modem, auth)