novatel: fix GSM secondary port enabling after PIN changes
With the PIN changes, the primary port would already be closed by the time the Novatel modem class was able to send the DMAT command to enable the secondary ports. Just try again later.
This commit is contained in:
@@ -48,12 +48,26 @@ mm_modem_novatel_gsm_new (const char *device,
|
||||
/* Modem class override functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
dmat_callback2 (MMSerialPort *port,
|
||||
GString *response,
|
||||
GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
mm_serial_port_close (port);
|
||||
}
|
||||
|
||||
static void
|
||||
dmat_callback (MMSerialPort *port,
|
||||
GString *response,
|
||||
GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (error) {
|
||||
/* Try it again */
|
||||
if (mm_serial_port_open (port, NULL))
|
||||
mm_serial_port_queue_command (port, "$NWDMAT=1", 2, dmat_callback2, NULL);
|
||||
} else
|
||||
mm_serial_port_close (port);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user