Hi Gustavo, >>> +static void crst_notify(GAtResult *result, gpointer user_data) >>> +{ >>> + struct ofono_modem *modem = user_data; >>> + >>> + ofono_modem_reset(modem); >> >> I suggest you simply clean up the phonesim connection (e.g. closing the >> tcp socket) when you receive this notification, and then call >> modem_reset at the end. > > So here do you mean unref phonesim data->chat and also call > ofono_modem_set_powered(modem, FALSE) before call ofono_modem_reset()? > So I really mean performing the same steps as disable. Calling ofono_modem_set_powered is pretty much optional. The core should simply assume that once ofono_modem_reset has been called, the modem is off and needs to be re-initialized from the beginning. Regards, -Denis