A device for maintaining a connection through at least one wireless network (14 or 16) to a server , the device comprising a first modem and at least one second modem , each of the first modem and the at least one second modem comprising data storing means (122m or 124m), each of the data storing means storing at least one International Mobile Subscriber Identity, IMSI, each of the first modem and the at least one second modem having an active mode and an inactive mode, the first modem being initially in the active mode and being included in a first data path between the device and the server, the at least one second modem being initially in the inactive mode, the device comprising a modem manager , the modem manager is configured to: - receive , from the first modem, a first service quality measurement on a used IMSI1, the IMSI1 being associated with a first IP address; - receive , from the at least one second modem, at least one second service quality measurement being indicative on a IMSI2, the IMSI2 being associated with a second IP address; - determine , based on the at least one second service quality measurement and the first service quality measurement, the best service quality measurement; - send , to the second modem, only if the second service quality measurement is greater than or equal to the first service quality measurement, a command for switching from the inactive mode to the active mode; - send , to the server, once the second modem has switched to the active mode, a message including the second IP address, as a currently active IP address of the device, and the first IP address, as a previously active IP address of the device; - route , only if the second service quality measurement is greater than or equal to the first service quality measurement, data from the first to the second modem, the IMSI2 substituting the IMSI1 at the device, the second modem being included in a second data path between the device and the server; and - send , to the first modem, only if the second service quality measurement is greater than or equal to the first service quality measurement, a command for switching from the active mode to the inactive mode, said device storing secret shared with the server, the modem manager is further configured to send, to the server, data in an encrypted manner while using the shared secret and/or to receive from the server data in an encrypted manner while using the shared secret. - receive , from the first modem, a first service quality measurement on a used IMSI1, the IMSI1 being associated with a first IP address; - receive , from the at least one second modem, at least one second service quality measurement being indicative on a IMSI2, the IMSI2 being associated with a second IP address; - determine , based on the at least one second service quality measurement and the first service quality measurement, the best service quality measurement; - send , to the second modem, only if the second service quality measurement is greater than or equal to the first service quality measurement, a command for switching from the inactive mode to the active mode; - send , to the server, once the second modem has switched to the active mode, a message including the second IP address, as a currently active IP address of the device, and the first IP address, as a previously active IP address of the device; - route , only if the second service quality measurement is greater than or equal to the first service quality measurement, data from the first to the second modem, the IMSI2 substituting the IMSI1 at the device, the second modem being included in a second data path between the device and the server; and - send , to the first modem, only if the second service quality measurement is greater than or equal to the first service quality measurement, a command for switching from the active mode to the inactive mode, <EOS>