plugins: ublox: bearer: SIM absence should not break disconnect
If we have a modem with an established connection, and then the SIM is getting removed from that modem, this forces modem reprobing sequence. It looks like that: ``` mm-base-modem:mm_base_modem_process_sim_event -> mm-base-modem:mm_base_modem_disable -> mm-base-modem:disable -> mm-broadband-modem:common_disable -> mm-broadband-modem:disabling_step, -> ctx->step=DISABLING_STEP_FIRST -> ctx->step=DISABLING_STEP_WAIT_FOR_FINAL_STATE -> ctx->step=DISABLING_STEP_DISCONNECT_BEARERS ``` At this stage, there is no actual connection existing already, but bearer objects still exist and are still marked as connected. So, if there were any active bearers - they will be disconnected. In order to disconnect, ublox bearer sends +CGACT=0,%u, modem then will return CME ERROR: 10(SIM not inserted): ``` [modem0/ttyACM0/at] --> 'AT+CGACT=0,1<CR>' [modem0/ttyACM0/at] <-- '<CR><LF>+CME ERROR: 10<CR><LF>' [modem0/ttyACM0/at] operation failure: 10 (SIM not inserted) [modem0/bearer0] couldn't disconnect: SIM not inserted ``` this error will break disabling and reprobing. To fix that, it's require to add 'SIM not inserted' state as a valid condition to continue bearer disconnection.
This commit is contained in:

committed by
Alexander Yashin

parent
029ea68ce4
commit
2de0e89589
@@ -689,7 +689,8 @@ cgact_deactivate_ready (MMBaseModem *modem,
|
||||
*/
|
||||
if (!g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_GPRS_UNKNOWN) &&
|
||||
!g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_LAST_PDN_DISCONNECTION_NOT_ALLOWED) &&
|
||||
!g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_LAST_PDN_DISCONNECTION_NOT_ALLOWED_LEGACY)) {
|
||||
!g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_LAST_PDN_DISCONNECTION_NOT_ALLOWED_LEGACY) &&
|
||||
!g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED)) {
|
||||
g_task_return_error (task, error);
|
||||
g_object_unref (task);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user