[Patch] add QMI cmd defintion to create PDP profile at specific index (Sierra only)

Wolfgang Tolkien w at tolkien.email
Thu Jul 19 20:28:13 UTC 2018


It is confusing. As far as I can tell:

* 'profile index' and 'profile number' (as in WDS_GET/SET_DEFAULT_PROFILE_NUM) are the same. I'll call them 'profile index' below.
* 'PDP context number' is different

When using the AT+CGDCONT command, they are all set to the same value (and my qmicli patch mimics that). However, when using WDS_CREATE_PROFILE the modem will decide which profile index to use, while the user can specify an arbitrary PDP context number via TLV. 

The problem is that the 'start network' command (and pretty much everything else) references the profile index, not the PDP context number. In fact, I have no idea what the PDP context number is good for.
​​
Sierra seems to have noticed, hence their vendor specific QMI command - I started looking for it when I noticed that their SDK API supports the 'profile index' parameter for creating profiles.


BTW, not keeping both values in sync can get really messy with AT-commands. AT+CGDCONT? displays the PDP context number - here it is set to '150':

+CGDCONT: 150,"IPV4V6","internet.freedommobile.ca","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

However, when trying to delete it, I have to reference the profile index (which, with AT-commands, I can only guess):
at+cgdcont=150
ERROR
at+cgdcont=1
OK


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On July 19, 2018 12:18 PM, Dan Williams <dcbw at redhat.com> wrote:

> ​​
> 
> On Thu, 2018-07-19 at 14:14 -0400, Wolfgang Tolkien wrote:
> 
> > The WDS_CREATE_PROFILE command does not allow to specify which
> > 
> > profile index should be used to store the newly created profile. It
> > 
> > will always use the first available profile index (and then returns
> > 
> > the index so at least the user knows afterwards). This is contrary to
> > 
> > the AT+CGDCONT command which does specify the profile index.
> > 
> > Sierra seems to have noticed and they created a custom QMI command
> > 
> > which seems to be identical to WDS_CREATE_PROFILE except that it
> > 
> > requires a profile index parameter. This patch adds support for it. I
> > 
> > have only included TLVs which I was able to test (on EM7455 and
> > 
> > EM7565) even though others will probably work as well.
> 
> When you say profile at a specific index, do you mean PDP context
> 
> number, of WDS profile number?
> 
> I'm wondering if instead you could use the "WDS PDP Context Number" TLV
> 
> to specify the number you want.
> 
> Dan




More information about the libqmi-devel mailing list