<div dir="ltr"><div><div>Hi Aleksander,</div><div><br></div><div>I fixed the dashes and the '2' part of '3gpp_profile2' was indeed a typo. </div><div><br></div><div>---</div><div> src/qmicli/qmicli-wds.c | 38 +++++++++++++++++++++++++++++++-------</div><div> 1 file changed, 31 insertions(+), 7 deletions(-)</div><div><br></div><div>diff --git a/src/qmicli/qmicli-wds.c b/src/qmicli/qmicli-wds.c</div><div>index 5e6979d..06a8b92 100644</div><div>--- a/src/qmicli/qmicli-wds.c</div><div>+++ b/src/qmicli/qmicli-wds.c</div><div>@@ -67,7 +67,7 @@ static gboolean noop_flag;</div><div> </div><div> static GOptionEntry entries[] = {</div><div> { "wds-start-network", 0, 0, G_OPTION_ARG_STRING, &start_network_str,</div><div>- "Start network (allowed keys: apn, auth (PAP|CHAP|BOTH), username, password, autoconnect=yes)",</div><div>+ "Start network (allowed keys: apn, 3gpp-profile, 3gpp2-profile, auth (PAP|CHAP|BOTH), username, password, autoconnect=yes)",</div><div> "[\"key=value,...\"]"</div><div> },</div><div> { "wds-follow-network", 0, 0, G_OPTION_ARG_NONE, &follow_network_flag,</div><div>@@ -332,6 +332,8 @@ packet_status_timeout (void)</div><div> </div><div> typedef struct {</div><div> gchar *apn;</div><div>+ guint8 profile_index_3gpp;</div><div>+ guint8 profile_index_3gpp2;</div><div> QmiWdsAuthentication auth;</div><div> gboolean auth_set;</div><div> gchar *username;</div><div>@@ -362,6 +364,16 @@ start_network_properties_handle (const gchar *key,</div><div> return TRUE;</div><div> }</div><div> </div><div>+ if (g_ascii_strcasecmp (key, "3gpp-profile") == 0 && !props->profile_index_3gpp) {</div><div>+ props->profile_index_3gpp = atoi (value);</div><div>+ return TRUE;</div><div>+ }</div><div>+</div><div>+ if (g_ascii_strcasecmp (key, "3gpp2-profile") == 0 && !props->profile_index_3gpp2) {</div><div>+ props->profile_index_3gpp2 = atoi (value);</div><div>+ return TRUE;</div><div>+ }</div><div>+</div><div> if (g_ascii_strcasecmp (key, "auth") == 0 && !props->auth_set) {</div><div> if (!qmicli_read_authentication_from_string (value, &(props->auth))) {</div><div> g_set_error (error,</div><div>@@ -413,11 +425,13 @@ start_network_input_create (const gchar *str)</div><div> gchar **split = NULL;</div><div> QmiMessageWdsStartNetworkInput *input = NULL;</div><div> StartNetworkProperties props = {</div><div>- .apn = NULL,</div><div>- .auth = QMI_WDS_AUTHENTICATION_NONE,</div><div>- .auth_set = FALSE,</div><div>- .username = NULL,</div><div>- .password = NULL,</div><div>+ .apn = NULL,</div><div>+ .profile_index_3gpp = 0,</div><div>+ .profile_index_3gpp2 = 0,</div><div>+ .auth = QMI_WDS_AUTHENTICATION_NONE,</div><div>+ .auth_set = FALSE,</div><div>+ .username = NULL,</div><div>+ .password = NULL,</div><div> };</div><div> </div><div> /* An empty string is totally valid (i.e. no TLVs) */</div><div>@@ -465,6 +479,14 @@ start_network_input_create (const gchar *str)</div><div> if (props.apn)</div><div> qmi_message_wds_start_network_input_set_apn (input, props.apn, NULL);</div><div> </div><div>+ /* Set 3GPP profile */</div><div>+ if (props.profile_index_3gpp > 0)</div><div>+ qmi_message_wds_start_network_input_set_profile_index_3gpp (input, props.profile_index_3gpp, NULL);</div><div>+</div><div>+ /* Set 3GPP2 profile */</div><div>+ if (props.profile_index_3gpp2 > 0)</div><div>+ qmi_message_wds_start_network_input_set_profile_index_3gpp2 (input, props.profile_index_3gpp2, NULL);</div><div>+</div><div> /* Set authentication method */</div><div> if (props.auth_set) {</div><div> aux_auth_str = qmi_wds_authentication_build_string_from_mask (props.auth);</div><div>@@ -483,8 +505,10 @@ start_network_input_create (const gchar *str)</div><div> if (props.autoconnect_set)</div><div> qmi_message_wds_start_network_input_set_enable_autoconnect (input, props.autoconnect, NULL);</div><div> </div><div>- g_debug ("Network start parameters set (apn: '%s', auth: '%s', username: '%s', password: '%s', autoconnect: '%s')",</div><div>+ g_debug ("Network start parameters set (apn: '%s', 3gpp_profile: '%u', 3gpp2_profile: '%u', auth: '%s', username: '%s', password: '%s', autoconnect: '%s')",</div><div> props.apn ? props.apn : "unspecified",</div><div>+ props.profile_index_3gpp,</div><div>+ props.profile_index_3gpp2,</div><div> aux_auth_str ? aux_auth_str : "unspecified",</div><div> (props.username && props.username[0]) ? props.username : "unspecified",</div><div> (props.password && props.password[0]) ? props.password : "unspecified",</div><div>-- </div><div>2.1.0</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 December 2015 at 15:45, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey,<br>
<div><div class="h5"><br>
On Wed, Dec 2, 2015 at 1:07 PM, Džiugas Baltrūnas <<a href="mailto:dziugas@simula.no">dziugas@simula.no</a>> wrote:<br>
> Some modems with multiple PDN connection support (for example, Sierra<br>
> Wireless MC7304) seem to require the usage of 3GPP(2) Configured Profile<br>
> Identifier in order to successfully establish more than one active PDN<br>
> connection. Trying to start a second connection with<br>
> --wds-start-network="apn=xxx" typically leads to the termination of the<br>
> first connection. Multiple connections are established as expected when<br>
> using profile indexes, e.g.:<br>
><br>
> # qmicli -d /dev/cdc-wdm0 --wds-start-network="3gpp-profile=1"<br>
> # qmicli -d /dev/cdc-wdm1 --wds-start-network="3gpp-profile=2"<br>
><br>
> Note that pre-configured profile indexes can be obtained using<br>
> --wds-get-profile-list command or using 'AT+CGCONT?' AT command.<br>
><br>
> ---<br>
> src/qmicli/qmicli-wds.c | 38 +++++++++++++++++++++++++++++++-------<br>
> 1 file changed, 31 insertions(+), 7 deletions(-)<br>
><br>
> diff --git a/src/qmicli/qmicli-wds.c b/src/qmicli/qmicli-wds.c<br>
> index 5e6979d..94835f9 100644<br>
> --- a/src/qmicli/qmicli-wds.c<br>
> +++ b/src/qmicli/qmicli-wds.c<br>
> @@ -67,7 +67,7 @@ static gboolean noop_flag;<br>
><br>
> static GOptionEntry entries[] = {<br>
> { "wds-start-network", 0, 0, G_OPTION_ARG_STRING, &start_network_str,<br>
> - "Start network (allowed keys: apn, auth (PAP|CHAP|BOTH), username,<br>
> password, autoconnect=yes)",<br>
> + "Start network (allowed keys: apn, 3gpp-profile, 3gpp2-profile, auth<br>
> (PAP|CHAP|BOTH), username, password, autoconnect=yes)",<br>
> "[\"key=value,...\"]"<br>
> },<br>
> { "wds-follow-network", 0, 0, G_OPTION_ARG_NONE, &follow_network_flag,<br>
> @@ -332,6 +332,8 @@ packet_status_timeout (void)<br>
><br>
> typedef struct {<br>
> gchar *apn;<br>
> + guint8 profile_index_3gpp;<br>
> + guint8 profile_index_3gpp2;<br>
> QmiWdsAuthentication auth;<br>
> gboolean auth_set;<br>
> gchar *username;<br>
> @@ -362,6 +364,16 @@ start_network_properties_handle (const gchar *key,<br>
> return TRUE;<br>
> }<br>
><br>
> + if (g_ascii_strcasecmp (key, "3gpp_profile") == 0 &&<br>
> !props->profile_index_3gpp) {<br>
> + props->profile_index_3gpp = atoi (value);<br>
> + return TRUE;<br>
> + }<br>
> +<br>
> + if (g_ascii_strcasecmp (key, "3gpp_profile2") == 0 &&<br>
> !props->profile_index_3gpp2) {<br>
> + props->profile_index_3gpp2 = atoi (value);<br>
> + return TRUE;<br>
> + }<br>
> +<br>
<br>
</div></div>Aren't the expected keys with a dash instead of an underscore?<br>
<br>
Also, I'd suggest to name the 3GPP2 profile one as "3gpp2-profile"<br>
instead of "3gpp-profile2"<br>
<div><div class="h5"><br>
<br>
> if (g_ascii_strcasecmp (key, "auth") == 0 && !props->auth_set) {<br>
> if (!qmicli_read_authentication_from_string (value,<br>
> &(props->auth))) {<br>
> g_set_error (error,<br>
> @@ -413,11 +425,13 @@ start_network_input_create (const gchar *str)<br>
> gchar **split = NULL;<br>
> QmiMessageWdsStartNetworkInput *input = NULL;<br>
> StartNetworkProperties props = {<br>
> - .apn = NULL,<br>
> - .auth = QMI_WDS_AUTHENTICATION_NONE,<br>
> - .auth_set = FALSE,<br>
> - .username = NULL,<br>
> - .password = NULL,<br>
> + .apn = NULL,<br>
> + .profile_index_3gpp = 0,<br>
> + .profile_index_3gpp2 = 0,<br>
> + .auth = QMI_WDS_AUTHENTICATION_NONE,<br>
> + .auth_set = FALSE,<br>
> + .username = NULL,<br>
> + .password = NULL,<br>
> };<br>
><br>
> /* An empty string is totally valid (i.e. no TLVs) */<br>
> @@ -465,6 +479,14 @@ start_network_input_create (const gchar *str)<br>
> if (props.apn)<br>
> qmi_message_wds_start_network_input_set_apn (input, props.apn,<br>
> NULL);<br>
><br>
> + /* Set 3GPP profile */<br>
> + if (props.profile_index_3gpp > 0)<br>
> + qmi_message_wds_start_network_input_set_profile_index_3gpp (input,<br>
> props.profile_index_3gpp, NULL);<br>
> +<br>
> + /* Set 3GPP2 profile */<br>
> + if (props.profile_index_3gpp2 > 0)<br>
> + qmi_message_wds_start_network_input_set_profile_index_3gpp2 (input,<br>
> props.profile_index_3gpp2, NULL);<br>
> +<br>
> /* Set authentication method */<br>
> if (props.auth_set) {<br>
> aux_auth_str = qmi_wds_authentication_build_string_from_mask<br>
> (props.auth);<br>
> @@ -483,8 +505,10 @@ start_network_input_create (const gchar *str)<br>
> if (props.autoconnect_set)<br>
> qmi_message_wds_start_network_input_set_enable_autoconnect (input,<br>
> props.autoconnect, NULL);<br>
><br>
> - g_debug ("Network start parameters set (apn: '%s', auth: '%s',<br>
> username: '%s', password: '%s', autoconnect: '%s')",<br>
> + g_debug ("Network start parameters set (apn: '%s', 3gpp_profile: '%u',<br>
> 3gpp2_profile: '%u', auth: '%s', username: '%s', password: '%s',<br>
> autoconnect: '%s')",<br>
> props.apn ? props.apn<br>
> : "unspecified",<br>
> + props.profile_index_3gpp,<br>
> + props.profile_index_3gpp2,<br>
> aux_auth_str ? aux_auth_str<br>
> : "unspecified",<br>
> (props.username && props.username[0]) ? props.username<br>
> : "unspecified",<br>
> (props.password && props.password[0]) ? props.password<br>
> : "unspecified",<br>
> --<br>
> 2.1.0<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> libqmi-devel mailing list<br>
> <a href="mailto:libqmi-devel@lists.freedesktop.org">libqmi-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/libqmi-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libqmi-devel</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br></div>