mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 15:22:20 +02:00
at: don't clear the resetting state on sequence end
If the reset sequence fails, we don't want to transition to the powered state, instead we should stay in the resetting state so we eventually timeout and try a gpio reset. If the reset command succeeds the modem will eventually send RDY and transition the state to STARTED. Since this might take longer to change the modem state, add 15 seconds (for a total of 45) to the at reset timeout just in case. It looks like the modem typically takes about 20 between sending "AT+CFUN=1,1" and receiving "RDY", so this should be plenty.
This commit is contained in:
2
src/at.c
2
src/at.c
@@ -146,8 +146,6 @@ gboolean at_send_command(struct EG25Manager *manager)
|
|||||||
}
|
}
|
||||||
} else if (manager->modem_state == EG25_STATE_SUSPENDING) {
|
} else if (manager->modem_state == EG25_STATE_SUSPENDING) {
|
||||||
modem_suspend_post(manager);
|
modem_suspend_post(manager);
|
||||||
} else if (manager->modem_state == EG25_STATE_RESETTING) {
|
|
||||||
manager->modem_state = EG25_STATE_POWERED;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -271,7 +271,7 @@ error:
|
|||||||
at_sequence_reset(manager);
|
at_sequence_reset(manager);
|
||||||
|
|
||||||
// Setup timer for making sure we don't queue other reset commands
|
// Setup timer for making sure we don't queue other reset commands
|
||||||
manager->complete_reset_timer = g_timeout_add_seconds(30, G_SOURCE_FUNC(modem_at_reset_done), manager);
|
manager->complete_reset_timer = g_timeout_add_seconds(45, G_SOURCE_FUNC(modem_at_reset_done), manager);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user