dms: new 'DMS Set FCC Authentication' message

Dell-branded Sierra modems, like the Dell DW5570 (Sierra Wireless MC8805) need
this specific command before they can be put in 'online' mode:

$ sudo qmicli -d /dev/cdc-wdm1 --dms-get-operating-mode
[/dev/cdc-wdm1] Operating mode retrieved:
	Mode: 'low-power'
	HW restricted: 'no'

$ sudo qmicli -d /dev/cdc-wdm1 --dms-set-fcc-authentication
[/dev/cdc-wdm1] Successfully set FCC authentication

$ sudo qmicli -d /dev/cdc-wdm1 --dms-get-operating-mode
[/dev/cdc-wdm1] Operating mode retrieved:
	Mode: 'online'
	HW restricted: 'no'

https://bugzilla.kernel.org/show_bug.cgi?id=92101
This commit is contained in:
Aleksander Morgado 2015-02-07 18:59:05 +01:00
parent 45ab1a6d81
commit 22628a69da
3 changed files with 57 additions and 0 deletions

View File

@ -1169,6 +1169,14 @@
"type" : "TLV",
"format" : "string",
"fixed-size" : "6" } ],
"output" : [ { "common-ref" : "Operation Result" } ] },
// *********************************************************************************
{ "name" : "Set FCC Authentication",
"type" : "Message",
"service" : "DMS",
"id" : "0x555F",
"version" : "1.0",
"output" : [ { "common-ref" : "Operation Result" } ] }
]

View File

@ -107,6 +107,7 @@
<xi:include href="xml/qmi-message-dms-set-alt-net-config.xml"/>
<xi:include href="xml/qmi-message-dms-get-software-version.xml"/>
<xi:include href="xml/qmi-message-dms-set-service-programming-code.xml"/>
<xi:include href="xml/qmi-message-dms-set-fcc-authentication.xml"/>
</section>
</chapter>

View File

@ -81,6 +81,7 @@ static gboolean get_factory_sku_flag;
static gboolean list_stored_images_flag;
static gchar *select_stored_image_str;
static gchar *delete_stored_image_str;
static gboolean set_fcc_authentication_flag;
static gboolean reset_flag;
static gboolean noop_flag;
@ -241,6 +242,10 @@ static GOptionEntry entries[] = {
"Delete stored image",
"[modem#|pri#] where # is the index"
},
{ "dms-set-fcc-authentication", 0, 0, G_OPTION_ARG_NONE, &set_fcc_authentication_flag,
"Set FCC authentication",
NULL
},
{ "dms-reset", 0, 0, G_OPTION_ARG_NONE, &reset_flag,
"Reset the service state",
NULL
@ -315,6 +320,7 @@ qmicli_dms_options_enabled (void)
list_stored_images_flag +
!!select_stored_image_str +
!!delete_stored_image_str +
set_fcc_authentication_flag +
reset_flag +
noop_flag);
@ -2947,6 +2953,36 @@ get_stored_image_delete_ready (QmiClientDms *client,
g_array_unref (pri_image_id.unique_id);
}
static void
set_fcc_authentication_ready (QmiClientDms *client,
GAsyncResult *res)
{
QmiMessageDmsSetFccAuthenticationOutput *output;
GError *error = NULL;
output = qmi_client_dms_set_fcc_authentication_finish (client, res, &error);
if (!output) {
g_printerr ("error: operation failed: %s\n", error->message);
g_error_free (error);
shutdown (FALSE);
return;
}
if (!qmi_message_dms_set_fcc_authentication_output_get_result (output, &error)) {
g_printerr ("error: couldn't set FCC authentication: %s\n", error->message);
g_error_free (error);
qmi_message_dms_set_fcc_authentication_output_unref (output);
shutdown (FALSE);
return;
}
g_print ("[%s] Successfully set FCC authentication\n",
qmi_device_get_path_display (ctx->device));
qmi_message_dms_set_fcc_authentication_output_unref (output);
shutdown (TRUE);
}
static void
reset_ready (QmiClientDms *client,
GAsyncResult *res)
@ -3580,6 +3616,18 @@ qmicli_dms_run (QmiDevice *device,
return;
}
/* Set FCC authentication */
if (set_fcc_authentication_flag) {
g_debug ("Asynchronously setting FCC auth...");
qmi_client_dms_set_fcc_authentication (ctx->client,
NULL,
10,
ctx->cancellable,
(GAsyncReadyCallback)set_fcc_authentication_ready,
NULL);
return;
}
/* Request to reset DMS service? */
if (reset_flag) {
g_debug ("Asynchronously resetting DMS service...");