gsm: send init command twice to make the N900 happy (rh #583691) (lp:765516)
The N900 has some odd serial characteristics in that it appears to send pieces of the commands back for whatever reason, until you've sent a few commands down to it. Almost like it's training on whatever you send and needs a bit of input to figure out the characteristics. Whatever. Just send the init command twice instead of failing when the N900 barfs the first time.
This commit is contained in:
@@ -1614,7 +1614,13 @@ enable_flash_done (MMSerialPort *port, GError *error, gpointer user_data)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Send the init command twice; some devices (Nokia N900) appear to take a
|
||||
* few commands before responding correctly. Instead of penalizing them for
|
||||
* being stupid the first time by failing to enable the device, just
|
||||
* try again.
|
||||
*/
|
||||
g_object_get (G_OBJECT (info->modem), MM_GENERIC_GSM_INIT_CMD, &cmd, NULL);
|
||||
mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), cmd, 3, NULL, NULL);
|
||||
mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), cmd, 3, init_done, user_data);
|
||||
g_free (cmd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user